Last active
September 21, 2018 04:36
-
-
Save Calinou/44edbd5d9c4a2ac0dbc8f165b8b7f0ce to your computer and use it in GitHub Desktop.
Compile Godot for Android easily (on Windows)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: This script must be run from a Windows machine with | |
:: Android SDK and NDK installed. | |
:: NOTE: You need Pywin32 to be installed to use multi-threaded compilation. | |
:: You may need to set "threads" to 1 for the first build, even if you have it installed. | |
:: Place this script at the root of your Godot Git clone. | |
:: CC0 1.0 Universal | |
set threads=%NUMBER_OF_PROCESSORS% | |
:: Set paths to MinGW, Android SDK and Android NDK | |
set PATH=%PROGRAMFILES%\mingw-w64\x86_64-6.2.0-posix-seh-rt_v5-rev0\mingw64\bin\;%PATH% | |
set ANDROID_HOME=%LOCALAPPDATA%\Android\android-sdk | |
set ANDROID_NDK_ROOT=%LOCALAPPDATA%\Android\android-ndk | |
:: Build Godot for Android | |
call "C:\Python27\Scripts\scons.bat" p=android -j%threads% verbose=no tools=no target=release_debug | |
call "C:\Python27\Scripts\scons.bat" p=android -j%threads% verbose=no tools=no target=release | |
:: Package it into an APK | |
cd platform/android/java | |
call "gradlew.bat" build | |
:: Copy APKs in user's export templates folder | |
cd ../../../bin | |
copy android_debug.apk %APPDATA%\Godot\templates\android_debug.apk | |
copy android_release.apk %APPDATA%\Godot\templates\android_release.apk |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment