Skip to content

Commit df099c1

Browse files
committed
tvOS build script
1 parent 7024ac7 commit df099c1

File tree

3 files changed

+62
-0
lines changed

3 files changed

+62
-0
lines changed

build-release.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,19 @@ if [ "${build_classical}" == "1" ]; then
203203
cd ..
204204
rm -rf ios_xcode
205205

206+
207+
## tvOS (Classical) ##
208+
209+
rm -rf tvos_xcode
210+
cp -r git/misc/dist/tvos_xcode tvos_xcode
211+
cp out/tvos/templates/libgodot.tvos.opt.fat tvos_xcode/libgodot.tvos.release.fat.a
212+
cp out/tvos/templates/libgodot.tvos.opt.debug.fat tvos_xcode/libgodot.tvos.debug.fat.a
213+
chmod +x tvos_xcode/libgodot.tvos.*
214+
cd tvos_xcode
215+
zip -q -9 -r "${templatesdir}/tvos.zip" *
216+
cd ..
217+
rm -rf tvos_xcode
218+
206219
## UWP (Classical) ##
207220

208221
if [ ! -d "angle" ]; then

build-tvos/build.sh

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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 use_lto=yes 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 use_lto=yes 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+
36+
$SCONS platform=tvos $OPTIONS arch=x86_64 simulator=yes tools=no target=release_debug \
37+
TVOSSDK="/root/ioscross/x86_64/SDK/AppleTVSimulator${TVOS_SDK}.sdk" TVOSPATH="/root/ioscross/x86_64/" tvos_triple="x86_64-apple-darwin11-"
38+
$SCONS platform=tvos $OPTIONS arch=x86_64 simulator=yes tools=no target=release \
39+
TVOSSDK="/root/ioscross/x86_64/SDK/AppleTVSimulator${TVOS_SDK}.sdk" TVOSPATH="/root/ioscross/x86_64/" tvos_triple="x86_64-apple-darwin11-"
40+
41+
mkdir -p /root/out/templates
42+
$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
43+
$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
44+
fi
45+
46+
echo "tvOS build successful"

build.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,9 @@ ${podman_run} -v ${basedir}/build-android:/root/build -v ${basedir}/out/android:
194194
mkdir -p ${basedir}/out/ios
195195
${podman_run} -v ${basedir}/build-ios:/root/build -v ${basedir}/out/ios:/root/out localhost/godot-ios:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/ios
196196

197+
mkdir -p ${basedir}/out/tvos
198+
${podman_run} -v ${basedir}/build-tvos:/root/build -v ${basedir}/out/tvos:/root/out localhost/godot-tvos:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/tvos
199+
197200
mkdir -p ${basedir}/out/server/x64
198201
${podman_run} -v ${basedir}/build-server:/root/build -v ${basedir}/out/server/x64:/root/out localhost/godot-ubuntu-64:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/server
199202

0 commit comments

Comments
 (0)