Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build-ios/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ set -e
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no redirect_build_objects=no"
# Keep LTO disabled for iOS - it works but it makes linking apps on deploy very slow,
# which is seen as a regression in the current workflow.
export OPTIONS="production=yes use_lto=no SWIFT_FRONTEND=/root/.local/share/swiftly/toolchains/6.2.1/usr/bin/swift-frontend"
export OPTIONS="production=yes use_lto=no SWIFT_FRONTEND=/root/.local/share/swiftly/toolchains/6.3.0/usr/bin/swift-frontend"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should add a SWIFT_VERSION env to Dockerfile.osx so we can reuse it here and in the other places.

export OPTIONS_MONO="module_mono_enabled=yes"
export OPTIONS_DOTNET="module_dotnet_enabled=yes"
export TERM=xterm

export IOS_SDK="26.1"
export IOS_SDK="26.4"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could tackle this in a follow-up, but we could also expose this as an env variable so we don't need to adjust build scripts every time we update the SDKs.

export IOS_DEVICE="IOS_SDK_PATH=/root/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS${IOS_SDK}.sdk"
export IOS_SIMULATOR="IOS_SDK_PATH=/root/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator${IOS_SDK}.sdk simulator=yes"
export APPLE_TARGET_ARM64="APPLE_TOOLCHAIN_PATH=/root/ioscross/arm64 apple_target_triple=arm-apple-darwin11-"
Expand Down
58 changes: 58 additions & 0 deletions build-tvos/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/bin/bash

set -e

# Config

export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no redirect_build_objects=no"
# Keep LTO disabled for tvOS - it works but it makes linking apps on deploy very slow,
# which is seen as a regression in the current workflow (mirrors the iOS build).
export OPTIONS="production=yes use_lto=no vulkan=no opengl3=no SWIFT_FRONTEND=/root/.local/share/swiftly/toolchains/6.3.0/usr/bin/swift-frontend"
export OPTIONS_MONO="module_mono_enabled=yes"
export OPTIONS_DOTNET=
export TERM=xterm

export TVOS_SDK="26.4"
export TVOS_DEVICE="TVOS_SDK_PATH=/root/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS${TVOS_SDK}.sdk"
export APPLE_TARGET_ARM64="APPLE_TOOLCHAIN_PATH=/root/ioscross/arm64 apple_target_triple=arm-apple-darwin11-"

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..."

# arm64 device
$SCONS platform=tvos $OPTIONS arch=arm64 target=template_debug $TVOS_DEVICE $APPLE_TARGET_ARM64
$SCONS platform=tvos $OPTIONS arch=arm64 target=template_release $TVOS_DEVICE $APPLE_TARGET_ARM64

# tvOS simulator builds are intentionally not produced.

mkdir -p /root/out/templates
cp bin/libgodot.tvos.template_release.arm64.a /root/out/templates/libgodot.tvos.a
cp bin/libgodot.tvos.template_debug.arm64.a /root/out/templates/libgodot.tvos.debug.a
fi

# Mono

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

cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/

# arm64 device
$SCONS platform=tvos $OPTIONS $OPTIONS_MONO arch=arm64 target=template_debug $TVOS_DEVICE $APPLE_TARGET_ARM64
$SCONS platform=tvos $OPTIONS $OPTIONS_MONO arch=arm64 target=template_release $TVOS_DEVICE $APPLE_TARGET_ARM64

# tvOS simulator builds are intentionally not produced.

mkdir -p /root/out/templates-mono
cp bin/libgodot.tvos.template_release.arm64.a /root/out/templates-mono/libgodot.tvos.a
cp bin/libgodot.tvos.template_debug.arm64.a /root/out/templates-mono/libgodot.tvos.debug.a
fi

echo "tvOS build successful"
4 changes: 2 additions & 2 deletions build-visionos/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no redirect_
# Keep LTO disabled for visionOS - it works but it makes linking apps on deploy very slow,
# which is seen as a regression in the current workflow.
# Disable Vulkan and MoltenVK for visionOS - visionOS doesn't support MoltenVK.
export OPTIONS="production=yes use_lto=no vulkan=no SWIFT_FRONTEND=/root/.local/share/swiftly/toolchains/6.2.0/usr/bin/swift-frontend"
export OPTIONS="production=yes use_lto=no vulkan=no SWIFT_FRONTEND=/root/.local/share/swiftly/toolchains/6.3.0/usr/bin/swift-frontend"
export OPTIONS_MONO="module_mono_enabled=yes"
export OPTIONS_DOTNET="module_dotnet_enabled=yes"
export TERM=xterm

export VISIONOS_SDK="26.0"
export VISIONOS_SDK="26.4"
export VISIONOS_DEVICE="VISIONOS_SDK_PATH=/root/Xcode.app/Contents/Developer/Platforms/XROS.platform/Developer/SDKs/XROS${VISIONOS_SDK}.sdk"
export VISIONOS_SIMULATOR="VISIONOS_SDK_PATH=/root/Xcode.app/Contents/Developer/Platforms/XRSimulator.platform/Developer/SDKs/XRSimulator${VISIONOS_SDK}.sdk"
export APPLE_TARGET_ARM64="APPLE_TOOLCHAIN_PATH=/root/ioscross/arm64 apple_target_triple=arm-apple-darwin11-"
Expand Down