mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 22:34:53 +08:00
[godot] More CI script refactoring.
This commit is contained in:
parent
72cb43458a
commit
a6f4bc0e8a
@ -4,15 +4,29 @@ set -e
|
||||
dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
|
||||
pushd $dir > /dev/null
|
||||
|
||||
if [ "$#" -eq 0 ] && [ ! -d ../godot ]; then
|
||||
echo "No Godot clone found. Run ./build.sh <Godot branch or tag> <dev> first."
|
||||
if [ ! "$#" -eq 1 ]; then
|
||||
echo "Usage: ./build-templates.sh <platform>"
|
||||
echo
|
||||
echo "e.g.:"
|
||||
echo " ./build-templates.sh windows"
|
||||
echo " ./build-templates.sh linux"
|
||||
echo " ./build-templates.sh macos"
|
||||
echo " ./build-templates.sh ios"
|
||||
echo " ./build-templates.sh android"
|
||||
echo " ./build-templates.sh web"
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
|
||||
version="3.4.5.rc"
|
||||
if [ ! -d ../godot ]; then
|
||||
echo "No Godot clone found. Run ./setup.sh <Godot branch or tag> <dev> first."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
platform=${1%/}
|
||||
|
||||
pushd ../godot
|
||||
if [ `uname` == "Darwin" ]; then
|
||||
if [ "$platform" = "macos" ]; then
|
||||
# --- macOS ---
|
||||
# generates osx.zip
|
||||
|
||||
@ -29,12 +43,11 @@ if [ `uname` == "Darwin" ]; then
|
||||
mkdir -p osx_template.app/Contents/MacOS
|
||||
cp godot.osx.opt.universal osx_template.app/Contents/MacOS/godot_osx_release.64
|
||||
cp godot.osx.opt.debug.universal osx_template.app/Contents/MacOS/godot_osx_debug.64
|
||||
chmod +x osx_template.app/Contents/MacOS/godot_osx*
|
||||
echo "$version" > version.txt
|
||||
chmod +x osx_template.app/Contents/MacOS/godot_osx*
|
||||
rm -rf osx.zip
|
||||
zip -q -9 -r osx.zip osx_template.app version.txt
|
||||
zip -q -9 -r osx.zip osx_template.app
|
||||
popd
|
||||
|
||||
elif [ "$platform" = "ios" ]; then
|
||||
# --- iOS --
|
||||
# generates iphone.zip
|
||||
|
||||
@ -54,12 +67,14 @@ if [ `uname` == "Darwin" ]; then
|
||||
cp libgodot.iphone.opt.arm64.a ios_xcode/libgodot.iphone.release.xcframework/ios-arm64/libgodot.a
|
||||
cp libgodot.iphone.opt.simulator.a ios_xcode/libgodot.iphone.release.xcframework/ios-arm64_x86_64-simulator/libgodot.a
|
||||
cp libgodot.iphone.opt.debug.arm64.a ios_xcode/libgodot.iphone.debug.xcframework/ios-arm64/libgodot.a
|
||||
cp libgodot.iphone.opt.debug.simulator.a ios_xcode/libgodot.iphone.debug.xcframework/ios-arm64_x86_64-simulator/libgodot.a
|
||||
echo "$version" > version.txt
|
||||
cp libgodot.iphone.opt.debug.simulator.a ios_xcode/libgodot.iphone.debug.xcframework/ios-arm64_x86_64-simulator/libgodot.a
|
||||
rm -rf iphone.zip
|
||||
pushd ios_xcode
|
||||
zip -q -9 -r ../iphone.zip *
|
||||
popd
|
||||
popd
|
||||
else
|
||||
echo "Unknown platform: $platform"
|
||||
exit 1
|
||||
fi
|
||||
popd
|
||||
|
||||
@ -4,19 +4,13 @@ set -e
|
||||
dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
|
||||
pushd $dir > /dev/null
|
||||
|
||||
if [ ! "$#" -eq 0 ] && [ ! "$#" -eq 2 ]; then
|
||||
if [ ! "$#" -eq 1 ]; then
|
||||
echo "Usage: ./build.sh <target>"
|
||||
echo
|
||||
echo "e.g.:"
|
||||
echo " ./build.sh release_debug"
|
||||
echo " ./build.sh debug"
|
||||
echo
|
||||
read version
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$#" -eq 0 ]; then
|
||||
echo "Please specify a target, either 'debug' or 'release_debug'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -25,21 +19,34 @@ if [ ! -d ../godot ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
branch=${1%/}
|
||||
|
||||
if [ "${2}" = "true" ]; then
|
||||
target="target=debug"
|
||||
else
|
||||
target=""
|
||||
target="target=${1%/}"
|
||||
dev="false"
|
||||
if [ -f "../godot/custom.py" ]; then
|
||||
dev="true"
|
||||
fi
|
||||
|
||||
|
||||
pushd ../godot
|
||||
scons $target arch=x86_64 compiledb=yes custom_modules="../spine_godot" -j16
|
||||
if [ `uname` == 'Darwin' ]; then
|
||||
if [ `uname` == 'Darwin' ] && [ $dev = "false" ]; then
|
||||
scons $target arch=x86_64 compiledb=yes custom_modules="../spine_godot" -j16
|
||||
scons $target arch=arm64 compiledb=yes custom_modules="../spine_godot" -j16
|
||||
lipo -create bin/godot.osx.tools.x86_64 bin/godot.osx.tools.arm64 -output bin/godot.osx.tools.universal
|
||||
strip -S -x bin/godot.osx.tools.universal
|
||||
|
||||
pushd bin
|
||||
cp -r ../misc/dist/osx_tools.app .
|
||||
mv osx_tools.app Godot.app
|
||||
mkdir -p Godot.app/Contents/MacOS
|
||||
if [ "$target" = "debug" ]; then
|
||||
lipo -create godot.osx.tools.x86_64 godot.osx.tools.arm64 -output godot.osx.tools.universal
|
||||
strip -S -x godot.osx.tools.universal
|
||||
cp godot.osx.tools.universal Godot.app/Contents/MacOS/Godot
|
||||
else
|
||||
lipo -create godot.osx.opt.tools.x86_64 godot.osx.opt.tools.arm64 -output godot.osx.tools.universal
|
||||
strip -S -x godot.osx.opt.tools.universal
|
||||
cp godot.osx.opt.tools.universal Godot.app/Contents/MacOS/Godot
|
||||
fi
|
||||
chmod +x Godot.app/Contents/MacOS/Godot
|
||||
popd
|
||||
else
|
||||
scons $target compiledb=yes custom_modules="../spine_godot" -j16
|
||||
fi
|
||||
popd
|
||||
|
||||
|
||||
5
spine-godot/build/setup.sh
Normal file → Executable file
5
spine-godot/build/setup.sh
Normal file → Executable file
@ -4,14 +4,13 @@ set -e
|
||||
dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
|
||||
pushd $dir > /dev/null
|
||||
|
||||
if [ ! "$#" -eq 0 ] && [ ! "$#" -eq 2 ]; then
|
||||
if [ ! "$#" -eq 2 ]; then
|
||||
echo "Usage: ./setup.sh <Godot branch or tag> <dev:true|false>"
|
||||
echo
|
||||
echo "e.g.:"
|
||||
echo " ./setup.sh 3.4.4-stable true"
|
||||
echo " ./setup.sh master false"
|
||||
echo
|
||||
read version
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user