- GODOT. Экспорт на Android.
- Скачайте Java SE Development Kit
- Скачайте Android SDK
- Скачайте Open JDK 8
- Создайте debug.keystore
- Godot 3.1 – How to export to Android in simple steps
- Installing the export templates
- Downloading Android SDK and the JDK
- Creating a key using the command line
- Navigating to the Android export editor settings
- Setting up the location for the Adb
- Setting up the location for the Jarsigner
- Setting up the location of the Debug Keystore
- Getting ready to make a build
- Making your build
- Releasing the build to Google Play Games
- How to make a release keystore?
- Set the reference in the export
- №95. Экспорт на Android.
- Java JDK
- Android SDK
- Скачайте Open JDK 8
- Создайте debug.keystore
- Экспорт под android godot
GODOT. Экспорт на Android.
Экспортирование проекта на Android требует дополнительной настройки инструментов и вашего проекта.
Скачайте Java SE Development Kit
Рекомендуется скачивать Java JDK 8.
На текущий момент актуальный билд – 8 update 281.
Устанавливаем в папку по умолчанию: C:\Program Files\Java\.
Скачайте Android SDK
В более раннее время Android SDK был отдельным инструментом. Впоследствии он был интегрирован в среду Android Studio. Но для экспорта на Android нецелесообразно устанавливать Android Studio, поскольку она занимает большой объём на диске и не будет использоваться вами в дальнейшем. А совсем недавно от Android SDK осталась только команда в Командной строке Windows, хотя Godot требует наличие полноценной программы.
Поэтому вам необходимо найти более старую версию этой программы на просторах Интернета. В рамках статьи использовался Android SDK 24.4.1.
Устанавливаем в папку по умолчанию: C:\Users\ИМЯ_ПОЛЬЗОВАТЕЛЯ\AppData\Local\Android\android-sdk.
Работаем в Android SDK
Открыв Android SDK, перед вами загрузится список из инструментов, так или иначе относящихся к разработке приложений для Android.
⦁ Нажимаем Deselect All, нам не нужно то, что предлагает программа.
⦁Выбираем самый свежий Android SDK Platform-tools из папки Tools.
⦁ Выбираем самый свежий Android SDK Build-tools из папки Tools.
⦁ Выбираем SDK Platform из папки Android 10 (API 29).
⦁ Выбираем Google USB Driver из папки Extras.
⦁ Нажимаем Install packages, соглашаемся с лицензией отдельно по каждому выбранному пакету, устанавливаем.
⦁ Ждём, когда это всё загрузится. Папка с Android SDK увеличит объём примерно на 1 ГБ.
Скачайте Open JDK 8
Устанавливаем в папку по умолчанию: C:\Program Files\AdoptOpenJDK\.
Создайте debug.keystore
Этот файл необходим для установки приложений, скачанных не из магазина. Так Android понимает, что этому APK-пакету можно доверять, и он находится на стадии разработки.
⦁ Открываем командную строку от имени администратора. Для Windows 10: вводим в поиск “cmd”, ПКМ по “Командная строка” – Открыть от имени администратора.
⦁ Сменяем директорию на установленный Java JDK на папку bin: cd C:\Program Files\Java\jdk1.8.0_281\bin
Источник
Godot 3.1 – How to export to Android in simple steps
Building and setting up the export for Android in Godot can feel a bit intimidating for newcomers, however you only have to do this once. Afterwards you are able to send a build to your mobile device in a matter of seconds, by just pressing a button and having a mobile device attached through USB.
The first thing you have to do in Godot is ensure you have the Export Templates setup. You can do this by going to Editor/Manage Export Templates in Godot. Afterwards you click on the download button. Afterwards you go to Editor/Editor Settings select the Export tab, and Android. From there you can set the locations for the Adb, Debug Keystore and Jarsigner locations. You can get the Adb from the Android SDK, the debug keystore is made using the JDK keytool which is downloadable through Github or Oracle.
Installing the export templates
In order to install the export templates, navigate to the top window and select Editor. From there you can select Manage Export Templates. Afterwards you click on the download button like the image below. And you then select Official 3.1.2 [HTTPS]. Note that this can change based on the version you are currently using of Godot. Sometimes when the link is not available, you have the option to install a template through a file. You can find older export templates and releases here. You can also get the latest Github release with export templates on the Unofficial Godot Engine builds site by Hugo Locurcio. Do note tough that the export template needs to match the current Godot version.
The images below show you how to do it visually.
Here you can see how to navigate to the Manage Export Templates selection
After opening the Export Template Manager menu, click on Download
Installing the export templates using the official link
After the download is done, the export templates get installed automatically. Kind in mind that you will have to repeat this process for each new version you have to install. This step is fairly easy tough, I think we can manage this.
Downloading Android SDK and the JDK
In order to setup these things you have to download the Android SDK and you have to download OpenJDK or OracleJDK. It is recommended to stay at JDK version 8 or higher, as lower versions may have issues. I personally installed java-1.8.0-openjdk, the third option on the OpenJDK github page.
Creating a key using the command line
After you have installed both the SDK and OpenJDK. You should be able to use this command with the command line. For windows you can go to the command like by opening the search bar (pressing the windows button) and searching for CMD and pressing enter. You can then copy the following command into the command line.
For Windows 10, you can then find the keystore in “C:\Users\YourUserName”, it is named “debug.keystore”. Make sure to keep the folder to this location available, since we will need it later on.
If you are certain you have installed both the JDK and SDK and the command does not work due to it not being recognized, then there is a chance the system variables are not setup properly. You can find a guide here that shows you how to point the system variables to the JDK folder.
Navigating to the Android export editor settings
In order to start setting up the references, you have to navigate to Editor/Editor Settings
As you can see, the Editor Settings is located under the Editor tab
Afterwards, you scroll down on the left side until you get to the Export tab, and you select Android
All the settings for the Android Export
Setting up the location for the Adb
For Adb you have to go to the SDK folder and then into the “platform-tools” folder. For windows 10 this is generally located at:
If you are unsure where to find the Sdk folder, open up the Android SDK and navigate to the new project settings like the image below.
Example of how to find the android Sdk location on your computer using Android Studio
Setting up the location for the Jarsigner
The Jarsigner is located in the OpenJDK or OracleJDK folder you have unpacked previously.
When installing the OpenJDK on my device it was located at:
Setting up the location of the Debug Keystore
This keystore was made earlier in this article, once created, it gets placed in the User folder:
Getting ready to make a build
Navigate to Project/Export to go to the export window
Add a new export preset by pressing the Add… button and selecting Android
How to add a new present in the export options
Now finally, set the Unique name and name of the package.
How I generally name the Unique name is com.myComp.ProductName and the name is what will be displayed on your android device. So that should be equal to your product name. Spaces are allowed.
How to setup the package Unique name and general name
Making your build
There are two ways to make a build. One is to press the Export Project button in the export window. The other option is to use the icon that is available in the editor window. Personally I prefer using the icon, as this will automatically install the build to the phone. Just make sure it is connected to your computer using USB with USB Logging on, using developer mode. If you are unsure how to enable developer mode. Then you have to google “How to enable developer mode ”.
How to quickly build the project to your device
After pressing the button above, you will have the game running in no time on your device.
Releasing the build to Google Play Games
When exporting a build to Google Play Games, it is important to use a release keystore. This is because the debug keystore is merely meant for development and testing purposes. It is also not advised to release games using a debug keystore.
Signing a keystore is like branding the application with your credentials. And it is possible to assign the same keystore to multiple applications. The debug keystore has base credentials.
Eventually when you want to release to the play store you use a Release keystore. It is important that you keep this key safe, since you will only be able to push updates if you sign the application with the initial key. Preventing malicious users from pushing harmful code in case the account gets stolen.
How to make a release keystore?
Again, like the steps above to create a debug key, there is a parameter to create a release key. Make sure to set yourKeyAlias to an alias of your choice.
After doing this, you will get the question for a password. Make sure to note it down, because losing it means losing your key. And it has happens to people before that they had to republish a game on Google Play due to this.
After entering the password twice, you will get a lot of questions such as first/last name. Organisational unit, etc. You can leave these blank. At the end you get a question asking if it is all correct, you then type in yes. After creating the key, you may get this message:
Doing this will change the keystore into a file with the “.pfx” extention, from what I’ve seen godot only accepts the .keystore format. So we can ignore this for now.
Set the reference in the export
Finally we set the reference to our release key in the export like the image below.
Also, when you have pressed export, do not forget to toggle this off, else it will still sign it using the debug key!
Thank you for reading, and I hope it has helped you. If you have interest in implementing ads into your game and you happen to be using Godot 3.2, then I recommend reading “How to integrate Google Ads (Admob) for Android”
Источник
№95. Экспорт на Android.
В этой статье разберемся с тем, как экспортнуть проект на платформу Android.
Java JDK
Первое что нужно сделать — скачать Java JDK 8.
На текущий момент актуальный билд – 8 update 281.
Устанавливаем в папку по умолчанию: C:\Program Files\Java\.
Android SDK
В более раннее время Android SDK был отдельным инструментом. Впоследствии он был интегрирован в среду Android Studio. Но для экспорта на Android нецелесообразно устанавливать Android Studio, поскольку она занимает большой объём на диске и не будет использоваться вами в дальнейшем. А совсем недавно от Android SDK осталась только команда в Командной строке Windows, хотя Godot требует наличие полноценной программы.
Поэтому вам необходимо найти более старую версию этой программы на просторах Интернета. В рамках статьи использовался Android SDK 24.4.1.
Устанавливаем в папку по умолчанию: C:\Users\ИМЯ_ПОЛЬЗОВАТЕЛЯ\AppData\Local\Android\android-sdk.
Работаем в Android SDK
Открыв Android SDK, перед вами загрузится список из инструментов, так или иначе относящихся к разработке приложений для Android.
⦁ Нажимаем Deselect All, нам не нужно то, что предлагает программа.
⦁Выбираем самый свежий Android SDK Platform-tools из папки Tools.
⦁ Выбираем самый свежий Android SDK Build-tools из папки Tools.
⦁ Выбираем SDK Platform из папки Android 10 (API 29).
⦁ Выбираем Google USB Driver из папки Extras.
⦁ Нажимаем Install packages, соглашаемся с лицензией отдельно по каждому выбранному пакету, устанавливаем.
⦁ Ждём, когда это всё загрузится. Папка с Android SDK увеличит объём примерно на 1 ГБ.
Скачайте Open JDK 8
Устанавливаем в папку по умолчанию: C:\Program Files\AdoptOpenJDK\.
Создайте debug.keystore
Этот файл необходим для установки приложений, скачанных не из магазина. Так Android понимает, что этому APK-пакету можно доверять, и он находится на стадии разработки.
⦁ Открываем командную строку от имени администратора. Для Windows 10: вводим в поиск “cmd”, ПКМ по “Командная строка” – Открыть от имени администратора.
⦁ Сменяем директорию на установленный Java JDK на папку bin: cd C:\Program Files\Java\jdk1.8.0_281\bin
Источник
Экспорт под android godot
A workflow action to automatically export your Godot games. Supports standard and Mono builds!
This action automatically reads your export_presets.cfg file to determine which builds to make. Whenever this action runs each of your defined exports will run. The resulting executables will be posted as zip files attached to the created release.
This action creates a release tagged with a Semantic Version. The zip files containing the export results will be attached to this release. More info about releases can be found below.
Setting Up Export Presets
Define at least 1 export preset by going to Project -> Export in the Godot editor and creating a configuration. Set the file name in the «Export Path» box. This is how the action knows how to name your binary. Notice how the below image has «win.exe» in the «Export Path» for my windows export. Your executables can be named however you like, as long as they include the appropriate extension .exe , .x86_64 , etc.
NOTE: The file extension for the Mac OSX export must be anything but .zip for versions of Godot before 3.2. If the Mac OSX export file extension is .zip for a Godot version earlier than 3.2, then your project source files will be exported instead of a Mac application. This was a known issue with the Godot command line export. For reference, I used a .z file extension to make it work for my Mac OSX builds.
- godot_executable_download_url
- The Linux Headless version of Godot that you want to export your project with. For example, to use the current stable of version of Godot your value will be https://downloads.tuxfamily.org/godotengine/3.1.2/Godot_v3.1.2-stable_linux_headless.64.zip . If you do not use the Linux Headless version exporting will fail.
- godot_export_templates_download_url
- The link to the .tpz archive of export templates. Can be found at https://downloads.tuxfamily.org/godotengine . The export templates must be for the same version of Godot that you are using in godot_executable_download_url . For example, the godot_export_templates_download_url that matches the godot_executable_download_url version is https://downloads.tuxfamily.org/godotengine/3.1.2/Godot_v3.1.2-stable_export_templates.tpz
- relative_project_path
- The relative path to the directory containing your project.godot file. If your project.godot is at the root of your repository then this value should be ./ . Do not include project.godot as part of this path.
- export_debug defaults false
- If true , godot will export with debugging tools.
- archive_export_output default false
- If true , exports will be archived.
- Note: When create_release is true then exports uploaded to the release may be archived regardless of this setting.
- archive_single_release_output default true
- If exports that result in a single file output should be archived when uploading to the release. Setting this to false is useful for exports that use the «Embed PCK» option, as the output executable can be directly uploaded to the release.
- Note: This input is only used when create_release is true .
- base_version default 0.0.1
- The version which new releases start at. The first release will be this version. After that, releases will automatically be 1 patch version ahead of the version of the latest release. To increment minor and major versions simply set the base_version to reflect your desired major and minor versions. When the base_version is set to a higher version than the last release version, the base_version will be used.
- Note: This input is only used when create_release is true .
- create_release default true
- If releases should be automatically created.
- generate_release_notes default false
- If release notes should be automatically generated based on commit history. The generated notes will be added as the body of the release.
- Note: This input is only used when create_release is true .
- Note: When using the GitHub checkout action, ensure you are fetching the entire project history by including fetch-depth: 0 . See the example workflow configuration for more context.
- use_preset_export_path default false
- If set to true, exports will be moved to directory defined in export_presets.cfg relative to the root of the Git repository. Prioritized over relative_export_path .
- relative_export_path default »
- If provided, exports will be moved to this directory relative to the root of the Git repository.
- wine_path default »
- The absolute path to the wine binary. If specified, Godot will use this to run rcedit to update Windows exe icons. See the setup Windows icons example configuration.
Since this action creates releases and uploads the zip file assets, you will need to supply the GITHUB_TOKEN environment variable. For an example on how to do this, see the below example workflow configuration. This environment variable is not needed if you set create_release to false .
Below is a sample workflow configuration file utilizing this action. This example workflow could be defined in .github/workflows/main.yml . For more information about defining workflows see the workflow docs.
Mono builds do not require additional configuration. However, if you want to change the build tool that is used (currently defaults to dotnet cli ) then you need to supply your own editor settings with the line mono/builds/build_tool . The value of this setting should be a number between 0 and 3 . This value corresponds to the build tool dropdown in the editor settings window at Editor Settings -> Mono -> Builds -> Build Tool . You can look at your local editor_settings-3.tres to see what this value should be if you want to match the build tool used during local development.
For Android builds, use the setup-android action before this one in your workflow. The default editor settings file used by this action already provides a default path to the Android SDK. If your path is different then supply your own editor settings file.
Custom Editor Settings
Some Godot configurations are editor-based and not project-based. This includes items like Android paths. This repository provides a base editor settings that will be used by default when exporting your games. However, you can supply a custom editor settings configuration file by simply copying your custom editor settings file to
/.config/godot/editor_settings-3.tres before this action runs. This action will not overwrite an existing editor_settings-3.tres file.
Using tag as base_version
You can use git tags to set the release version. For example, using git tag v1.0.0 and then git push —tags results in base-version 1.0.0 when using the following workflow.
Supplying a custom editor settings file
Include the following step before this action. For example:
Setup Windows Icons
In order to configure this action to update your game’s Windows exe icon, include the following block before this action. Example:
And then supply this WINE_PATH output to the wine_path input for this action:
Источник