mirror of
https://github.com/godotengine/godot-build-scripts.git
synced 2026-02-25 06:33:22 +03:00
Build Steam version of macOS editor. (#131)
This commit is contained in:
@@ -28,6 +28,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
|
||||
|
||||
@@ -192,7 +192,7 @@ if [ "${do_cleanup}" == "1" ]; then
|
||||
mkdir -p ${templatesdir_mono}
|
||||
mkdir -p ${templatesdir_dotnet}
|
||||
mkdir -p ${webdir}
|
||||
if [ -d out/windows/steam ]; then
|
||||
if [ -d out/windows/steam -o -d out/macos/steam ]; then
|
||||
mkdir -p ${steamdir}
|
||||
fi
|
||||
|
||||
@@ -329,11 +329,28 @@ if [ "${build_classical}" == "1" ]; then
|
||||
cp out/windows/steam/godot.windows.editor.x86_32.exe ${steamdir}/godot.windows.opt.tools.32.exe
|
||||
sign_windows ${steamdir}/godot.windows.opt.tools.64.exe
|
||||
sign_windows ${steamdir}/godot.windows.opt.tools.32.exe
|
||||
cp deps/steam/steam_api{,64}.dll ${steamdir}/
|
||||
|
||||
# Also copy and rename regular Linux builds for convenience to deploy to Steam.
|
||||
unzip ${reldir}/${godot_basename}_linux.x86_64.zip -d ${steamdir}/
|
||||
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/{Frameworks,MacOS}
|
||||
cp out/macos/steam/godot.macos.editor.universal Godot.app/Contents/MacOS/Godot
|
||||
cp deps/steam/libsteam_api.dylib Godot.app/Contents/Frameworks/libsteam_api.dylib
|
||||
chmod +x Godot.app/Contents/MacOS/Godot
|
||||
zip -q -9 -r "${binname}_steam.zip" Godot.app
|
||||
rm -rf Godot.app
|
||||
sign_macos . ${binname}_steam Godot.app
|
||||
unzip ${binname}_steam.zip -d ${steamdir}/
|
||||
rm -f ${binname}_steam.zip
|
||||
fi
|
||||
|
||||
## Web (Classical) ##
|
||||
|
||||
13
build.sh
13
build.sh
@@ -230,6 +230,17 @@ if [ ! -d "deps/keystore" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# Steam SDK library for official Steam editor release.
|
||||
if [ ! -d "deps/steam" ]; then
|
||||
base_url=https://github.com/rlabrecque/SteamworksSDK/raw/494c2d680b9e47bbc369496b57568f44ef2f6796/redistributable_bin
|
||||
mkdir -p deps/steam
|
||||
pushd deps/steam
|
||||
curl -LO ${base_url}/steam_api.dll
|
||||
curl -LO ${base_url}/win64/steam_api64.dll
|
||||
curl -LO ${base_url}/osx/libsteam_api.dylib
|
||||
popd
|
||||
fi
|
||||
|
||||
if [ "${skip_git_checkout}" == 0 ]; then
|
||||
git clone https://github.com/godotengine/godot git || /bin/true
|
||||
pushd git
|
||||
@@ -276,7 +287,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
|
||||
|
||||
Reference in New Issue
Block a user