Skip to content

Commit

Permalink
tvOS build script
Browse files Browse the repository at this point in the history
  • Loading branch information
naithar committed Feb 13, 2021
1 parent 7024ac7 commit 74623b5
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 0 deletions.
13 changes: 13 additions & 0 deletions build-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,19 @@ if [ "${build_classical}" == "1" ]; then
cd ..
rm -rf ios_xcode


## tvOS (Classical) ##

rm -rf tvos_xcode
cp -r git/misc/dist/tvos_xcode tvos_xcode
cp out/tvos/templates/libgodot.tvos.opt.fat tvos_xcode/libgodot.tvos.release.fat.a
cp out/tvos/templates/libgodot.tvos.opt.debug.fat tvos_xcode/libgodot.tvos.debug.fat.a
chmod +x tvos_xcode/libgodot.tvos.*
cd tvos_xcode
zip -q -9 -r "${templatesdir}/tvos.zip" *
cd ..
rm -rf tvos_xcode

## UWP (Classical) ##

if [ ! -d "angle" ]; then
Expand Down
43 changes: 43 additions & 0 deletions build-tvos/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/bin/bash

set -e

# Config

export BUILD_NAME=official
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
export OPTIONS="debug_symbols=no"
export OPTIONS_MONO="module_mono_enabled=yes mono_static=yes"
export TERM=xterm

export TVOS_SDK="14.2"
export TVOS_LIPO="/root/ioscross/arm64/bin/arm-apple-darwin11-lipo"

rm -rf godot
mkdir godot
cd godot
tar xf /root/godot.tar.gz --strip-components=1

# Classical

if [ "${CLASSICAL}" == "1" ]; then
echo "Starting classical build for tvOS..."

$SCONS platform=tvos $OPTIONS arch=arm64 tools=no target=release_debug \
TVOSSDK="/root/ioscross/arm64/SDK/AppleTVOS${TVOS_SDK}.sdk" TVOSPATH="/root/ioscross/arm64/" tvos_triple="arm-apple-darwin11-"
$SCONS platform=tvos $OPTIONS arch=arm64 tools=no target=release \
TVOSSDK="/root/ioscross/arm64/SDK/AppleTVOS${TVOS_SDK}.sdk" TVOSPATH="/root/ioscross/arm64/" tvos_triple="arm-apple-darwin11-"

# tvOS Simulator

$SCONS platform=tvos $OPTIONS arch=x86_64 simulator=yes tools=no target=release_debug \
TVOSSDK="/root/ioscross/x86_64/SDK/AppleTVSimulator${TVOS_SDK}.sdk" TVOSPATH="/root/ioscross/x86_64/" tvos_triple="x86_64-apple-darwin11-"
$SCONS platform=tvos $OPTIONS arch=x86_64 simulator=yes tools=no target=release \
TVOSSDK="/root/ioscross/x86_64/SDK/AppleTVSimulator${TVOS_SDK}.sdk" TVOSPATH="/root/ioscross/x86_64/" tvos_triple="x86_64-apple-darwin11-"

mkdir -p /root/out/templates
$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
$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
fi

echo "tvOS build successful"
3 changes: 3 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,9 @@ ${podman_run} -v ${basedir}/build-android:/root/build -v ${basedir}/out/android:
mkdir -p ${basedir}/out/ios
${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

mkdir -p ${basedir}/out/tvos
${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

mkdir -p ${basedir}/out/server/x64
${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

Expand Down

0 comments on commit 74623b5

Please sign in to comment.