Skip to content
Draft
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
13 changes: 13 additions & 0 deletions build-macos/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 14 additions & 1 deletion build-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure if there's an official public source to download these libs and how to handle it.

Copy link
Member

Choose a reason for hiding this comment

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

Seems like the official download is: https://partner.steamgames.com/downloads/steamworks_sdk.zip

I cannot seem to download it properly with curl, but it redirects to a steamworks_sdk_162.zip and that seems to match a curlable URL (and a fixed version is better for reproducibility anyway).

https://partner.steamgames.com/downloads/steamworks_sdk_162.zip

chmod +x Godot.app/Contents/MacOS/Godot
zip -q -9 -r "${reldir}/${binname}_steam.zip" Godot.app
Copy link
Member

Choose a reason for hiding this comment

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

We should likely put it in another location than ${reldir}, otherwise we're going to upload it to our GitHub releases when it's not really relevant there. I guess just in the root folder (like we do with Godot.app) and then rm both after unzipping to the ${steamdir}.

rm -rf Godot.app
sign_macos ${reldir} ${binname}_steam 0
unzip ${reldir}/${binname}_steam.zip -d ${steamdir}/
fi

## Web (Classical) ##
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down