mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
[godot] Fix build script for Android template, closes #2657
This commit is contained in:
parent
623e2b9786
commit
32be2c1ef1
1
.gitignore
vendored
1
.gitignore
vendored
@ -214,3 +214,4 @@ spine-godot/compile_commands.json
|
|||||||
spine-godot/bin
|
spine-godot/bin
|
||||||
spine-godot/example-v4-extension/bin/macos/macos.framework/libspine_godot.macos.editor
|
spine-godot/example-v4-extension/bin/macos/macos.framework/libspine_godot.macos.editor
|
||||||
spine-godot/.idea
|
spine-godot/.idea
|
||||||
|
spine-godot/build/version.txt
|
||||||
|
|||||||
@ -26,6 +26,9 @@ fi
|
|||||||
|
|
||||||
platform=${1%/}
|
platform=${1%/}
|
||||||
mono=false
|
mono=false
|
||||||
|
version=$(cat version.txt)
|
||||||
|
major=$(echo $version | cut -d. -f1)
|
||||||
|
minor=$(echo $version | cut -d. -f2)
|
||||||
|
|
||||||
if [[ $# -eq 2 ]]; then
|
if [[ $# -eq 2 ]]; then
|
||||||
mono=${2%/}
|
mono=${2%/}
|
||||||
@ -171,15 +174,23 @@ elif [ "$platform" = "web" ]; then
|
|||||||
elif [ "$platform" = "android" ]; then
|
elif [ "$platform" = "android" ]; then
|
||||||
# --- ANROID ---
|
# --- ANROID ---
|
||||||
# generates android_release.apk, android_debug.apk, android_source.zip
|
# generates android_release.apk, android_debug.apk, android_source.zip
|
||||||
scons platform=android target=template_release android_arch=armv7 custom_modules="../spine_godot" --jobs=$cpus
|
if [[ $major -lt 4 || ($major -eq 4 && $minor -lt 3) ]]; then
|
||||||
scons platform=android target=template_debug android_arch=armv7 custom_modules="../spine_godot" --jobs=$cpus
|
# Godot < 4.3 generates APKs via Gradle invocation.
|
||||||
scons platform=android target=template_release android_arch=arm64v8 custom_modules="../spine_godot" --jobs=$cpus
|
scons platform=android target=template_release arch=arm32 custom_modules="../spine_godot" --jobs=$cpus
|
||||||
scons platform=android target=template_debug android_arch=arm64v8 custom_modules="../spine_godot" --jobs=$cpus
|
scons platform=android target=template_debug arch=arm32 custom_modules="../spine_godot" --jobs=$cpus
|
||||||
|
scons platform=android target=template_release arch=arm64 custom_modules="../spine_godot" --jobs=$cpus
|
||||||
|
scons platform=android target=template_debug arch=arm64 custom_modules="../spine_godot" --jobs=$cpus
|
||||||
|
|
||||||
pushd platform/android/java
|
pushd platform/android/java
|
||||||
chmod a+x gradlew
|
chmod a+x gradlew
|
||||||
./gradlew generateGodotTemplates
|
./gradlew generateGodotTemplates
|
||||||
popd
|
popd
|
||||||
|
else
|
||||||
|
scons platform=android target=template_release arch=arm32 --jobs=$cpus
|
||||||
|
scons platform=android target=template_release arch=arm64 generate_apk=yes --jobs=$cpus
|
||||||
|
scons platform=android target=template_debug arch=arm32 --jobs=$cpus
|
||||||
|
scons platform=android target=template_debug arch=arm64 generate_apk=yes --jobs=$cpus
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "Unknown platform: $platform"
|
echo "Unknown platform: $platform"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
@ -33,7 +33,7 @@ if [ "$mono" != "true" ] && [ "$mono" != "false" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
godot_cpp_branch=$(echo $godot_branch | cut -d- -f1)
|
godot_cpp_branch=$(echo $godot_branch | cut -d. -f1-2)
|
||||||
|
|
||||||
cpus=2
|
cpus=2
|
||||||
if [ "$OSTYPE" == "msys" ]; then
|
if [ "$OSTYPE" == "msys" ]; then
|
||||||
|
|||||||
@ -21,6 +21,8 @@ branch=${1%/}
|
|||||||
dev=${2%/}
|
dev=${2%/}
|
||||||
mono=false
|
mono=false
|
||||||
repo=https://github.com/godotengine/godot.git
|
repo=https://github.com/godotengine/godot.git
|
||||||
|
version=$(echo $branch | cut -d. -f1-2)
|
||||||
|
echo $version > version.txt
|
||||||
|
|
||||||
if [[ $# -eq 3 && "$branch" != 3* ]]; then
|
if [[ $# -eq 3 && "$branch" != 3* ]]; then
|
||||||
mono=${3%/}
|
mono=${3%/}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user