Skip to content

Commit edd1194

Browse files
committed
macOS and iOS: Link MoltenVK statically
Also move angle to a 'deps' folder for all downloaded or manually copied deps used by the builds.
1 parent 6463e8b commit edd1194

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

build-macosx/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -e
55
# Config
66

77
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
8-
export OPTIONS="osxcross_sdk=darwin21.4 production=yes"
8+
export OPTIONS="osxcross_sdk=darwin21.4 production=yes use_static_mvk=yes VULKAN_SDK_PATH=/root/vulkansdk"
99
export OPTIONS_MONO="module_mono_enabled=yes mono_static=yes"
1010
export MONO_PREFIX_X86_64="/root/mono-installs/desktop-osx-x86_64-release"
1111
export MONO_PREFIX_ARM64="/root/mono-installs/desktop-osx-arm64-release"

build-release.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,8 @@ if [ "${build_classical}" == "1" ]; then
284284
cp out/ios/templates/libgodot.iphone.debug.simulator.a ios_xcode/libgodot.iphone.debug.xcframework/ios-arm64_x86_64-simulator/libgodot.a
285285
cp out/ios/templates/libgodot.iphone.a ios_xcode/libgodot.iphone.release.xcframework/ios-arm64/libgodot.a
286286
cp out/ios/templates/libgodot.iphone.debug.a ios_xcode/libgodot.iphone.debug.xcframework/ios-arm64/libgodot.a
287+
cp -r deps/vulkansdk-macos/MoltenVK/MoltenVK.xcframework ios_xcode/
288+
rm -rf ios_xcode/MoltenVK.xcframework/{macos,tvos}*
287289
cd ios_xcode
288290
zip -q -9 -r "${templatesdir}/iphone.zip" *
289291
cd ..
@@ -486,6 +488,8 @@ if [ "${build_mono}" == "1" ]; then
486488
cp out/ios/templates-mono/libgodot.iphone.debug.simulator.a ios_xcode/libgodot.iphone.debug.xcframework/ios-arm64_x86_64-simulator/libgodot.a
487489
cp out/ios/templates-mono/libgodot.iphone.a ios_xcode/libgodot.iphone.release.xcframework/ios-arm64/libgodot.a
488490
cp out/ios/templates-mono/libgodot.iphone.debug.a ios_xcode/libgodot.iphone.debug.xcframework/ios-arm64/libgodot.a
491+
cp -r deps/vulkansdk-macos/MoltenVK/MoltenVK.xcframework ios_xcode/
492+
rm -rf ios_xcode/MoltenVK.xcframework/{macos,tvos}*
489493
cd ios_xcode
490494
zip -q -9 -r "${templatesdir_mono}/iphone.zip" *
491495
cd ..

build.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,11 @@ if [ $skip_download == 0 ]; then
145145
fi
146146
fi
147147

148+
# macOS and iOS need the Vulkan SDK
149+
if [ ! -d "deps/vulkansdk-macos" ]; then
150+
echo "Missing Vulkan SDK for macOS, we're going to run into issues!"
151+
fi
152+
148153
if [ "${skip_git_checkout}" == 0 ]; then
149154
git clone https://github.com/godotengine/godot git || /bin/true
150155
pushd git
@@ -197,7 +202,7 @@ ${podman_run} -v ${basedir}/build-linux:/root/build -v ${basedir}/out/linux:/roo
197202
#${podman_run} -v ${basedir}/build-javascript:/root/build -v ${basedir}/out/javascript:/root/out localhost/godot-javascript:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/javascript
198203

199204
mkdir -p ${basedir}/out/macosx
200-
${podman_run} -v ${basedir}/build-macosx:/root/build -v ${basedir}/out/macosx:/root/out localhost/godot-osx:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/macosx
205+
${podman_run} -v ${basedir}/build-macosx:/root/build -v ${basedir}/out/macosx:/root/out -v ${basedir}/deps/vulkansdk-macos:/root/vulkansdk localhost/godot-osx:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/macosx
201206

202207
mkdir -p ${basedir}/out/android
203208
${podman_run} -v ${basedir}/build-android:/root/build -v ${basedir}/out/android:/root/out localhost/godot-android:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/android

0 commit comments

Comments
 (0)