|
| 1 | +#!/bin/bash |
| 2 | + |
| 3 | +set -e |
| 4 | + |
| 5 | +# Config |
| 6 | + |
| 7 | +export BUILD_NAME=official |
| 8 | +export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no" |
| 9 | +export OPTIONS="production=yes" |
| 10 | +export OPTIONS_MONO="module_mono_enabled=yes mono_static=yes" |
| 11 | +export TERM=xterm |
| 12 | + |
| 13 | +export TVOS_SDK="14.2" |
| 14 | +export TVOS_LIPO="/root/ioscross/arm64/bin/arm-apple-darwin11-lipo" |
| 15 | + |
| 16 | +rm -rf godot |
| 17 | +mkdir godot |
| 18 | +cd godot |
| 19 | +tar xf /root/godot.tar.gz --strip-components=1 |
| 20 | + |
| 21 | +# Classical |
| 22 | + |
| 23 | +if [ "${CLASSICAL}" == "1" ]; then |
| 24 | + echo "Starting classical build for tvOS..." |
| 25 | + |
| 26 | + # tvOS Device |
| 27 | + # use_lto is required for Linux-compiled binary to pass App Store checks |
| 28 | + |
| 29 | + $SCONS platform=tvos $OPTIONS arch=arm64 tools=no target=release_debug \ |
| 30 | + TVOSSDK="/root/ioscross/arm64/SDK/AppleTVOS${TVOS_SDK}.sdk" TVOSPATH="/root/ioscross/arm64/" tvos_triple="arm-apple-darwin11-" |
| 31 | + $SCONS platform=tvos $OPTIONS arch=arm64 tools=no target=release \ |
| 32 | + TVOSSDK="/root/ioscross/arm64/SDK/AppleTVOS${TVOS_SDK}.sdk" TVOSPATH="/root/ioscross/arm64/" tvos_triple="arm-apple-darwin11-" |
| 33 | + |
| 34 | + # tvOS Simulator |
| 35 | + # simulators do not requre `use_lto` to work, so it's diabled to decrease build times. |
| 36 | + |
| 37 | + $SCONS platform=tvos $OPTIONS arch=x86_64 simulator=yes tools=no use_lto=no target=release_debug \ |
| 38 | + TVOSSDK="/root/ioscross/x86_64/SDK/AppleTVSimulator${TVOS_SDK}.sdk" TVOSPATH="/root/ioscross/x86_64/" tvos_triple="x86_64-apple-darwin11-" |
| 39 | + $SCONS platform=tvos $OPTIONS arch=x86_64 simulator=yes tools=no use_lto=no target=release \ |
| 40 | + TVOSSDK="/root/ioscross/x86_64/SDK/AppleTVSimulator${TVOS_SDK}.sdk" TVOSPATH="/root/ioscross/x86_64/" tvos_triple="x86_64-apple-darwin11-" |
| 41 | + |
| 42 | + mkdir -p /root/out/templates |
| 43 | + $TVOS_LIPO -create bin/libgodot.tvos.opt.arm64.a bin/libgodot.tvos.opt.x86_64.simulator.a -output /root/out/templates/libgodot.tvos.opt.fat |
| 44 | + $TVOS_LIPO -create bin/libgodot.tvos.opt.debug.arm64.a bin/libgodot.tvos.opt.debug.x86_64.simulator.a -output /root/out/templates/libgodot.tvos.opt.debug.fat |
| 45 | +fi |
| 46 | + |
| 47 | +echo "tvOS build successful" |
0 commit comments