Last active
May 27, 2019 16:26
-
-
Save Calinou/3e9f6a961c7c9364a681f8f1a5375247 to your computer and use it in GitHub Desktop.
Compile Godot for Android easily
This file contains 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
#!/bin/sh -x | |
# This script compiles Android debug and release templates from a Godot Git clone. | |
# It needs to be run from a GNU/Linux system. The compilation process will automatically | |
# use all CPU threads available. | |
# You will need to install Android SDK (API 23), the build tools, | |
# the Android Support Repository and the NDK (latest, as of November 2016). | |
# Place this script at the root of your Godot Git clone. | |
# CC0 1.0 Universal | |
# Change those to the path of Android SDK and NDK | |
export ANDROID_HOME="/opt/android-sdk" | |
export ANDROID_NDK_ROOT="/opt/android-ndk" | |
# Build Godot for Android in debug and release mode | |
scons p=android -j$(nproc) verbose=no tools=no target=release_debug | |
scons p=android -j$(nproc) verbose=no tools=no target=release | |
# Create APK using Gradle | |
cd platform/android/java | |
./gradlew build | |
# Copy to export templates directory | |
cd ../../../bin/ | |
cp android_debug.apk android_release.apk $HOME/.godot/templates/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment