From e5b32f9e57523f49ad6afbb461337fc3fc2465e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pa=CC=84vels=20Nadtoc=CC=8Cajevs?= <7645683+bruvzg@users.noreply.github.com> Date: Mon, 13 Oct 2025 09:39:37 +0300 Subject: [PATCH] Build Steam versions of macOS editor. --- build-macos/build.sh | 13 +++++++++++++ build-release.sh | 15 ++++++++++++++- build.sh | 2 +- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/build-macos/build.sh b/build-macos/build.sh index e35ae05..6fc974d 100755 --- a/build-macos/build.sh +++ b/build-macos/build.sh @@ -27,6 +27,19 @@ if [ "${CLASSICAL}" == "1" ]; then cp -rvp bin/* /root/out/tools rm -rf bin + if [ "${STEAM}" == "1" ]; then + build_name=${BUILD_NAME} + export BUILD_NAME="steam" + $SCONS platform=macos arch=x86_64 $OPTIONS target=editor steamapi=yes + $SCONS platform=macos arch=arm64 $OPTIONS target=editor steamapi=yes + lipo -create bin/godot.macos.editor.x86_64 bin/godot.macos.editor.arm64 -output bin/godot.macos.editor.universal + + mkdir -p /root/out/steam + cp -rvp bin/* /root/out/steam + rm -rf bin + export BUILD_NAME=${build_name} + fi + $SCONS platform=macos $OPTIONS arch=x86_64 target=template_debug $SCONS platform=macos $OPTIONS arch=arm64 target=template_debug lipo -create bin/godot.macos.template_debug.x86_64 bin/godot.macos.template_debug.arm64 -output bin/godot.macos.template_debug.universal diff --git a/build-release.sh b/build-release.sh index 18c5448..1febe59 100755 --- a/build-release.sh +++ b/build-release.sh @@ -319,7 +319,20 @@ if [ "${build_classical}" == "1" ]; then unzip ${reldir}/${godot_basename}_linux.x86_32.zip -d ${steamdir}/ mv ${steamdir}/{${godot_basename}_linux.x86_64,godot.x11.opt.tools.64} mv ${steamdir}/{${godot_basename}_linux.x86_32,godot.x11.opt.tools.32} - unzip ${reldir}/${godot_basename}_macos.universal -d ${steamdir}/ + fi + + if [ -d out/macos/steam ]; then + binname="${godot_basename}_macos.universal" + rm -rf Godot.app + cp -r git/misc/dist/macos_tools.app Godot.app + mkdir -p Godot.app/Contents/MacOS + cp out/macos/steam/godot.macos.editor.universal Godot.app/Contents/MacOS/Godot + #cp libsteam_api.dylib Godot.app/Contents/Frameworks/libsteam_api.dylib + chmod +x Godot.app/Contents/MacOS/Godot + zip -q -9 -r "${reldir}/${binname}_steam.zip" Godot.app + rm -rf Godot.app + sign_macos ${reldir} ${binname}_steam 0 + unzip ${reldir}/${binname}_steam.zip -d ${steamdir}/ fi ## Web (Classical) ## diff --git a/build.sh b/build.sh index 4e8e72b..aeb50ef 100755 --- a/build.sh +++ b/build.sh @@ -263,7 +263,7 @@ mkdir -p ${basedir}/out/web ${podman_run} -v ${basedir}/build-web:/root/build -v ${basedir}/out/web:/root/out localhost/godot-web:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/web mkdir -p ${basedir}/out/macos -${podman_run} -v ${basedir}/build-macos:/root/build -v ${basedir}/out/macos:/root/out -v ${basedir}/deps/accesskit:/root/accesskit -v ${basedir}/deps/moltenvk:/root/moltenvk -v ${basedir}/deps/angle:/root/angle localhost/godot-osx:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/macos +${podman_run} -v ${basedir}/build-macos:/root/build -v ${basedir}/out/macos:/root/out -v ${basedir}/deps/accesskit:/root/accesskit -v ${basedir}/deps/moltenvk:/root/moltenvk -v ${basedir}/deps/angle:/root/angle --env STEAM=${build_steam} localhost/godot-osx:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/macos mkdir -p ${basedir}/out/android ${podman_run} -v ${basedir}/build-android:/root/build -v ${basedir}/out/android:/root/out -v ${basedir}/deps/swappy:/root/swappy -v ${basedir}/deps/keystore:/root/keystore localhost/godot-android:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/android