From 1fd68f9720542af9c85b4123de7571a5ef0ff962 Mon Sep 17 00:00:00 2001 From: Relintai Date: Sun, 21 Apr 2024 04:40:47 +0200 Subject: [PATCH] IOS build scripts. --- misc/build-containers/build_all.sh | 30 +++++++++------ .../engine_build_scripts/ios.sh | 37 +++++++++++++++++++ 2 files changed, 56 insertions(+), 11 deletions(-) create mode 100644 misc/build-containers/engine_build_scripts/ios.sh diff --git a/misc/build-containers/build_all.sh b/misc/build-containers/build_all.sh index 6e0e321fd..28f78423c 100755 --- a/misc/build-containers/build_all.sh +++ b/misc/build-containers/build_all.sh @@ -47,23 +47,24 @@ fi # bash /root/engine_build_scripts/android.sh "$@" 2>&1 | tee logs/android.log # OSX Build +#docker run ${custom_envvars} \ +# -v ${basedir}/engine_build_scripts:/root/engine_build_scripts \ +# -v ${project_root}:/root/project \ +# -w /root/project pandemonium-osx:${img_version} \ +# bash /root/engine_build_scripts/osx.sh "$@" 2>&1 | tee logs/osx.log + + +# iOS Build docker run ${custom_envvars} \ -v ${basedir}/engine_build_scripts:/root/engine_build_scripts \ -v ${project_root}:/root/project \ - -w /root/project pandemonium-osx:${img_version} \ - bash /root/engine_build_scripts/osx.sh "$@" 2>&1 | tee logs/osx.log - - - -exit 1 - -#ios -#docker run ${custom_envvars} -v ${project_root}:/root/project -w /root/project pandemonium-ios:${img_version} scons bir_strip "$@" . 2>&1 | tee logs/bir.log - -# docker run ${custom_envvars} -v ${project_root}:/root/project -i -w /root/project -t pandemonium-windows:${img_version} scons bew "$@" + -w /root/project pandemonium-ios:${img_version} \ + bash /root/engine_build_scripts/ios.sh "$@" 2>&1 | tee logs/ios.log # Check files +exit 1 + cd ./bin/ files=( @@ -135,6 +136,13 @@ files=( "pandemonium.osx.opt.tools.arm64" "pandemonium.osx.opt.tools.x86_64" + + # iOS + "libpandemonium.iphone.opt.arm64.a" + "libpandemonium.iphone.opt.debug.arm64.a" + + "libpandemonium.iphone.opt.debug.x86_64.simulator.a" + "libpandemonium.iphone.opt.x86_64.simulator.a" ) error=0 diff --git a/misc/build-containers/engine_build_scripts/ios.sh b/misc/build-containers/engine_build_scripts/ios.sh new file mode 100644 index 000000000..2ec4aabad --- /dev/null +++ b/misc/build-containers/engine_build_scripts/ios.sh @@ -0,0 +1,37 @@ +#!/bin/bash +set -e + +export IOS_SDK="17.2" +export IOS_LIPO="/root/ioscross/arm64/bin/arm-apple-darwin11-lipo" +#export OPTIONS="platform=iphone production=yes use_lto=none" +export OPTIONS="platform=iphone" + +# arm64 device +scons $OPTIONS arch=arm64 ios_simulator=no tools=no target=release_debug \ + IPHONESDK="/root/ioscross/arm64/SDK/iPhoneOS${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/arm64/" ios_triple="arm-apple-darwin11-" "$@" + +scons $OPTIONS arch=arm64 ios_simulator=no tools=no target=release \ + IPHONESDK="/root/ioscross/arm64/SDK/iPhoneOS${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/arm64/" ios_triple="arm-apple-darwin11-" "$@" + +# arm64 simulator +# Disabled for now as it doesn't work with cctools-port and current LLVM. +# See https://github.com/godotengine/build-containers/pull/85. +# scons platform=ios $OPTIONS arch=arm64 ios_simulator=yes target=template_debug \ +# IOS_SDK_PATH="/root/ioscross/arm64_sim/SDK/iPhoneSimulator${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/arm64_sim/" ios_triple="arm-apple-darwin11-" +# scons platform=ios $OPTIONS arch=arm64 ios_simulator=yes target=template_release \ +# IOS_SDK_PATH="/root/ioscross/arm64_sim/SDK/iPhoneSimulator${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/arm64_sim/" ios_triple="arm-apple-darwin11-" + +# x86_64 simulator +scons $OPTIONS arch=x86_64 ios_simulator=yes tools=no target=release_debug \ + IPHONESDK="/root/ioscross/x86_64_sim/SDK/iPhoneSimulator${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/x86_64_sim/" ios_triple="x86_64-apple-darwin11-" "$@" + +scons $OPTIONS arch=x86_64 ios_simulator=yes tools=no target=release \ + IPHONESDK="/root/ioscross/x86_64_sim/SDK/iPhoneSimulator${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/x86_64_sim/" ios_triple="x86_64-apple-darwin11-" "$@" + +#cp bin/libgodot.ios.template_release.arm64.a /root/out/templates/libgodot.ios.a +#cp bin/libgodot.ios.template_debug.arm64.a /root/out/templates/libgodot.ios.debug.a +#$IOS_LIPO -create bin/libgodot.ios.template_release.arm64.simulator.a bin/libgodot.ios.template_release.x86_64.simulator.a -output /root/out/templates/libgodot.ios.simulator.a +#$IOS_LIPO -create bin/libgodot.ios.template_debug.arm64.simulator.a bin/libgodot.ios.template_debug.x86_64.simulator.a -output /root/out/templates/libgodot.ios.debug.simulator.a +#cp bin/libgodot.ios.template_release.x86_64.simulator.a /root/out/templates/libgodot.ios.simulator.a +#cp bin/libgodot.ios.template_debug.x86_64.simulator.a /root/out/templates/libgodot.ios.debug.simulator.a +