mirror of
https://github.com/godotengine/godot-build-scripts.git
synced 2026-02-25 06:33:22 +03:00
Port build scripts for Godot 3.2 / master branch
- Add Mono builds for Android. - Remove now unused `MONO*_PREFIX` env variables (replaced by `mono_prefix` command line option). - Update iOS to SDK 12.4 and darwin17 for proper ARKit support. - Drop 32-bit support for iOS (armv7, x86).
This commit is contained in:
committed by
Rémi Verschelde
parent
d640fa4c69
commit
0c2d825451
@@ -5,16 +5,17 @@ set -e
|
||||
export BUILD_NAME=official
|
||||
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
|
||||
export OPTIONS="builtin_libpng=yes builtin_openssl=yes builtin_zlib=yes debug_symbols=no use_static_cpp=yes use_lto=yes"
|
||||
export OPTIONS_MONO="module_mono_enabled=yes mono_static=yes"
|
||||
export OPTIONS_MONO="module_mono_enabled=yes mono_static=no"
|
||||
export TERM=xterm
|
||||
export ANDROID_HOME=/root/
|
||||
export ANDROID_NDK_ROOT=/root/ndk-bundle/
|
||||
|
||||
rm -rf godot
|
||||
mkdir godot
|
||||
cd godot
|
||||
tar xf /root/godot.tar.gz --strip-components=1
|
||||
|
||||
cp /root/mono-glue/*.cpp modules/mono/glue/
|
||||
cp -r /root/mono-glue/Managed/Generated modules/mono/glue/Managed/
|
||||
|
||||
$SCONS platform=android android_arch=armv7 $OPTIONS tools=no target=release_debug
|
||||
$SCONS platform=android android_arch=armv7 $OPTIONS tools=no target=release
|
||||
|
||||
@@ -28,7 +29,31 @@ $SCONS platform=android android_arch=x86_64 $OPTIONS tools=no target=release_deb
|
||||
$SCONS platform=android android_arch=x86_64 $OPTIONS tools=no target=release
|
||||
|
||||
pushd platform/android/java
|
||||
./gradlew build
|
||||
./gradlew generateGodotTemplates
|
||||
popd
|
||||
|
||||
cp bin/*.apk /root/out
|
||||
mkdir -p /root/out/templates
|
||||
cp bin/android_source.zip /root/out/templates
|
||||
cp bin/android_debug.apk /root/out/templates/android_debug.apk
|
||||
cp bin/android_release.apk /root/out/templates/android_release.apk
|
||||
|
||||
$SCONS platform=android android_arch=armv7 $OPTIONS $OPTIONS_MONO mono_prefix=/root/mono-installs/android-armeabi-v7a-release tools=no target=release_debug
|
||||
$SCONS platform=android android_arch=armv7 $OPTIONS $OPTIONS_MONO mono_prefix=/root/mono-installs/android-armeabi-v7a-release tools=no target=release
|
||||
|
||||
$SCONS platform=android android_arch=arm64v8 $OPTIONS $OPTIONS_MONO mono_prefix=/root/mono-installs/android-arm64-v8a-release tools=no target=release_debug
|
||||
$SCONS platform=android android_arch=arm64v8 $OPTIONS $OPTIONS_MONO mono_prefix=/root/mono-installs/android-arm64-v8a-release tools=no target=release
|
||||
|
||||
$SCONS platform=android android_arch=x86 $OPTIONS $OPTIONS_MONO mono_prefix=/root/mono-installs/android-x86-release tools=no target=release_debug
|
||||
$SCONS platform=android android_arch=x86 $OPTIONS $OPTIONS_MONO mono_prefix=/root/mono-installs/android-x86-release tools=no target=release
|
||||
|
||||
$SCONS platform=android android_arch=x86_64 $OPTIONS $OPTIONS_MONO mono_prefix=/root/mono-installs/android-x86_64-release tools=no target=release_debug
|
||||
$SCONS platform=android android_arch=x86_64 $OPTIONS $OPTIONS_MONO mono_prefix=/root/mono-installs/android-x86_64-release tools=no target=release
|
||||
|
||||
pushd platform/android/java
|
||||
./gradlew generateGodotTemplates
|
||||
popd
|
||||
|
||||
mkdir -p /root/out/templates-mono
|
||||
cp bin/android_source.zip /root/out/templates-mono
|
||||
cp bin/android_debug.apk /root/out/templates-mono/android_debug.apk
|
||||
cp bin/android_release.apk /root/out/templates-mono/android_release.apk
|
||||
|
||||
@@ -4,8 +4,8 @@ set -e
|
||||
|
||||
export BUILD_NAME=official
|
||||
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
|
||||
export IOS_SDK="11.2"
|
||||
export OPTIONS="osxcross_sdk=darwin15 builtin_libpng=yes builtin_openssl=yes builtin_zlib=yes debug_symbols=no use_static_cpp=yes"
|
||||
export IOS_SDK="12.4"
|
||||
export OPTIONS="osxcross_sdk=darwin17 builtin_libpng=yes builtin_openssl=yes builtin_zlib=yes debug_symbols=no use_static_cpp=yes"
|
||||
export OPTIONS_MONO="module_mono_enabled=yes mono_static=yes"
|
||||
export TERM=xterm
|
||||
export OSXCROSS_IOS=not_nothing
|
||||
@@ -15,23 +15,13 @@ mkdir godot
|
||||
cd godot
|
||||
tar xf /root/godot.tar.gz --strip-components=1
|
||||
|
||||
$SCONS platform=iphone $OPTIONS arch=arm tools=no target=release_debug IPHONESDK="/root/ioscross/arm64/SDK/iPhoneOS${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/arm64/" ios_triple="arm-apple-darwin11-"
|
||||
|
||||
$SCONS platform=iphone $OPTIONS arch=arm tools=no target=release IPHONESDK="/root/ioscross/arm64/SDK/iPhoneOS${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/arm64/" ios_triple="arm-apple-darwin11-"
|
||||
|
||||
$SCONS platform=iphone $OPTIONS arch=arm64 tools=no target=release_debug IPHONESDK="/root/ioscross/arm64/SDK/iPhoneOS${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/arm64/" ios_triple="arm-apple-darwin11-"
|
||||
|
||||
$SCONS platform=iphone $OPTIONS arch=arm64 tools=no target=release IPHONESDK="/root/ioscross/arm64/SDK/iPhoneOS${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/arm64/" ios_triple="arm-apple-darwin11-"
|
||||
|
||||
$SCONS platform=iphone $OPTIONS arch=x86 tools=no target=release_debug IPHONESDK="/root/ioscross/x86_64/SDK/iPhoneOS${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/x86_64/" ios_triple="x86_64-apple-darwin11-"
|
||||
|
||||
$SCONS platform=iphone $OPTIONS arch=x86 tools=no target=release IPHONESDK="/root/ioscross/x86_64/SDK/iPhoneOS${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/x86_64/" ios_triple="x86_64-apple-darwin11-"
|
||||
|
||||
$SCONS platform=iphone $OPTIONS arch=x86_64 tools=no target=release_debug IPHONESDK="/root/ioscross/x86_64/SDK/iPhoneOS${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/x86_64/" ios_triple="x86_64-apple-darwin11-"
|
||||
|
||||
$SCONS platform=iphone $OPTIONS arch=x86_64 tools=no target=release IPHONESDK="/root/ioscross/x86_64/SDK/iPhoneOS${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/x86_64/" ios_triple="x86_64-apple-darwin11-"
|
||||
|
||||
/root/ioscross/arm64/bin/arm-apple-darwin11-lipo -create bin/libgodot.iphone.opt.arm.a bin/libgodot.iphone.opt.arm64.a bin/libgodot.iphone.opt.x86.a bin/libgodot.iphone.opt.x86_64.a -output /root/out/libgodot.iphone.opt.fat
|
||||
/root/ioscross/arm64/bin/arm-apple-darwin11-lipo -create bin/libgodot.iphone.opt.debug.arm.a bin/libgodot.iphone.opt.debug.arm64.a bin/libgodot.iphone.opt.debug.x86.a bin/libgodot.iphone.opt.debug.x86_64.a -output /root/out/libgodot.iphone.opt.debug.fat
|
||||
/root/ioscross/arm64/bin/arm-apple-darwin11-lipo -create bin/libgodot.iphone.opt.arm64.a bin/libgodot.iphone.opt.x86_64.a -output /root/out/libgodot.iphone.opt.fat
|
||||
/root/ioscross/arm64/bin/arm-apple-darwin11-lipo -create bin/libgodot.iphone.opt.debug.arm64.a bin/libgodot.iphone.opt.debug.x86_64.a -output /root/out/libgodot.iphone.opt.debug.fat
|
||||
|
||||
echo "iOS build successful"
|
||||
|
||||
@@ -7,8 +7,6 @@ export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
|
||||
export OPTIONS="builtin_libpng=yes builtin_openssl=yes builtin_zlib=yes debug_symbols=no use_static_cpp=yes use_lto=yes"
|
||||
export OPTIONS_MONO="module_mono_enabled=yes mono_static=yes"
|
||||
export TERM=xterm
|
||||
export MONO32_PREFIX=/usr
|
||||
export MONO64_PREFIX=/usr
|
||||
export CC="gcc-8"
|
||||
export CXX="g++-8"
|
||||
|
||||
@@ -17,7 +15,8 @@ mkdir godot
|
||||
cd godot
|
||||
tar xf /root/godot.tar.gz --strip-components=1
|
||||
|
||||
cp /root/mono-glue/*.cpp modules/mono/glue
|
||||
cp /root/mono-glue/*.cpp modules/mono/glue/
|
||||
cp -r /root/mono-glue/Managed/Generated modules/mono/glue/Managed/
|
||||
|
||||
$SCONS platform=x11 CC=$CC CXX=$CXX $OPTIONS tools=yes target=release_debug
|
||||
mkdir -p /root/out/tools
|
||||
@@ -30,6 +29,8 @@ mkdir -p /root/out/templates
|
||||
cp -rvp bin/* /root/out/templates
|
||||
rm -rf bin
|
||||
|
||||
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/pkgconfig/
|
||||
|
||||
$SCONS platform=x11 CC=$CC CXX=$CXX $OPTIONS $OPTIONS_MONO tools=yes target=release_debug copy_mono_root=yes
|
||||
mkdir -p /root/out/tools-mono
|
||||
cp -rvp bin/* /root/out/tools-mono
|
||||
|
||||
@@ -5,9 +5,8 @@ set -e
|
||||
export BUILD_NAME=official
|
||||
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
|
||||
export OPTIONS="osxcross_sdk=darwin17 builtin_libpng=yes builtin_openssl=yes builtin_zlib=yes debug_symbols=no use_static_cpp=yes use_lto=yes"
|
||||
export OPTIONS_MONO="module_mono_enabled=yes mono_static=yes"
|
||||
export OPTIONS_MONO="module_mono_enabled=yes mono_static=yes mono_prefix=/root/dependencies/mono"
|
||||
export TERM=xterm
|
||||
export MONO64_PREFIX=/root/dependencies/mono
|
||||
export PATH=/root/osxcross/target/bin:$PATH
|
||||
export OSXCROSS_ROOT=/root/osxcross
|
||||
|
||||
@@ -16,7 +15,8 @@ mkdir godot
|
||||
cd godot
|
||||
tar xf /root/godot.tar.gz --strip-components=1
|
||||
|
||||
cp /root/mono-glue/*.cpp modules/mono/glue
|
||||
cp /root/mono-glue/*.cpp modules/mono/glue/
|
||||
cp -r /root/mono-glue/Managed/Generated modules/mono/glue/Managed/
|
||||
|
||||
$SCONS platform=osx $OPTIONS tools=yes target=release_debug
|
||||
|
||||
|
||||
@@ -3,22 +3,19 @@
|
||||
set -e
|
||||
|
||||
export BUILD_NAME=official
|
||||
export OPTIONS="builtin_libpng=yes builtin_openssl=yes builtin_zlib=yes debug_symbols=no"
|
||||
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
|
||||
export OPTIONS="builtin_libpng=yes builtin_openssl=yes builtin_zlib=yes debug_symbols=no"
|
||||
export TERM=xterm
|
||||
export MONO32_PREFIX=/usr
|
||||
export MONO64_PREFIX=/usr
|
||||
|
||||
rm -rf godot
|
||||
mkdir godot
|
||||
cd godot
|
||||
tar xf ../godot.tar.gz --strip-components=1
|
||||
|
||||
${SCONS} platform=x11 bits=64 ${OPTIONS} target=release_debug tools=yes module_mono_enabled=yes mono_glue=no
|
||||
xvfb-run bin/godot.x11.opt.tools.64.mono --generate-mono-glue /root/mono-glue || /bin/true
|
||||
mono --version
|
||||
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/pkgconfig/
|
||||
|
||||
xvfb-run bin/godot.x11.opt.tools.64.mono --generate-cs-api /tmp/build_GodotSharp || /bin/true
|
||||
xvfb-run msbuild /tmp/build_GodotSharp/GodotSharp.sln /p:Configuration=Release
|
||||
mkdir -p /root/mono-glue/Api
|
||||
cp -r /tmp/build_GodotSharp/GodotSharp/bin/Release/{GodotSharp.dll,GodotSharp.pdb,GodotSharp.xml} /root/mono-glue/Api
|
||||
cp -r /tmp/build_GodotSharp/GodotSharpEditor/bin/Release/{GodotSharpEditor.dll,GodotSharpEditor.pdb,GodotSharpEditor.xml} /root/mono-glue/Api
|
||||
${SCONS} platform=x11 bits=64 ${OPTIONS} target=release_debug tools=yes module_mono_enabled=yes mono_glue=no
|
||||
|
||||
rm -rf /root/mono-glue/*
|
||||
xvfb-run bin/godot.x11.opt.tools.64.mono --generate-mono-glue /root/mono-glue || /bin/true
|
||||
|
||||
@@ -58,7 +58,6 @@ rm -rf mono/release-${GODOT_VERSION}/*linux*64*
|
||||
mkdir -p Godot_v${GODOT_VERSION}_mono_x11_64
|
||||
cp out/linux/x64/tools-mono/godot.x11.opt.tools.64.mono Godot_v${GODOT_VERSION}_mono_x11_64/Godot_v${GODOT_VERSION}_mono_x11.64
|
||||
cp -rp out/linux/x64/tools-mono/GodotSharp Godot_v${GODOT_VERSION}_mono_x11_64
|
||||
cp -rp mono-glue/Api Godot_v${GODOT_VERSION}_mono_x11_64/GodotSharp/Api
|
||||
zip -r -q -9 Godot_v${GODOT_VERSION}_mono_x11_64.zip Godot_v${GODOT_VERSION}_mono_x11_64
|
||||
mv Godot_v${GODOT_VERSION}_mono_x11_64.zip mono/release-${GODOT_VERSION}
|
||||
rm -rf Godot_v${GODOT_VERSION}_mono_x11_64
|
||||
@@ -92,7 +91,6 @@ rm -rf mono/release-${GODOT_VERSION}/*linux*32*
|
||||
mkdir -p Godot_v${GODOT_VERSION}_mono_x11_32
|
||||
cp out/linux/x86/tools-mono/godot.x11.opt.tools.32.mono Godot_v${GODOT_VERSION}_mono_x11_32/Godot_v${GODOT_VERSION}_mono_x11.32
|
||||
cp -rp out/linux/x86/tools-mono/GodotSharp/ Godot_v${GODOT_VERSION}_mono_x11_32
|
||||
cp -rp mono-glue/Api Godot_v${GODOT_VERSION}_mono_x11_32/GodotSharp/Api
|
||||
zip -r -q -9 Godot_v${GODOT_VERSION}_mono_x11_32.zip Godot_v${GODOT_VERSION}_mono_x11_32
|
||||
mv Godot_v${GODOT_VERSION}_mono_x11_32.zip mono/release-${GODOT_VERSION}
|
||||
rm -rf Godot_v${GODOT_VERSION}_mono_x11_32
|
||||
@@ -149,7 +147,6 @@ cp out/windows/x64/tools-mono/godot.windows.opt.tools.64.mono.exe Godot_v${GODOT
|
||||
strip Godot_v${GODOT_VERSION}_mono_win64/Godot_v${GODOT_VERSION}_mono_win64.exe
|
||||
sign Godot_v${GODOT_VERSION}_mono_win64/Godot_v${GODOT_VERSION}_mono_win64.exe
|
||||
cp -rp out/windows/x64/tools-mono/GodotSharp Godot_v${GODOT_VERSION}_mono_win64
|
||||
cp -rp mono-glue/Api Godot_v${GODOT_VERSION}_mono_win64/GodotSharp/Api
|
||||
zip -r -q -9 Godot_v${GODOT_VERSION}_mono_win64.zip Godot_v${GODOT_VERSION}_mono_win64
|
||||
mv Godot_v${GODOT_VERSION}_mono_win64.zip mono/release-${GODOT_VERSION}
|
||||
rm -rf Godot_v${GODOT_VERSION}_mono_win64
|
||||
@@ -163,7 +160,6 @@ cp out/windows/x86/tools-mono/godot.windows.opt.tools.32.mono.exe Godot_v${GODOT
|
||||
strip Godot_v${GODOT_VERSION}_mono_win32/Godot_v${GODOT_VERSION}_mono_win32.exe
|
||||
sign Godot_v${GODOT_VERSION}_mono_win32/Godot_v${GODOT_VERSION}_mono_win32.exe
|
||||
cp -rp out/windows/x86/tools-mono/GodotSharp Godot_v${GODOT_VERSION}_mono_win32
|
||||
cp -rp mono-glue/Api Godot_v${GODOT_VERSION}_mono_win32/GodotSharp/Api
|
||||
zip -r -q -9 Godot_v${GODOT_VERSION}_mono_win32.zip Godot_v${GODOT_VERSION}_mono_win32
|
||||
mv Godot_v${GODOT_VERSION}_mono_win32.zip mono/release-${GODOT_VERSION}
|
||||
rm -rf Godot_v${GODOT_VERSION}_mono_win32
|
||||
@@ -239,9 +235,9 @@ cp out/macosx/x64/tools-mono/godot.osx.opt.tools.64.mono Godot_mono.app/Contents
|
||||
mkdir -p Godot_mono.app/Contents/{Frameworks,Resources}
|
||||
mkdir -p Godot_mono.app/Contents/{Frameworks,Resources}/GodotSharp
|
||||
mkdir -p Godot_mono.app/Contents/{Frameworks,Resources}/GodotSharp/Mono
|
||||
cp -rp out/macosx/x64/tools-mono/GodotSharp/Api Godot_mono.app/Contents/Frameworks/GodotSharp
|
||||
cp -rp out/macosx/x64/tools-mono/GodotSharp/Mono/lib Godot_mono.app/Contents/Frameworks/GodotSharp/Mono
|
||||
cp -rp out/macosx/x64/tools-mono/GodotSharp/Tools Godot_mono.app/Contents/Frameworks/GodotSharp
|
||||
cp -rp mono-glue/Api Godot_mono.app/Contents/Frameworks/GodotSharp
|
||||
cp -rp out/macosx/x64/tools-mono/GodotSharp/Mono/etc Godot_mono.app/Contents/Resources/GodotSharp/Mono
|
||||
chmod +x Godot_mono.app/Contents/MacOS/Godot
|
||||
zip -q -9 -r "mono/release-${GODOT_VERSION}/Godot_v${GODOT_VERSION}_mono_osx.64.zip" Godot_mono.app
|
||||
@@ -266,7 +262,11 @@ cp out/javascript/godot.javascript.opt.debug.zip templates/webassembly_debug.zip
|
||||
|
||||
# Android
|
||||
|
||||
cp out/android/*.apk templates
|
||||
cp out/android/templates/*.apk templates
|
||||
cp out/android/templates/android_source.zip templates
|
||||
|
||||
cp out/android/templates-mono/*.apk mono/templates
|
||||
cp out/android/templates-mono/android_source.zip mono/templates
|
||||
|
||||
# iOS
|
||||
|
||||
|
||||
@@ -15,7 +15,8 @@ mkdir godot
|
||||
cd godot
|
||||
tar xf /root/godot.tar.gz --strip-components=1
|
||||
|
||||
cp /root/mono-glue/*.cpp modules/mono/glue
|
||||
cp /root/mono-glue/*.cpp modules/mono/glue/
|
||||
cp -r /root/mono-glue/Managed/Generated modules/mono/glue/Managed/
|
||||
|
||||
$SCONS platform=windows bits=32 $OPTIONS tools=yes target=release_debug
|
||||
mkdir -p /root/out/x86/tools
|
||||
@@ -28,13 +29,13 @@ mkdir -p /root/out/x86/templates
|
||||
cp -rvp bin/* /root/out/x86/templates
|
||||
rm -rf bin
|
||||
|
||||
$SCONS platform=windows bits=32 $OPTIONS $OPTIONS_MONO tools=yes target=release_debug copy_mono_root=yes
|
||||
$SCONS platform=windows bits=32 $OPTIONS $OPTIONS_MONO mono_prefix=$MONO32_PREFIX tools=yes target=release_debug copy_mono_root=yes
|
||||
mkdir -p /root/out/x86/tools-mono
|
||||
cp -rvp bin/* /root/out/x86/tools-mono
|
||||
rm -rf bin
|
||||
|
||||
$SCONS platform=windows bits=32 $OPTIONS $OPTIONS_MONO tools=no target=release_debug
|
||||
$SCONS platform=windows bits=32 $OPTIONS $OPTIONS_MONO tools=no target=release
|
||||
$SCONS platform=windows bits=32 $OPTIONS $OPTIONS_MONO mono_prefix=$MONO32_PREFIX tools=no target=release_debug
|
||||
$SCONS platform=windows bits=32 $OPTIONS $OPTIONS_MONO mono_prefix=$MONO32_PREFIX tools=no target=release
|
||||
mkdir -p /root/out/x86/templates-mono
|
||||
cp -rvp bin/* /root/out/x86/templates-mono
|
||||
rm -rf bin
|
||||
@@ -50,13 +51,13 @@ mkdir -p /root/out/x64/templates
|
||||
cp -rvp bin/* /root/out/x64/templates
|
||||
rm -rf bin
|
||||
|
||||
$SCONS platform=windows bits=64 $OPTIONS $OPTIONS_MONO tools=yes target=release_debug copy_mono_root=yes
|
||||
$SCONS platform=windows bits=64 $OPTIONS $OPTIONS_MONO mono_prefix=$MONO64_PREFIX tools=yes target=release_debug copy_mono_root=yes
|
||||
mkdir -p /root/out/x64/tools-mono
|
||||
cp -rvp bin/* /root/out/x64/tools-mono
|
||||
rm -rf bin
|
||||
|
||||
$SCONS platform=windows bits=64 $OPTIONS $OPTIONS_MONO tools=no target=release_debug
|
||||
$SCONS platform=windows bits=64 $OPTIONS $OPTIONS_MONO tools=no target=release
|
||||
$SCONS platform=windows bits=64 $OPTIONS $OPTIONS_MONO mono_prefix=$MONO64_PREFIX tools=no target=release_debug
|
||||
$SCONS platform=windows bits=64 $OPTIONS $OPTIONS_MONO mono_prefix=$MONO64_PREFIX tools=no target=release
|
||||
mkdir -p /root/out/x64/templates-mono
|
||||
cp -rvp bin/* /root/out/x64/templates-mono
|
||||
rm -rf bin
|
||||
|
||||
Reference in New Issue
Block a user