Skip to content

Commit

Permalink
add script for local use
Browse files Browse the repository at this point in the history
  • Loading branch information
kuruk-mm committed Dec 12, 2023
1 parent f095b76 commit cf0536d
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions docker-build-android.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/bash
if [ ! -d /app/godot/android/ ]
then
echo "Checkout godot android"
git clone https://github.com/decentraland/godot-explorer-android-template /app/godot/android
fi

echo "Build for Linux x86_64"
cd /app/rust/xtask
cargo run -- install
cargo run -- run --only-build

echo "Copy export templates"
mkdir -p /root/.local/share/godot/export_templates/4.2.stable/


echo "Build for Android"
cd /app/rust/decentraland-godot-lib
./android-build.sh

echo "Setup Android Debug Keys"
cd /opt/
keytool -keyalg RSA -genkeypair -alias androiddebugkey \
-keypass android -keystore debug.keystore -storepass android \
-dname "CN=Android Debug,O=Android,C=US" -validity 9999 -deststoretype pkcs12

export GODOT_ANDROID_KEYSTORE_DEBUG_PATH=/opt/debug.keystore
export GODOT_ANDROID_KEYSTORE_DEBUG_USER=androiddebugkey
export GODOT_ANDROID_KEYSTORE_DEBUG_PASSWORD=android

echo "Export Godot APK"
cd /app/godot/
/app/.bin/godot/godot4_bin \
-e --headless --rendering-driver opengl3 --headless \
--export-debug Android /app/android.apk

ls -la | grep android.apk

0 comments on commit cf0536d

Please sign in to comment.