23 Commits
4.4 ... 3.6

Author SHA1 Message Date
Rémi Verschelde
ce8bb7e3a1 publish-release: Add -d argument to publish as draft release on GH (#135)
(cherry picked from commit fd3bd4ad89)
2025-10-29 10:54:43 +01:00
Rémi Verschelde
c05f818f80 publish-release: Fix command for uploading the web editor
This was missed when backporting the retry logic from 4.x.
2025-10-29 10:54:40 +01:00
Rémi Verschelde
6e3758c48b Update scripts for 3.7-f42-mono-6.12.0.206 containers (#132) 2025-10-14 23:56:59 +02:00
Rémi Verschelde
949462d076 Merge pull request #119 from godotengine/3.x-main-cherrypicks
Backport `publish-release.sh` and new Windows signing process from `main`
2025-06-25 16:07:19 +02:00
Rémi Verschelde
28b32ec09c UWP: Make build optional, we're lacking a reproducible container for it 2025-06-24 19:10:10 +02:00
Rémi Verschelde
70d191922c Update preferred IMAGE_VERSION in config.sh.in for Godot 3.6 2025-06-24 19:10:10 +02:00
Rémi Verschelde
c26d764616 Windows: Change code signing process to match new key
(cherry picked from commit 11046692e1)
2025-06-24 19:10:10 +02:00
Rémi Verschelde
1cbfc61289 publish-release: Add support to upload stable builds to GH and Steam
Didn't include EGS and itch.io as it's only relevant for the latest stable branch.

(cherry picked from commit 73402a1c9f)
2025-06-24 19:10:10 +02:00
Rémi Verschelde
512d8d197f Add script to publish releases everywhere
- GitHub godot-builds
- Web editor

Still missing instructions for uploading stable releases to stores, etc.

(cherry picked from commit 1e4dc88253)
2025-06-24 10:38:39 +02:00
Rémi Verschelde
1f44579b25 Adapt build scripts to run with passwordless sudo podman
(cherry picked from commit e0891e9fde)
2025-06-24 10:38:13 +02:00
Rémi Verschelde
4834ab1eab Backport clean scripts from main branch 2024-05-01 12:17:03 +02:00
Rémi Verschelde
9f297b5ef0 Merge pull request #93 from godotengine/3.x-update-f39-linux-arm64
[3.x] Update all to new toolchains, add Linux arm64 and arm32 builds
2024-01-18 10:41:23 +01:00
Rémi Verschelde
0d2fbefd04 Update all to new toolchains, add Linux arm64 and arm32 builds
Backport of #89 and #90, in sync with https://github.com/godotengine/build-containers/pull/135.

In the 3.x branch, the situation with `arch` and `bits` is very brittle,
so we only add the explicit `arch` argument for the arm32/arm64 builds.
x86_32 still relies on `bits=32`.

This would all be worth refactoring upstream like we did for 4.0, but
it's a major undertaking and breaking change, which I'd prefer to avoid
in 3.6.

For Linux builds, we move the `strip` calls to the link stage, as this
needs to be done with the arch-appropriate `strip` binary, so it's easier
done there. In `master`, we now let the compiler strip automatically
during the build if no debug symbols are requested, but this change
wasn't backported to 3.x.
2024-01-18 09:56:40 +01:00
Rémi Verschelde
952f0985e0 UWP: Fix logic to download and copy ANGLE
Fixup errors in #85.
2024-01-18 09:55:49 +01:00
bruvzg
682393f0b4 [macOS] Use notarytool instead of deprecated altool.
(cherry picked from commit 7b9e4271f4)
2023-10-31 18:56:40 +01:00
Rémi Verschelde
ee615c7c01 Merge pull request #85 from godotengine/3.x-update-angle-uwp
UWP: Update version of ANGLE DLLs
2023-10-04 01:14:11 +02:00
Rémi Verschelde
cc367acf4d UWP: Update version of ANGLE DLLs
Fixes #80.
2023-09-26 15:25:40 +02:00
Rémi Verschelde
09c443fa08 Revert unintended build.sh changes after #79 2023-08-15 09:18:05 +02:00
Rémi Verschelde
5cdccb9443 Merge pull request #79 from m4gr3d/add_logic_to_upload_to_maven_central_3x
[3.x] Add logic to upload the Godot Android library to MavenCentral
2023-05-25 09:31:53 +02:00
Fredia Huya-Kouadio
e37b348272 Add logic to upload the Godot Android library to MavenCentral
Add environment variables to sign the release build for the Godot
Android editor and to publish the library to MavenCentral.
If the environment vars are not defined, we do a simple unsigned
`release_debug` build for the Android editor.

Change `config.sh.in` template to use single quotes by default, to
prevent expanding special characters in environment variables.

To publish to MavenCentral, a new `build-android/upload-mavencentral.sh`
script is added. It needs to run after the build using gradle, but we
still want it to be optional and used only when making an official
release, so we copy the compiled sources in the first step.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2023-05-25 09:31:22 +02:00
Rémi Verschelde
77161dac92 Fix LTO overrides after upstream syntax change 2023-05-24 08:49:43 +02:00
Rémi Verschelde
4f89dc38b1 Merge pull request #77 from bruvzg/btls_mac
[Mono] Add ARM64 macOS BTLS library.
2023-02-09 22:58:18 +01:00
bruvzg
93ac9c068e [Mono] Add ARM64 macOS BTLS library. 2023-02-09 19:20:07 +02:00
23 changed files with 884 additions and 837 deletions

4
.gitignore vendored
View File

@@ -16,9 +16,5 @@ angle.7z
out/ out/
releases/ releases/
sha512sums/ sha512sums/
steam/
tmp/ tmp/
web/ web/
# macOS
.DS_Store

View File

@@ -6,14 +6,13 @@ set -e
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no" export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
export OPTIONS="production=yes" export OPTIONS="production=yes"
export OPTIONS_MONO="module_mono_enabled=yes" export OPTIONS_MONO="module_mono_enabled=yes mono_static=no"
export TERM=xterm export TERM=xterm
rm -rf godot rm -rf godot
mkdir godot mkdir godot
cd godot cd godot
tar xf /root/godot.tar.gz --strip-components=1 tar xf /root/godot.tar.gz --strip-components=1
cp -rf /root/swappy/* thirdparty/swappy-frame-pacing/
# Environment variables and keystore needed for signing store editor build, # Environment variables and keystore needed for signing store editor build,
# as well as signing and publishing to MavenCentral. # as well as signing and publishing to MavenCentral.
@@ -30,53 +29,41 @@ fi
if [ "${CLASSICAL}" == "1" ]; then if [ "${CLASSICAL}" == "1" ]; then
echo "Starting classical build for Android..." echo "Starting classical build for Android..."
$SCONS platform=android arch=arm32 $OPTIONS target=editor store_release=${store_release} $SCONS platform=android android_arch=armv7 $OPTIONS tools=yes target=release_debug store_release=$store_release
$SCONS platform=android arch=arm64 $OPTIONS target=editor store_release=${store_release} $SCONS platform=android android_arch=arm64v8 $OPTIONS tools=yes target=release_debug store_release=$store_release
$SCONS platform=android arch=x86_32 $OPTIONS target=editor store_release=${store_release} $SCONS platform=android android_arch=x86 $OPTIONS tools=yes target=release_debug store_release=$store_release
$SCONS platform=android arch=x86_64 $OPTIONS target=editor store_release=${store_release} $SCONS platform=android android_arch=x86_64 $OPTIONS tools=yes target=release_debug store_release=$store_release
pushd platform/android/java pushd platform/android/java
# Generate the regular Android editor.
./gradlew generateGodotEditor ./gradlew generateGodotEditor
# Generate the Android editor for HorizonOS devices.
./gradlew generateGodotHorizonOSEditor
# Generate the Android editor for PicoOS devices.
./gradlew generateGodotPicoOSEditor
popd popd
mkdir -p /root/out/tools mkdir -p /root/out/tools
# Copy the generated Android editor binaries (apk & aab). # Copy the generated Android editor binaries (apk & aab).
if [ "$store_release" == "yes" ]; then if [ "$store_release" == "yes" ]; then
cp bin/android_editor_builds/android_editor-android-release.apk /root/out/tools/android_editor.apk cp bin/android_editor_builds/android_editor-release.apk /root/out/tools/android_editor.apk
cp bin/android_editor_builds/android_editor-android-release.aab /root/out/tools/android_editor.aab cp bin/android_editor_builds/android_editor-release.aab /root/out/tools/android_editor.aab
# For the HorizonOS and PicoOS builds, we only copy the apk.
cp bin/android_editor_builds/android_editor-horizonos-release.apk /root/out/tools/android_editor_horizonos.apk
cp bin/android_editor_builds/android_editor-picoos-release.apk /root/out/tools/android_editor_picoos.apk
else else
cp bin/android_editor_builds/android_editor-android-debug.apk /root/out/tools/android_editor.apk cp bin/android_editor_builds/android_editor-debug.apk /root/out/tools/android_editor.apk
cp bin/android_editor_builds/android_editor-android-debug.aab /root/out/tools/android_editor.aab cp bin/android_editor_builds/android_editor-debug.aab /root/out/tools/android_editor.aab
# For the HorizonOS and PicoOS build, we only copy the apk.
cp bin/android_editor_builds/android_editor-horizonos-debug.apk /root/out/tools/android_editor_horizonos.apk
cp bin/android_editor_builds/android_editor-picoos-debug.apk /root/out/tools/android_editor_picoos.apk
fi fi
# Restart from a clean tarball, as we'll copy all the contents # Restart from a clean tarball, as we'll copy all the contents
# outside the container for the MavenCentral upload. # outside the container for the MavenCentral upload.
rm -rf /root/godot/* rm -rf /root/godot/*
tar xf /root/godot.tar.gz --strip-components=1 tar xf /root/godot.tar.gz --strip-components=1
cp -rf /root/swappy/* thirdparty/swappy-frame-pacing/
$SCONS platform=android arch=arm32 $OPTIONS target=template_debug $SCONS platform=android android_arch=armv7 $OPTIONS tools=no target=release_debug
$SCONS platform=android arch=arm32 $OPTIONS target=template_release $SCONS platform=android android_arch=armv7 $OPTIONS tools=no target=release
$SCONS platform=android arch=arm64 $OPTIONS target=template_debug $SCONS platform=android android_arch=arm64v8 $OPTIONS tools=no target=release_debug
$SCONS platform=android arch=arm64 $OPTIONS target=template_release $SCONS platform=android android_arch=arm64v8 $OPTIONS tools=no target=release
$SCONS platform=android arch=x86_32 $OPTIONS target=template_debug $SCONS platform=android android_arch=x86 $OPTIONS tools=no target=release_debug
$SCONS platform=android arch=x86_32 $OPTIONS target=template_release $SCONS platform=android android_arch=x86 $OPTIONS tools=no target=release
$SCONS platform=android arch=x86_64 $OPTIONS target=template_debug $SCONS platform=android android_arch=x86_64 $OPTIONS tools=no target=release_debug
$SCONS platform=android arch=x86_64 $OPTIONS target=template_release $SCONS platform=android android_arch=x86_64 $OPTIONS tools=no target=release
pushd platform/android/java pushd platform/android/java
./gradlew generateGodotTemplates ./gradlew generateGodotTemplates
@@ -94,7 +81,7 @@ if [ "${CLASSICAL}" == "1" ]; then
cp bin/android_source.zip /root/out/templates/ cp bin/android_source.zip /root/out/templates/
cp bin/android_debug.apk /root/out/templates/ cp bin/android_debug.apk /root/out/templates/
cp bin/android_release.apk /root/out/templates/ cp bin/android_release.apk /root/out/templates/
cp bin/godot-lib.template_release.aar /root/out/templates/ cp bin/godot-lib.release.aar /root/out/templates/
fi fi
# Mono # Mono
@@ -102,29 +89,33 @@ fi
if [ "${MONO}" == "1" ]; then if [ "${MONO}" == "1" ]; then
echo "Starting Mono build for Android..." echo "Starting Mono build for Android..."
cp /root/mono-glue/*.cpp modules/mono/glue/
cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/ cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/
$SCONS platform=android arch=arm32 $OPTIONS $OPTIONS_MONO target=template_debug $SCONS platform=android android_arch=armv7 $OPTIONS $OPTIONS_MONO mono_prefix=/root/mono-installs/android-armv7-release tools=no target=release_debug
$SCONS platform=android arch=arm32 $OPTIONS $OPTIONS_MONO target=template_release $SCONS platform=android android_arch=armv7 $OPTIONS $OPTIONS_MONO mono_prefix=/root/mono-installs/android-armv7-release tools=no target=release
$SCONS platform=android arch=arm64 $OPTIONS $OPTIONS_MONO target=template_debug $SCONS platform=android android_arch=arm64v8 $OPTIONS $OPTIONS_MONO mono_prefix=/root/mono-installs/android-arm64v8-release tools=no target=release_debug
$SCONS platform=android arch=arm64 $OPTIONS $OPTIONS_MONO target=template_release $SCONS platform=android android_arch=arm64v8 $OPTIONS $OPTIONS_MONO mono_prefix=/root/mono-installs/android-arm64v8-release tools=no target=release
$SCONS platform=android arch=x86_32 $OPTIONS $OPTIONS_MONO target=template_debug $SCONS platform=android android_arch=x86 $OPTIONS $OPTIONS_MONO mono_prefix=/root/mono-installs/android-x86-release tools=no target=release_debug
$SCONS platform=android arch=x86_32 $OPTIONS $OPTIONS_MONO target=template_release $SCONS platform=android android_arch=x86 $OPTIONS $OPTIONS_MONO mono_prefix=/root/mono-installs/android-x86-release tools=no target=release
$SCONS platform=android arch=x86_64 $OPTIONS $OPTIONS_MONO target=template_debug $SCONS platform=android android_arch=x86_64 $OPTIONS $OPTIONS_MONO mono_prefix=/root/mono-installs/android-x86_64-release tools=no target=release_debug
$SCONS platform=android arch=x86_64 $OPTIONS $OPTIONS_MONO target=template_release $SCONS platform=android android_arch=x86_64 $OPTIONS $OPTIONS_MONO mono_prefix=/root/mono-installs/android-x86_64-release tools=no target=release
pushd platform/android/java pushd platform/android/java
./gradlew generateGodotMonoTemplates ./gradlew generateGodotTemplates
popd popd
mkdir -p /root/out/templates-mono mkdir -p /root/out/templates-mono
cp bin/android_source.zip /root/out/templates-mono/ cp bin/android_source.zip /root/out/templates-mono/
cp bin/android_monoDebug.apk /root/out/templates-mono/android_debug.apk cp bin/android_debug.apk /root/out/templates-mono/
cp bin/android_monoRelease.apk /root/out/templates-mono/android_release.apk cp bin/android_release.apk /root/out/templates-mono/
cp bin/godot-lib.template_release.aar /root/out/templates-mono/ cp bin/godot-lib.release.aar /root/out/templates-mono/
mkdir -p /root/out/templates-mono/bcl
cp -r /root/mono-installs/android-bcl/* /root/out/templates-mono/bcl/
fi fi
echo "Android build successful" echo "Android build successful"

0
build-android/upload-mavencentral.sh Executable file → Normal file
View File

View File

@@ -7,8 +7,8 @@ set -e
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no" export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
# Keep LTO disabled for iOS - it works but it makes linking apps on deploy very slow, # 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. # which is seen as a regression in the current workflow.
export OPTIONS="production=yes use_lto=no" export OPTIONS="production=yes lto=none"
export OPTIONS_MONO="module_mono_enabled=yes" export OPTIONS_MONO="module_mono_enabled=yes mono_static=yes"
export TERM=xterm export TERM=xterm
export IOS_SDK="18.2" export IOS_SDK="18.2"
@@ -25,32 +25,32 @@ if [ "${CLASSICAL}" == "1" ]; then
echo "Starting classical build for iOS..." echo "Starting classical build for iOS..."
# arm64 device # arm64 device
$SCONS platform=ios $OPTIONS arch=arm64 ios_simulator=no target=template_debug \ $SCONS platform=iphone $OPTIONS arch=arm64 tools=no ios_simulator=no target=release_debug \
IOS_SDK_PATH="/root/ioscross/arm64/SDK/iPhoneOS${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/arm64/" ios_triple="arm-apple-darwin11-" IPHONESDK="/root/ioscross/arm64/SDK/iPhoneOS${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/arm64/" ios_triple="arm-apple-darwin11-"
$SCONS platform=ios $OPTIONS arch=arm64 ios_simulator=no target=template_release \ $SCONS platform=iphone $OPTIONS arch=arm64 tools=no ios_simulator=no target=release \
IOS_SDK_PATH="/root/ioscross/arm64/SDK/iPhoneOS${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/arm64/" ios_triple="arm-apple-darwin11-" IPHONESDK="/root/ioscross/arm64/SDK/iPhoneOS${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/arm64/" ios_triple="arm-apple-darwin11-"
# arm64 simulator # arm64 simulator
# Disabled for now as it doesn't work with cctools-port and current LLVM. # Disabled for now as it doesn't work with cctools-port and current LLVM.
# See https://github.com/godotengine/build-containers/pull/85. # See https://github.com/godotengine/build-containers/pull/85.
#$SCONS platform=ios $OPTIONS arch=arm64 ios_simulator=yes target=template_debug \ #$SCONS platform=iphone $OPTIONS arch=arm64 tools=no ios_simulator=yes target=release_debug \
# IOS_SDK_PATH="/root/ioscross/arm64_sim/SDK/iPhoneSimulator${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/arm64_sim/" ios_triple="arm-apple-darwin11-" # IPHONESDK="/root/ioscross/arm64_sim/SDK/iPhoneSimulator${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/arm64_sim/" ios_triple="arm-apple-darwin11-"
#$SCONS platform=ios $OPTIONS arch=arm64 ios_simulator=yes target=template_release \ #$SCONS platform=iphone $OPTIONS arch=arm64 tools=no ios_simulator=no target=release \
# IOS_SDK_PATH="/root/ioscross/arm64_sim/SDK/iPhoneSimulator${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/arm64_sim/" ios_triple="arm-apple-darwin11-" # IPHONESDK="/root/ioscross/arm64_sim/SDK/iPhoneSimulator${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/arm64_sim/" ios_triple="arm-apple-darwin11-"
# x86_64 simulator # x86_64 simulator
$SCONS platform=ios $OPTIONS arch=x86_64 ios_simulator=yes target=template_debug \ $SCONS platform=iphone $OPTIONS arch=x86_64 tools=no ios_simulator=yes target=release_debug \
IOS_SDK_PATH="/root/ioscross/x86_64_sim/SDK/iPhoneSimulator${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/x86_64_sim/" ios_triple="x86_64-apple-darwin11-" IPHONESDK="/root/ioscross/x86_64_sim/SDK/iPhoneSimulator${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/x86_64_sim/" ios_triple="x86_64-apple-darwin11-"
$SCONS platform=ios $OPTIONS arch=x86_64 ios_simulator=yes target=template_release \ $SCONS platform=iphone $OPTIONS arch=x86_64 tools=no ios_simulator=yes target=release \
IOS_SDK_PATH="/root/ioscross/x86_64_sim/SDK/iPhoneSimulator${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/x86_64_sim/" ios_triple="x86_64-apple-darwin11-" IPHONESDK="/root/ioscross/x86_64_sim/SDK/iPhoneSimulator${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/x86_64_sim/" ios_triple="x86_64-apple-darwin11-"
mkdir -p /root/out/templates mkdir -p /root/out/templates
cp bin/libgodot.ios.template_release.arm64.a /root/out/templates/libgodot.ios.a cp bin/libgodot.iphone.opt.arm64.a /root/out/templates/libgodot.iphone.a
cp bin/libgodot.ios.template_debug.arm64.a /root/out/templates/libgodot.ios.debug.a cp bin/libgodot.iphone.opt.debug.arm64.a /root/out/templates/libgodot.iphone.debug.a
#$IOS_LIPO -create bin/libgodot.ios.template_release.arm64.simulator.a bin/libgodot.ios.template_release.x86_64.simulator.a -output /root/out/templates/libgodot.ios.simulator.a #$IOS_LIPO -create bin/libgodot.iphone.opt.arm64.simulator.a bin/libgodot.iphone.opt.x86_64.simulator.a -output /root/out/templates/libgodot.iphone.simulator.a
#$IOS_LIPO -create bin/libgodot.ios.template_debug.arm64.simulator.a bin/libgodot.ios.template_debug.x86_64.simulator.a -output /root/out/templates/libgodot.ios.debug.simulator.a #$IOS_LIPO -create bin/libgodot.iphone.opt.debug.arm64.simulator.a bin/libgodot.iphone.opt.debug.x86_64.simulator.a -output /root/out/templates/libgodot.iphone.debug.simulator.a
cp bin/libgodot.ios.template_release.x86_64.simulator.a /root/out/templates/libgodot.ios.simulator.a cp bin/libgodot.iphone.opt.x86_64.simulator.a /root/out/templates/libgodot.iphone.simulator.a
cp bin/libgodot.ios.template_debug.x86_64.simulator.a /root/out/templates/libgodot.ios.debug.simulator.a cp bin/libgodot.iphone.opt.debug.x86_64.simulator.a /root/out/templates/libgodot.iphone.debug.simulator.a
fi fi
# Mono # Mono
@@ -58,36 +58,59 @@ fi
if [ "${MONO}" == "1" ]; then if [ "${MONO}" == "1" ]; then
echo "Starting Mono build for iOS..." echo "Starting Mono build for iOS..."
cp /root/mono-glue/*.cpp modules/mono/glue/
cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/ cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/
cp -r /root/mono-glue/GodotSharp/GodotSharpEditor/Generated modules/mono/glue/GodotSharp/GodotSharpEditor/
# arm64 device # arm64 device
$SCONS platform=ios $OPTIONS $OPTIONS_MONO arch=arm64 ios_simulator=no target=template_debug \ $SCONS platform=iphone $OPTIONS $OPTIONS_MONO arch=arm64 ios_simulator=no mono_prefix=/root/mono-installs/ios-arm64-release tools=no target=release_debug \
IOS_SDK_PATH="/root/ioscross/arm64/SDK/iPhoneOS${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/arm64/" ios_triple="arm-apple-darwin11-" IPHONESDK="/root/ioscross/arm64/SDK/iPhoneOS${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/arm64/" ios_triple="arm-apple-darwin11-"
$SCONS platform=ios $OPTIONS $OPTIONS_MONO arch=arm64 ios_simulator=no target=template_release \ $SCONS platform=iphone $OPTIONS $OPTIONS_MONO arch=arm64 ios_simulator=no mono_prefix=/root/mono-installs/ios-arm64-release tools=no target=release \
IOS_SDK_PATH="/root/ioscross/arm64/SDK/iPhoneOS${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/arm64/" ios_triple="arm-apple-darwin11-" IPHONESDK="/root/ioscross/arm64/SDK/iPhoneOS${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/arm64/" ios_triple="arm-apple-darwin11-"
# arm64 simulator # arm64 simulator
# Disabled for now as it doesn't work with cctools-port and current LLVM. # Disabled for now as it doesn't work with cctools-port and current LLVM.
# See https://github.com/godotengine/build-containers/pull/85. # See https://github.com/godotengine/build-containers/pull/85.
#$SCONS platform=ios $OPTIONS $OPTIONS_MONO arch=arm64 ios_simulator=yes target=template_debug \ #$SCONS platform=iphone $OPTIONS $OPTIONS_MONO arch=arm64 ios_simulator=yes mono_prefix=/root/mono-installs/ios-arm64-sim-release tools=no target=release_debug \
# IOS_SDK_PATH="/root/ioscross/arm64_sim/SDK/iPhoneSimulator${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/arm64_sim/" ios_triple="arm-apple-darwin11-" # IPHONESDK="/root/ioscross/arm64_sim/SDK/iPhoneSimulator${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/arm64_sim/" ios_triple="arm-apple-darwin11-"
#$SCONS platform=ios $OPTIONS $OPTIONS_MONO arch=arm64 ios_simulator=yes target=template_release \ #$SCONS platform=iphone $OPTIONS $OPTIONS_MONO arch=arm64 ios_simulator=yes mono_prefix=/root/mono-installs/ios-arm64-sim-release tools=no target=release \
# IOS_SDK_PATH="/root/ioscross/arm64_sim/SDK/iPhoneSimulator${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/arm64_sim/" ios_triple="arm-apple-darwin11-" # IPHONESDK="/root/ioscross/arm64_sim/SDK/iPhoneSimulator${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/arm64_sim/" ios_triple="arm-apple-darwin11-"
# x86_64 simulator # x86_64 simulator
$SCONS platform=ios $OPTIONS $OPTIONS_MONO arch=x86_64 ios_simulator=yes target=template_debug \ $SCONS platform=iphone $OPTIONS $OPTIONS_MONO arch=x86_64 ios_simulator=yes mono_prefix=/root/mono-installs/ios-x86_64-release tools=no target=release_debug \
IOS_SDK_PATH="/root/ioscross/x86_64_sim/SDK/iPhoneSimulator${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/x86_64_sim/" ios_triple="x86_64-apple-darwin11-" IPHONESDK="/root/ioscross/x86_64_sim/SDK/iPhoneSimulator${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/x86_64_sim/" ios_triple="x86_64-apple-darwin11-"
$SCONS platform=ios $OPTIONS $OPTIONS_MONO arch=x86_64 ios_simulator=yes target=template_release \ $SCONS platform=iphone $OPTIONS $OPTIONS_MONO arch=x86_64 ios_simulator=yes mono_prefix=/root/mono-installs/ios-x86_64-release tools=no target=release \
IOS_SDK_PATH="/root/ioscross/x86_64_sim/SDK/iPhoneSimulator${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/x86_64_sim/" ios_triple="x86_64-apple-darwin11-" IPHONESDK="/root/ioscross/x86_64_sim/SDK/iPhoneSimulator${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/x86_64_sim/" ios_triple="x86_64-apple-darwin11-"
mkdir -p /root/out/templates-mono mkdir -p /root/out/templates-mono
cp bin/libgodot.ios.template_release.arm64.a /root/out/templates-mono/libgodot.ios.a cp bin/libgodot.iphone.opt.arm64.a /root/out/templates-mono/libgodot.iphone.a
cp bin/libgodot.ios.template_debug.arm64.a /root/out/templates-mono/libgodot.ios.debug.a cp bin/libgodot.iphone.opt.debug.arm64.a /root/out/templates-mono/libgodot.iphone.debug.a
#$IOS_LIPO -create bin/libgodot.ios.template_release.arm64.simulator.a bin/libgodot.ios.template_release.x86_64.simulator.a -output /root/out/templates-mono/libgodot.ios.simulator.a #$IOS_LIPO -create bin/libgodot.iphone.opt.arm64.simulator.a bin/libgodot.iphone.opt.x86_64.simulator.a -output /root/out/templates-mono/libgodot.iphone.simulator.a
#$IOS_LIPO -create bin/libgodot.ios.template_debug.arm64.simulator.a bin/libgodot.ios.template_debug.x86_64.simulator.a -output /root/out/templates-mono/libgodot.ios.debug.simulator.a #$IOS_LIPO -create bin/libgodot.iphone.opt.debug.arm64.simulator.a bin/libgodot.iphone.opt.debug.x86_64.simulator.a -output /root/out/templates-mono/libgodot.iphone.debug.simulator.a
cp bin/libgodot.ios.template_release.x86_64.simulator.a /root/out/templates-mono/libgodot.ios.simulator.a cp bin/libgodot.iphone.opt.x86_64.simulator.a /root/out/templates-mono/libgodot.iphone.simulator.a
cp bin/libgodot.ios.template_debug.x86_64.simulator.a /root/out/templates-mono/libgodot.ios.debug.simulator.a cp bin/libgodot.iphone.opt.debug.x86_64.simulator.a /root/out/templates-mono/libgodot.iphone.debug.simulator.a
cp -r misc/dist/iphone-mono-libs /root/out/templates-mono/iphone-mono-libs
cp bin/libmonosgen-2.0.iphone.arm64.a /root/out/templates-mono/iphone-mono-libs/libmonosgen-2.0.xcframework/ios-arm64/libmonosgen.a
cp bin/libmono-native.iphone.arm64.a /root/out/templates-mono/iphone-mono-libs/libmono-native.xcframework/ios-arm64/libmono-native.a
cp bin/libmono-profiler-log.iphone.arm64.a /root/out/templates-mono/iphone-mono-libs/libmono-profiler-log.xcframework/ios-arm64/libmono-profiler-log.a
#$IOS_LIPO -create bin/libmonosgen-2.0.iphone.arm64.simulator.a bin/libmonosgen-2.0.iphone.x86_64.simulator.a -output /root/out/templates-mono/iphone-mono-libs/libmonosgen-2.0.xcframework/ios-arm64_x86_64-simulator/libmonosgen.a
#$IOS_LIPO -create bin/libmono-native.iphone.arm64.simulator.a bin/libmono-native.iphone.x86_64.simulator.a -output /root/out/templates-mono/iphone-mono-libs/libmono-native.xcframework/ios-arm64_x86_64-simulator/libmono-native.a
#$IOS_LIPO -create bin/libmono-profiler-log.iphone.arm64.simulator.a bin/libmono-profiler-log.iphone.x86_64.simulator.a -output /root/out/templates-mono/iphone-mono-libs/libmono-profiler-log.xcframework/ios-arm64_x86_64-simulator/libmono-profiler-log.a
cp bin/libmonosgen-2.0.iphone.x86_64.simulator.a /root/out/templates-mono/iphone-mono-libs/libmonosgen-2.0.xcframework/ios-arm64_x86_64-simulator/libmonosgen.a
cp bin/libmono-native.iphone.x86_64.simulator.a /root/out/templates-mono/iphone-mono-libs/libmono-native.xcframework/ios-arm64_x86_64-simulator/libmono-native.a
cp bin/libmono-profiler-log.iphone.x86_64.simulator.a /root/out/templates-mono/iphone-mono-libs/libmono-profiler-log.xcframework/ios-arm64_x86_64-simulator/libmono-profiler-log.a
# The Mono libraries for the interpreter are not available for simulator builds
cp bin/libmono-ee-interp.iphone.arm64.a /root/out/templates-mono/iphone-mono-libs/libmono-ee-interp.xcframework/ios-arm64/libmono-ee-interp.a
cp bin/libmono-icall-table.iphone.arm64.a /root/out/templates-mono/iphone-mono-libs/libmono-icall-table.xcframework/ios-arm64/libmono-icall-table.a
cp bin/libmono-ilgen.iphone.arm64.a /root/out/templates-mono/iphone-mono-libs/libmono-ilgen.xcframework/ios-arm64/libmono-ilgen.a
mkdir -p /root/out/templates-mono/bcl
cp -r /root/mono-installs/ios-bcl/* /root/out/templates-mono/bcl
fi fi
echo "iOS build successful" echo "iOS build successful"

67
build-javascript/build.sh Executable file
View File

@@ -0,0 +1,67 @@
#!/bin/bash
set -e
# Config
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
export OPTIONS="production=yes"
export OPTIONS_MONO="module_mono_enabled=yes mono_static=yes mono_prefix=/root/mono-installs/wasm-runtime-release lto=none"
export TERM=xterm
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 JavaScript..."
source /root/emsdk_${EMSCRIPTEN_CLASSICAL}/emsdk_env.sh
$SCONS platform=javascript ${OPTIONS} target=release_debug tools=no
$SCONS platform=javascript ${OPTIONS} target=release tools=no
$SCONS platform=javascript ${OPTIONS} target=release_debug tools=no threads_enabled=yes
$SCONS platform=javascript ${OPTIONS} target=release tools=no threads_enabled=yes
$SCONS platform=javascript ${OPTIONS} target=release_debug tools=no gdnative_enabled=yes
$SCONS platform=javascript ${OPTIONS} target=release tools=no gdnative_enabled=yes
mkdir -p /root/out/templates
cp -rvp bin/*.zip /root/out/templates
rm -f bin/*.zip
$SCONS platform=javascript ${OPTIONS} target=release_debug tools=yes threads_enabled=yes use_closure_compiler=yes
mkdir -p /root/out/tools
cp -rvp bin/*.zip /root/out/tools
rm -f bin/*.zip
fi
# Mono
if [ "${MONO}" == "1" ]; then
echo "Starting Mono build for JavaScript..."
source /root/emsdk_${EMSCRIPTEN_MONO}/emsdk_env.sh
cp /root/mono-glue/*.cpp modules/mono/glue/
cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/
cp -r /root/mono-glue/GodotSharp/GodotSharpEditor/Generated modules/mono/glue/GodotSharp/GodotSharpEditor/
$SCONS platform=javascript ${OPTIONS} ${OPTIONS_MONO} target=release_debug tools=no
$SCONS platform=javascript ${OPTIONS} ${OPTIONS_MONO} target=release tools=no
mkdir -p /root/out/templates-mono
cp -rvp bin/*.zip /root/out/templates-mono
rm -f bin/*.zip
mkdir -p /root/out/templates-mono/bcl
cp -r /root/mono-installs/wasm-bcl/wasm /root/out/templates-mono/bcl/
fi
echo "JavaScript build successful"

View File

@@ -5,8 +5,10 @@ set -e
# Config # Config
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no" export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
export OPTIONS="production=yes" export OPTIONS="production=yes LINKFLAGS=-s"
export OPTIONS_MONO="module_mono_enabled=yes" export OPTIONS_MONO="module_mono_enabled=yes mono_static=yes"
export MONO_PREFIX_X86_64="/root/mono-installs/desktop-linux-x86_64-release"
export MONO_PREFIX_X86="/root/mono-installs/desktop-linux-x86-release"
export TERM=xterm export TERM=xterm
rm -rf godot rm -rf godot
@@ -21,54 +23,54 @@ if [ "${CLASSICAL}" == "1" ]; then
export PATH="${GODOT_SDK_LINUX_X86_64}/bin:${BASE_PATH}" export PATH="${GODOT_SDK_LINUX_X86_64}/bin:${BASE_PATH}"
$SCONS platform=linuxbsd arch=x86_64 $OPTIONS target=editor $SCONS platform=x11 $OPTIONS tools=yes target=release_debug
mkdir -p /root/out/x86_64/tools mkdir -p /root/out/x64/tools
cp -rvp bin/* /root/out/x86_64/tools cp -rvp bin/* /root/out/x64/tools
rm -rf bin rm -rf bin
$SCONS platform=linuxbsd arch=x86_64 $OPTIONS target=template_debug $SCONS platform=x11 $OPTIONS tools=no target=release_debug
$SCONS platform=linuxbsd arch=x86_64 $OPTIONS target=template_release $SCONS platform=x11 $OPTIONS tools=no target=release
mkdir -p /root/out/x86_64/templates mkdir -p /root/out/x64/templates
cp -rvp bin/* /root/out/x86_64/templates cp -rvp bin/* /root/out/x64/templates
rm -rf bin rm -rf bin
export PATH="${GODOT_SDK_LINUX_X86_32}/bin:${BASE_PATH}" export PATH="${GODOT_SDK_LINUX_X86_32}/bin:${BASE_PATH}"
$SCONS platform=linuxbsd arch=x86_32 $OPTIONS target=editor $SCONS platform=x11 bits=32 $OPTIONS tools=yes target=release_debug
mkdir -p /root/out/x86_32/tools mkdir -p /root/out/x86/tools
cp -rvp bin/* /root/out/x86_32/tools cp -rvp bin/* /root/out/x86/tools
rm -rf bin rm -rf bin
$SCONS platform=linuxbsd arch=x86_32 $OPTIONS target=template_debug $SCONS platform=x11 bits=32 $OPTIONS tools=no target=release_debug
$SCONS platform=linuxbsd arch=x86_32 $OPTIONS target=template_release $SCONS platform=x11 bits=32 $OPTIONS tools=no target=release
mkdir -p /root/out/x86_32/templates mkdir -p /root/out/x86/templates
cp -rvp bin/* /root/out/x86_32/templates cp -rvp bin/* /root/out/x86/templates
rm -rf bin rm -rf bin
export PATH="${GODOT_SDK_LINUX_ARM64}/bin:${BASE_PATH}" export PATH="${GODOT_SDK_LINUX_ARM64}/bin:${BASE_PATH}"
$SCONS platform=linuxbsd arch=arm64 $OPTIONS target=editor $SCONS platform=x11 arch=arm64 $OPTIONS tools=yes target=release_debug
mkdir -p /root/out/arm64/tools mkdir -p /root/out/arm64/tools
cp -rvp bin/* /root/out/arm64/tools cp -rvp bin/* /root/out/arm64/tools
rm -rf bin rm -rf bin
$SCONS platform=linuxbsd arch=arm64 $OPTIONS target=template_debug $SCONS platform=x11 arch=arm64 $OPTIONS tools=no target=release_debug
$SCONS platform=linuxbsd arch=arm64 $OPTIONS target=template_release $SCONS platform=x11 arch=arm64 $OPTIONS tools=no target=release
mkdir -p /root/out/arm64/templates mkdir -p /root/out/arm64/templates
cp -rvp bin/* /root/out/arm64/templates cp -rvp bin/* /root/out/arm64/templates
rm -rf bin rm -rf bin
export PATH="${GODOT_SDK_LINUX_ARM32}/bin:${BASE_PATH}" export PATH="${GODOT_SDK_LINUX_ARM32}/bin:${BASE_PATH}"
$SCONS platform=linuxbsd arch=arm32 $OPTIONS target=editor $SCONS platform=x11 arch=arm $OPTIONS tools=yes target=release_debug
mkdir -p /root/out/arm32/tools mkdir -p /root/out/arm/tools
cp -rvp bin/* /root/out/arm32/tools cp -rvp bin/* /root/out/arm/tools
rm -rf bin rm -rf bin
$SCONS platform=linuxbsd arch=arm32 $OPTIONS target=template_debug $SCONS platform=x11 arch=arm $OPTIONS tools=no target=release_debug
$SCONS platform=linuxbsd arch=arm32 $OPTIONS target=template_release $SCONS platform=x11 arch=arm $OPTIONS tools=no target=release
mkdir -p /root/out/arm32/templates mkdir -p /root/out/arm/templates
cp -rvp bin/* /root/out/arm32/templates cp -rvp bin/* /root/out/arm/templates
rm -rf bin rm -rf bin
fi fi
@@ -77,63 +79,36 @@ fi
if [ "${MONO}" == "1" ]; then if [ "${MONO}" == "1" ]; then
echo "Starting Mono build for Linux..." echo "Starting Mono build for Linux..."
cp /root/mono-glue/*.cpp modules/mono/glue/
cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/ cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/
cp -r /root/mono-glue/GodotSharp/GodotSharpEditor/Generated modules/mono/glue/GodotSharp/GodotSharpEditor/ cp -r /root/mono-glue/GodotSharp/GodotSharpEditor/Generated modules/mono/glue/GodotSharp/GodotSharpEditor/
export PATH="${GODOT_SDK_LINUX_X86_64}/bin:${BASE_PATH}" export PATH="${GODOT_SDK_LINUX_X86_64}/bin:${BASE_PATH}"
export OPTIONS_MONO_PREFIX="${OPTIONS} ${OPTIONS_MONO} mono_prefix=${MONO_PREFIX_X86_64}"
$SCONS platform=linuxbsd arch=x86_64 $OPTIONS $OPTIONS_MONO target=editor $SCONS platform=x11 $OPTIONS_MONO_PREFIX tools=yes target=release_debug copy_mono_root=yes
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=linuxbsd mkdir -p /root/out/x64/tools-mono
mkdir -p /root/out/x86_64/tools-mono cp -rvp bin/* /root/out/x64/tools-mono
cp -rvp bin/* /root/out/x86_64/tools-mono
rm -rf bin rm -rf bin
$SCONS platform=linuxbsd arch=x86_64 $OPTIONS $OPTIONS_MONO target=template_debug $SCONS platform=x11 $OPTIONS_MONO_PREFIX tools=no target=release_debug
$SCONS platform=linuxbsd arch=x86_64 $OPTIONS $OPTIONS_MONO target=template_release $SCONS platform=x11 $OPTIONS_MONO_PREFIX tools=no target=release
mkdir -p /root/out/x86_64/templates-mono mkdir -p /root/out/x64/templates-mono
cp -rvp bin/* /root/out/x86_64/templates-mono cp -rvp bin/* /root/out/x64/templates-mono
rm -rf bin rm -rf bin
export PATH="${GODOT_SDK_LINUX_X86_32}/bin:${BASE_PATH}" export PATH="${GODOT_SDK_LINUX_X86_32}/bin:${BASE_PATH}"
export OPTIONS_MONO_PREFIX="${OPTIONS} ${OPTIONS_MONO} mono_prefix=${MONO_PREFIX_X86}"
$SCONS platform=linuxbsd arch=x86_32 $OPTIONS $OPTIONS_MONO target=editor $SCONS platform=x11 bits=32 $OPTIONS_MONO_PREFIX tools=yes target=release_debug copy_mono_root=yes
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=linuxbsd mkdir -p /root/out/x86/tools-mono
mkdir -p /root/out/x86_32/tools-mono cp -rvp bin/* /root/out/x86/tools-mono
cp -rvp bin/* /root/out/x86_32/tools-mono
rm -rf bin rm -rf bin
$SCONS platform=linuxbsd arch=x86_32 $OPTIONS $OPTIONS_MONO target=template_debug $SCONS platform=x11 bits=32 $OPTIONS_MONO_PREFIX tools=no target=release_debug
$SCONS platform=linuxbsd arch=x86_32 $OPTIONS $OPTIONS_MONO target=template_release $SCONS platform=x11 bits=32 $OPTIONS_MONO_PREFIX tools=no target=release
mkdir -p /root/out/x86_32/templates-mono mkdir -p /root/out/x86/templates-mono
cp -rvp bin/* /root/out/x86_32/templates-mono cp -rvp bin/* /root/out/x86/templates-mono
rm -rf bin
export PATH="${GODOT_SDK_LINUX_ARM64}/bin:${BASE_PATH}"
$SCONS platform=linuxbsd arch=arm64 $OPTIONS $OPTIONS_MONO target=editor
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=linuxbsd
mkdir -p /root/out/arm64/tools-mono
cp -rvp bin/* /root/out/arm64/tools-mono
rm -rf bin
$SCONS platform=linuxbsd arch=arm64 $OPTIONS $OPTIONS_MONO target=template_debug
$SCONS platform=linuxbsd arch=arm64 $OPTIONS $OPTIONS_MONO target=template_release
mkdir -p /root/out/arm64/templates-mono
cp -rvp bin/* /root/out/arm64/templates-mono
rm -rf bin
export PATH="${GODOT_SDK_LINUX_ARM32}/bin:${BASE_PATH}"
$SCONS platform=linuxbsd arch=arm32 $OPTIONS $OPTIONS_MONO target=editor
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=linuxbsd
mkdir -p /root/out/arm32/tools-mono
cp -rvp bin/* /root/out/arm32/tools-mono
rm -rf bin
$SCONS platform=linuxbsd arch=arm32 $OPTIONS $OPTIONS_MONO target=template_debug
$SCONS platform=linuxbsd arch=arm32 $OPTIONS $OPTIONS_MONO target=template_release
mkdir -p /root/out/arm32/templates-mono
cp -rvp bin/* /root/out/arm32/templates-mono
rm -rf bin rm -rf bin
fi fi

View File

@@ -1,71 +0,0 @@
#!/bin/bash
set -e
# Config
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
export OPTIONS="osxcross_sdk=darwin24.2 production=yes use_volk=no vulkan_sdk_path=/root/moltenvk angle_libs=/root/angle"
export OPTIONS_MONO="module_mono_enabled=yes"
export TERM=xterm
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 macOS..."
$SCONS platform=macos $OPTIONS arch=x86_64 target=editor
$SCONS platform=macos $OPTIONS arch=arm64 target=editor
lipo -create bin/godot.macos.editor.x86_64 bin/godot.macos.editor.arm64 -output bin/godot.macos.editor.universal
mkdir -p /root/out/tools
cp -rvp bin/* /root/out/tools
rm -rf bin
$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
$SCONS platform=macos $OPTIONS arch=x86_64 target=template_release
$SCONS platform=macos $OPTIONS arch=arm64 target=template_release
lipo -create bin/godot.macos.template_release.x86_64 bin/godot.macos.template_release.arm64 -output bin/godot.macos.template_release.universal
mkdir -p /root/out/templates
cp -rvp bin/* /root/out/templates
rm -rf bin
fi
# Mono
if [ "${MONO}" == "1" ]; then
echo "Starting Mono build for macOS..."
cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/
cp -r /root/mono-glue/GodotSharp/GodotSharpEditor/Generated modules/mono/glue/GodotSharp/GodotSharpEditor/
$SCONS platform=macos $OPTIONS $OPTIONS_MONO arch=x86_64 target=editor
$SCONS platform=macos $OPTIONS $OPTIONS_MONO arch=arm64 target=editor
lipo -create bin/godot.macos.editor.x86_64.mono bin/godot.macos.editor.arm64.mono -output bin/godot.macos.editor.universal.mono
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=macos
mkdir -p /root/out/tools-mono
cp -rvp bin/* /root/out/tools-mono
rm -rf bin
$SCONS platform=macos $OPTIONS $OPTIONS_MONO arch=x86_64 target=template_debug
$SCONS platform=macos $OPTIONS $OPTIONS_MONO arch=arm64 target=template_debug
lipo -create bin/godot.macos.template_debug.x86_64.mono bin/godot.macos.template_debug.arm64.mono -output bin/godot.macos.template_debug.universal.mono
$SCONS platform=macos $OPTIONS $OPTIONS_MONO arch=x86_64 target=template_release
$SCONS platform=macos $OPTIONS $OPTIONS_MONO arch=arm64 target=template_release
lipo -create bin/godot.macos.template_release.x86_64.mono bin/godot.macos.template_release.arm64.mono -output bin/godot.macos.template_release.universal.mono
mkdir -p /root/out/templates-mono
cp -rvp bin/* /root/out/templates-mono
rm -rf bin
fi
echo "macOS build successful"

99
build-macosx/build.sh Executable file
View File

@@ -0,0 +1,99 @@
#!/bin/bash
set -e
# Config
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
export OPTIONS="osxcross_sdk=darwin24.2 production=yes"
export OPTIONS_MONO="module_mono_enabled=yes mono_static=yes"
export MONO_PREFIX_X86_64="/root/mono-installs/desktop-osx-x86_64-release"
export MONO_PREFIX_ARM64="/root/mono-installs/desktop-osx-arm64-release"
export STRIP="x86_64-apple-darwin24.2-strip -u -r"
export TERM=xterm
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 macOS..."
$SCONS platform=osx $OPTIONS arch=x86_64 tools=yes target=release_debug
$SCONS platform=osx $OPTIONS arch=arm64 tools=yes target=release_debug
lipo -create bin/godot.osx.opt.tools.x86_64 bin/godot.osx.opt.tools.arm64 -output bin/godot.osx.opt.tools.universal
$STRIP bin/godot.osx.opt.tools.universal
mkdir -p /root/out/tools
cp -rvp bin/* /root/out/tools
rm -rf bin
$SCONS platform=osx $OPTIONS arch=x86_64 tools=no target=release_debug
$SCONS platform=osx $OPTIONS arch=arm64 tools=no target=release_debug
lipo -create bin/godot.osx.opt.debug.x86_64 bin/godot.osx.opt.debug.arm64 -output bin/godot.osx.opt.debug.universal
$STRIP bin/godot.osx.opt.debug.universal
$SCONS platform=osx $OPTIONS arch=x86_64 tools=no target=release
$SCONS platform=osx $OPTIONS arch=arm64 tools=no target=release
lipo -create bin/godot.osx.opt.x86_64 bin/godot.osx.opt.arm64 -output bin/godot.osx.opt.universal
$STRIP bin/godot.osx.opt.universal
mkdir -p /root/out/templates
cp -rvp bin/* /root/out/templates
rm -rf bin
fi
# Mono
if [ "${MONO}" == "1" ]; then
echo "Starting Mono build for macOS..."
cp /root/mono-glue/*.cpp modules/mono/glue/
cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/
cp -r /root/mono-glue/GodotSharp/GodotSharpEditor/Generated modules/mono/glue/GodotSharp/GodotSharpEditor/
# Note: A bit of dylib wrangling involved as x86_64 and arm64 builds both generate GodotSharp
# so the second build overrides the first, but we need to lipo the libs to make them universal.
# We also need to ensure that /etc/mono/config has the proper filenames (keep arm64 as the last
# build so that we rely on its config, which has libmono-native.dylib instead of
# libmono-native-compat.dylib).
mkdir -p tmp-lib/{x86_64,arm64}
$SCONS platform=osx $OPTIONS $OPTIONS_MONO mono_prefix=$MONO_PREFIX_X86_64 arch=x86_64 tools=yes target=release_debug copy_mono_root=yes
cp bin/GodotSharp/Mono/lib/*.dylib tmp-lib/x86_64/
$SCONS platform=osx $OPTIONS $OPTIONS_MONO mono_prefix=$MONO_PREFIX_ARM64 arch=arm64 tools=yes target=release_debug copy_mono_root=yes
cp bin/GodotSharp/Mono/lib/*.dylib tmp-lib/arm64/
lipo -create bin/godot.osx.opt.tools.x86_64.mono bin/godot.osx.opt.tools.arm64.mono -output bin/godot.osx.opt.tools.universal.mono
$STRIP bin/godot.osx.opt.tools.universal.mono
# Make universal versions of the dylibs we use.
lipo -create tmp-lib/x86_64/libmono-native.dylib tmp-lib/arm64/libmono-native.dylib -output tmp-lib/libmono-native.dylib
lipo -create tmp-lib/x86_64/libMonoPosixHelper.dylib tmp-lib/arm64/libMonoPosixHelper.dylib -output tmp-lib/libMonoPosixHelper.dylib
lipo -create tmp-lib/x86_64/libmono-btls-shared.dylib tmp-lib/arm64/libmono-btls-shared.dylib -output tmp-lib/libmono-btls-shared.dylib
cp -f tmp-lib/*.dylib bin/GodotSharp/Mono/lib/
mkdir -p /root/out/tools-mono
cp -rvp bin/* /root/out/tools-mono
rm -rf bin
$SCONS platform=osx $OPTIONS $OPTIONS_MONO mono_prefix=$MONO_PREFIX_X86_64 arch=x86_64 tools=no target=release_debug
$SCONS platform=osx $OPTIONS $OPTIONS_MONO mono_prefix=$MONO_PREFIX_ARM64 arch=arm64 tools=no target=release_debug
lipo -create bin/godot.osx.opt.debug.x86_64.mono bin/godot.osx.opt.debug.arm64.mono -output bin/godot.osx.opt.debug.universal.mono
$STRIP bin/godot.osx.opt.debug.universal.mono
$SCONS platform=osx $OPTIONS $OPTIONS_MONO mono_prefix=$MONO_PREFIX_X86_64 arch=x86_64 tools=no target=release
$SCONS platform=osx $OPTIONS $OPTIONS_MONO mono_prefix=$MONO_PREFIX_ARM64 arch=arm64 tools=no target=release
lipo -create bin/godot.osx.opt.x86_64.mono bin/godot.osx.opt.arm64.mono -output bin/godot.osx.opt.universal.mono
$STRIP bin/godot.osx.opt.universal.mono
cp -f tmp-lib/*.dylib bin/data.mono.osx.64.release/Mono/lib/
cp -f tmp-lib/*.dylib bin/data.mono.osx.64.release_debug/Mono/lib/
mkdir -p /root/out/templates-mono
cp -rvp bin/* /root/out/templates-mono
rm -rf bin
fi
echo "macOS build successful"

View File

@@ -8,7 +8,6 @@ export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
export OPTIONS="debug_symbols=no use_static_cpp=no" export OPTIONS="debug_symbols=no use_static_cpp=no"
export TERM=xterm export TERM=xterm
export DISPLAY=:0 export DISPLAY=:0
export PATH="${GODOT_SDK_LINUX_X86_64}/bin:${BASE_PATH}"
rm -rf godot rm -rf godot
mkdir godot mkdir godot
@@ -20,12 +19,13 @@ tar xf ../godot.tar.gz --strip-components=1
if [ "${MONO}" == "1" ]; then if [ "${MONO}" == "1" ]; then
echo "Building and generating Mono glue..." echo "Building and generating Mono glue..."
dotnet --info mono --version
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/pkgconfig/
${SCONS} platform=linuxbsd ${OPTIONS} target=editor module_mono_enabled=yes ${SCONS} platform=x11 ${OPTIONS} target=release_debug tools=yes module_mono_enabled=yes mono_glue=no
rm -rf /root/mono-glue/* rm -rf /root/mono-glue/*
bin/godot.linuxbsd.editor.x86_64.mono --headless --generate-mono-glue /root/mono-glue xvfb-run bin/godot.x11.opt.tools.64.mono --audio-driver Dummy --generate-mono-glue /root/mono-glue || /bin/true
fi fi
echo "Mono glue generated successfully" echo "Mono glue generated successfully"

View File

@@ -1,7 +1,6 @@
#!/bin/bash #!/bin/bash
set -e set -e
export basedir=$(pwd)
# Log output to a file automatically. # Log output to a file automatically.
exec > >(tee -a "out/logs/build-release") 2>&1 exec > >(tee -a "out/logs/build-release") 2>&1
@@ -12,17 +11,17 @@ exec > >(tee -a "out/logs/build-release") 2>&1
source ./config.sh source ./config.sh
can_sign_windows=0 can_sign_windows=0
if [ ! -z "${SIGN_KEYSTORE}" ] && [ ! -z "${SIGN_PASSWORD}" ] && [[ $(type -P "osslsigncode") ]]; then if [ ! -z "${WINDOWS_SIGN_NAME}" ] && [ ! -z "${WINDOWS_SIGN_URL}" ] && [[ $(type -P "osslsigncode") ]]; then
can_sign_windows=1 can_sign_windows=1
else else
echo "Disabling Windows binary signing as config.sh does not define the required data (SIGN_KEYSTORE, SIGN_PASSWORD), or osslsigncode can't be found in PATH." echo "Disabling Windows binary signing as config.sh does not define the required data (WINDOWS_SIGN_NAME, WINDOWS_SIGN_URL), or osslsigncode can't be found in PATH."
fi fi
sign_windows() { sign_windows() {
if [ $can_sign_windows == 0 ]; then if [ $can_sign_windows == 0 ]; then
return return
fi fi
osslsigncode sign -pkcs12 ${SIGN_KEYSTORE} -pass "${SIGN_PASSWORD}" -n "${SIGN_NAME}" -i "${SIGN_URL}" -t http://timestamp.comodoca.com -in $1 -out $1-signed P11_KIT_SERVER_ADDRESS=unix:path=/run/p11-kit/p11kit.sock osslsigncode sign -pkcs11module /usr/lib64/pkcs11/p11-kit-client.so -pkcs11cert 'pkcs11:model=SimplySign%20C' -key 'pkcs11:model=SimplySign%20C' -t http://time.certum.pl/ -n "${WINDOWS_SIGN_NAME}" -i "${WINDOWS_SIGN_URL}" -in $1 -out $1-signed
mv $1-signed $1 mv $1-signed $1
} }
@@ -30,7 +29,7 @@ sign_macos() {
if [ -z "${OSX_HOST}" ]; then if [ -z "${OSX_HOST}" ]; then
return return
fi fi
_macos_tmpdir=$(ssh "${OSX_HOST}" "mktemp -d") _osx_tmpdir=$(ssh "${OSX_HOST}" "mktemp -d")
_reldir="$1" _reldir="$1"
_binname="$2" _binname="$2"
_is_mono="$3" _is_mono="$3"
@@ -38,35 +37,36 @@ sign_macos() {
if [[ "${_is_mono}" == "1" ]]; then if [[ "${_is_mono}" == "1" ]]; then
_appname="Godot_mono.app" _appname="Godot_mono.app"
_sharpdir="${_appname}/Contents/Resources/GodotSharp" _sharpdir="${_appname}/Contents/Resources/GodotSharp"
_extra_files="${_sharpdir}/Mono/lib/*.dylib ${_sharpdir}/Tools/aot-compilers/*/*"
else else
_appname="Godot.app" _appname="Godot.app"
fi fi
scp "${_reldir}/${_binname}.zip" "${OSX_HOST}:${_macos_tmpdir}" scp "${_reldir}/${_binname}.zip" "${OSX_HOST}:${_osx_tmpdir}"
scp "${basedir}/git/misc/dist/macos/editor.entitlements" "${OSX_HOST}:${_macos_tmpdir}" scp "${basedir}/git/misc/dist/osx/editor.entitlements" "${OSX_HOST}:${_osx_tmpdir}"
ssh "${OSX_HOST}" " ssh "${OSX_HOST}" "
cd ${_macos_tmpdir} && \ cd ${_osx_tmpdir} && \
unzip ${_binname}.zip && \ unzip ${_binname}.zip && \
codesign --force --timestamp \ codesign --force --timestamp \
--options=runtime --entitlements editor.entitlements \ --options=runtime --entitlements editor.entitlements \
-s ${OSX_KEY_ID} -v ${_appname} && \ -s ${OSX_KEY_ID} -v ${_extra_files} ${_appname} && \
zip -r ${_binname}_signed.zip ${_appname}" zip -r ${_binname}_signed.zip ${_appname}"
_request_uuid=$(ssh "${OSX_HOST}" "xcrun notarytool submit ${_macos_tmpdir}/${_binname}_signed.zip --team-id \"${APPLE_TEAM}\" --apple-id \"${APPLE_ID}\" --password \"${APPLE_ID_PASSWORD}\" --no-progress --output-format json") _request_uuid=$(ssh "${OSX_HOST}" "xcrun notarytool submit ${_osx_tmpdir}/${_binname}_signed.zip --team-id \"${APPLE_TEAM}\" --apple-id \"${APPLE_ID}\" --password \"${APPLE_ID_PASSWORD}\" --no-progress --output-format json")
_request_uuid=$(echo ${_request_uuid} | sed -e 's/.*"id":"\([^"]*\)".*/\1/') _request_uuid=$(echo ${_request_uuid} | sed -e 's/.*"id":"\([^"]*\)".*/\1/')
if ! ssh "${OSX_HOST}" "xcrun notarytool wait ${_request_uuid} --team-id \"${APPLE_TEAM}\" --apple-id \"${APPLE_ID}\" --password \"${APPLE_ID_PASSWORD}\" | grep -q status:\ Accepted"; then if ! ssh "${OSX_HOST}" "xcrun notarytool wait ${_request_uuid} --team-id \"${APPLE_TEAM}\" --apple-id \"${APPLE_ID}\" --password \"${APPLE_ID_PASSWORD}\" | grep -q status:\ Accepted"; then
echo "Notarization failed." echo "Notarization failed."
_notarization_log=$(ssh "${OSX_HOST}" "xcrun notarytool log ${_request_uuid} --team-id \"${APPLE_TEAM}\" --apple-id \"${APPLE_ID}\" --password \"${APPLE_ID_PASSWORD}\"") _notarization_log=$(ssh "${OSX_HOST}" "xcrun notarytool log ${_request_uuid} --team-id \"${APPLE_TEAM}\" --apple-id \"${APPLE_ID}\" --password \"${APPLE_ID_PASSWORD}\"")
echo "${_notarization_log}" echo "${_notarization_log}"
ssh "${OSX_HOST}" "rm -rf ${_macos_tmpdir}" ssh "${OSX_HOST}" "rm -rf ${_osx_tmpdir}"
exit 1 exit 1
else else
ssh "${OSX_HOST}" " ssh "${OSX_HOST}" "
cd ${_macos_tmpdir} && \ cd ${_osx_tmpdir} && \
xcrun stapler staple ${_appname} && \ xcrun stapler staple ${_appname} && \
zip -r ${_binname}_stapled.zip ${_appname}" zip -r ${_binname}_stapled.zip ${_appname}"
scp "${OSX_HOST}:${_macos_tmpdir}/${_binname}_stapled.zip" "${_reldir}/${_binname}.zip" scp "${OSX_HOST}:${_osx_tmpdir}/${_binname}_stapled.zip" "${_reldir}/${_binname}.zip"
ssh "${OSX_HOST}" "rm -rf ${_macos_tmpdir}" ssh "${OSX_HOST}" "rm -rf ${_osx_tmpdir}"
fi fi
} }
@@ -74,40 +74,40 @@ sign_macos_template() {
if [ -z "${OSX_HOST}" ]; then if [ -z "${OSX_HOST}" ]; then
return return
fi fi
_macos_tmpdir=$(ssh "${OSX_HOST}" "mktemp -d") _osx_tmpdir=$(ssh "${OSX_HOST}" "mktemp -d")
_reldir="$1" _reldir="$1"
_is_mono="$2" _is_mono="$2"
scp "${_reldir}/macos.zip" "${OSX_HOST}:${_macos_tmpdir}" if [[ "${_is_mono}" == "1" ]]; then
_extra_files="osx_template.app/Contents/Resources/data.mono.*/Mono/lib/*.dylib"
fi
scp "${_reldir}/osx.zip" "${OSX_HOST}:${_osx_tmpdir}"
ssh "${OSX_HOST}" " ssh "${OSX_HOST}" "
cd ${_macos_tmpdir} && \ cd ${_osx_tmpdir} && \
unzip macos.zip && \ unzip osx.zip && \
codesign --force -s - \ codesign --force -s - \
--options=linker-signed \ --options=linker-signed \
-v macos_template.app/Contents/MacOS/* && \ -v ${_extra_files} osx_template.app/Contents/MacOS/* && \
zip -r macos_signed.zip macos_template.app" zip -r osx_signed.zip osx_template.app"
scp "${OSX_HOST}:${_macos_tmpdir}/macos_signed.zip" "${_reldir}/macos.zip" scp "${OSX_HOST}:${_osx_tmpdir}/osx_signed.zip" "${_reldir}/osx.zip"
ssh "${OSX_HOST}" "rm -rf ${_macos_tmpdir}" ssh "${OSX_HOST}" "rm -rf ${_osx_tmpdir}"
} }
godot_version="" godot_version=""
templates_version="" templates_version=""
do_cleanup=1
make_tarball=1
build_classical=1 build_classical=1
build_mono=1 build_mono=1
while getopts "h?v:t:b:n-:" opt; do while getopts "h?v:t:b:" opt; do
case "$opt" in case "$opt" in
h|\?) h|\?)
echo "Usage: $0 [OPTIONS...]" echo "Usage: $0 [OPTIONS...]"
echo echo
echo " -v godot version (e.g: 3.2-stable) [mandatory]" echo " -v godot version (e.g: 3.2-stable) [mandatory]"
echo " -t templates version (e.g. 3.2.stable) [mandatory]" echo " -t templates version (e.g. 3.2.stable) [mandatory]"
echo " -b build target: all|classical|mono|none (default: all)" echo " -b all|classical|mono (default: all)"
echo " --no-cleanup disable deleting pre-existing output folders (default: false)"
echo " --no-tarball disable generating source tarball (default: false)"
echo echo
exit 1 exit 1
;; ;;
@@ -122,27 +122,8 @@ while getopts "h?v:t:b:n-:" opt; do
build_mono=0 build_mono=0
elif [ "$OPTARG" == "mono" ]; then elif [ "$OPTARG" == "mono" ]; then
build_classical=0 build_classical=0
elif [ "$OPTARG" == "none" ]; then
build_classical=0
build_mono=0
fi fi
;; ;;
-)
case "${OPTARG}" in
no-cleanup)
do_cleanup=0
;;
no-tarball)
make_tarball=0
;;
*)
if [ "$OPTERR" == 1 ] && [ "${optspec:0:1}" != ":" ]; then
echo "Unknown option --${OPTARG}."
exit 1
fi
;;
esac
;;
esac esac
done done
@@ -154,46 +135,34 @@ elif [[ "{$templates_version}" == *"-"* ]]; then
exit 1 exit 1
fi fi
export basedir=$(pwd)
export webdir="${basedir}/web/${templates_version}"
export reldir="${basedir}/releases/${godot_version}" export reldir="${basedir}/releases/${godot_version}"
export reldir_mono="${reldir}/mono" export reldir_mono="${reldir}/mono"
export tmpdir="${basedir}/tmp" export tmpdir="${basedir}/tmp"
export templatesdir="${tmpdir}/templates" export templatesdir="${tmpdir}/templates"
export templatesdir_mono="${tmpdir}/mono/templates" export templatesdir_mono="${tmpdir}/mono/templates"
export webdir="${basedir}/web/${templates_version}"
export steamdir="${basedir}/steam"
export godot_basename="Godot_v${godot_version}" export godot_basename="Godot_v${godot_version}"
# Cleanup and setup # Cleanup and setup
if [ "${do_cleanup}" == "1" ]; then rm -rf ${webdir}
rm -rf ${reldir}
rm -rf ${tmpdir}
rm -rf ${reldir} mkdir -p ${webdir}
rm -rf ${tmpdir} mkdir -p ${reldir}
rm -rf ${webdir} mkdir -p ${reldir_mono}
rm -rf ${steamdir} mkdir -p ${templatesdir}
mkdir -p ${templatesdir_mono}
mkdir -p ${reldir}
mkdir -p ${reldir_mono}
mkdir -p ${templatesdir}
mkdir -p ${templatesdir_mono}
mkdir -p ${webdir}
if [ -d out/windows/steam ]; then
mkdir -p ${steamdir}
fi
fi
# Tarball # Tarball
if [ "${make_tarball}" == "1" ]; then zcat godot-${godot_version}.tar.gz | xz -c > ${reldir}/godot-${godot_version}.tar.xz
pushd ${reldir}
zcat godot-${godot_version}.tar.gz | xz -c > ${reldir}/godot-${godot_version}.tar.xz sha256sum godot-${godot_version}.tar.xz > godot-${godot_version}.tar.xz.sha256
pushd ${reldir} popd
sha256sum godot-${godot_version}.tar.xz > godot-${godot_version}.tar.xz.sha256
popd
fi
# Classical # Classical
@@ -202,159 +171,135 @@ if [ "${build_classical}" == "1" ]; then
## Linux (Classical) ## ## Linux (Classical) ##
# Editor # Editor
binname="${godot_basename}_linux.x86_64" binname="${godot_basename}_x11.64"
cp out/linux/x86_64/tools/godot.linuxbsd.editor.x86_64 ${binname} cp out/linux/x64/tools/godot.x11.opt.tools.64 ${binname}
zip -q -9 "${reldir}/${binname}.zip" ${binname} zip -q -9 "${reldir}/${binname}.zip" ${binname}
rm ${binname} rm ${binname}
binname="${godot_basename}_linux.x86_32" binname="${godot_basename}_x11.32"
cp out/linux/x86_32/tools/godot.linuxbsd.editor.x86_32 ${binname} cp out/linux/x86/tools/godot.x11.opt.tools.32 ${binname}
zip -q -9 "${reldir}/${binname}.zip" ${binname} zip -q -9 "${reldir}/${binname}.zip" ${binname}
rm ${binname} rm ${binname}
binname="${godot_basename}_linux.arm64" binname="${godot_basename}_linux.arm64"
cp out/linux/arm64/tools/godot.linuxbsd.editor.arm64 ${binname} cp out/linux/arm64/tools/godot.x11.opt.tools.arm64 ${binname}
zip -q -9 "${reldir}/${binname}.zip" ${binname} zip -q -9 "${reldir}/${binname}.zip" ${binname}
rm ${binname} rm ${binname}
binname="${godot_basename}_linux.arm32" binname="${godot_basename}_linux.arm32"
cp out/linux/arm32/tools/godot.linuxbsd.editor.arm32 ${binname} cp out/linux/arm/tools/godot.x11.opt.tools.arm ${binname}
zip -q -9 "${reldir}/${binname}.zip" ${binname} zip -q -9 "${reldir}/${binname}.zip" ${binname}
rm ${binname} rm ${binname}
# ICU data
if [ -f ${basedir}/git/thirdparty/icu4c/icudt_godot.dat ]; then
cp ${basedir}/git/thirdparty/icu4c/icudt_godot.dat ${templatesdir}/icudt_godot.dat
else
echo "icudt_godot.dat" not found.
fi
# Templates # Templates
cp out/linux/x86_64/templates/godot.linuxbsd.template_release.x86_64 ${templatesdir}/linux_release.x86_64 cp out/linux/x64/templates/godot.x11.opt.64 ${templatesdir}/linux_x11_64_release
cp out/linux/x86_64/templates/godot.linuxbsd.template_debug.x86_64 ${templatesdir}/linux_debug.x86_64 cp out/linux/x64/templates/godot.x11.opt.debug.64 ${templatesdir}/linux_x11_64_debug
cp out/linux/x86_32/templates/godot.linuxbsd.template_release.x86_32 ${templatesdir}/linux_release.x86_32 cp out/linux/x86/templates/godot.x11.opt.32 ${templatesdir}/linux_x11_32_release
cp out/linux/x86_32/templates/godot.linuxbsd.template_debug.x86_32 ${templatesdir}/linux_debug.x86_32 cp out/linux/x86/templates/godot.x11.opt.debug.32 ${templatesdir}/linux_x11_32_debug
cp out/linux/arm64/templates/godot.linuxbsd.template_release.arm64 ${templatesdir}/linux_release.arm64 cp out/linux/arm64/templates/godot.x11.opt.arm64 ${templatesdir}/linux_x11_arm64_release
cp out/linux/arm64/templates/godot.linuxbsd.template_debug.arm64 ${templatesdir}/linux_debug.arm64 cp out/linux/arm64/templates/godot.x11.opt.debug.arm64 ${templatesdir}/linux_x11_arm64_debug
cp out/linux/arm32/templates/godot.linuxbsd.template_release.arm32 ${templatesdir}/linux_release.arm32 cp out/linux/arm/templates/godot.x11.opt.arm ${templatesdir}/linux_x11_arm32_release
cp out/linux/arm32/templates/godot.linuxbsd.template_debug.arm32 ${templatesdir}/linux_debug.arm32 cp out/linux/arm/templates/godot.x11.opt.debug.arm ${templatesdir}/linux_x11_arm32_debug
## Windows (Classical) ## ## Windows (Classical) ##
# Editor # Editor
binname="${godot_basename}_win64.exe" binname="${godot_basename}_win64.exe"
wrpname="${godot_basename}_win64_console.exe" batname="${godot_basename}_win64_console.cmd"
cp out/windows/x86_64/tools/godot.windows.editor.x86_64.exe ${binname} cp out/windows/x64/tools/godot.windows.opt.tools.64.exe ${binname}
strip ${binname}
sign_windows ${binname} sign_windows ${binname}
cp out/windows/x86_64/tools/godot.windows.editor.x86_64.console.exe ${wrpname} echo "@echo off" > ${batname}
sign_windows ${wrpname} echo ${binname} >> ${batname}
zip -q -9 "${reldir}/${binname}.zip" ${binname} ${wrpname} echo "pause > nul" >> ${batname}
rm ${binname} ${wrpname} zip -q -9 "${reldir}/${binname}.zip" ${binname} ${batname}
rm ${binname} ${batname}
binname="${godot_basename}_win32.exe" binname="${godot_basename}_win32.exe"
wrpname="${godot_basename}_win32_console.exe" batname="${godot_basename}_win32_console.cmd"
cp out/windows/x86_32/tools/godot.windows.editor.x86_32.exe ${binname} cp out/windows/x86/tools/godot.windows.opt.tools.32.exe ${binname}
strip ${binname}
sign_windows ${binname} sign_windows ${binname}
cp out/windows/x86_32/tools/godot.windows.editor.x86_32.console.exe ${wrpname} echo "@echo off" > ${batname}
sign_windows ${wrpname} echo ${binname} >> ${batname}
zip -q -9 "${reldir}/${binname}.zip" ${binname} ${wrpname} echo "pause > nul" >> ${batname}
rm ${binname} ${wrpname} zip -q -9 "${reldir}/${binname}.zip" ${binname} ${batname}
rm ${binname} ${batname}
binname="${godot_basename}_windows_arm64.exe"
wrpname="${godot_basename}_windows_arm64_console.exe"
cp out/windows/arm64/tools/godot.windows.editor.arm64.llvm.exe ${binname}
sign_windows ${binname}
cp out/windows/arm64/tools/godot.windows.editor.arm64.llvm.console.exe ${wrpname}
sign_windows ${wrpname}
zip -q -9 "${reldir}/${binname}.zip" ${binname} ${wrpname}
rm ${binname} ${wrpname}
# Templates # Templates
cp out/windows/x86_64/templates/godot.windows.template_release.x86_64.exe ${templatesdir}/windows_release_x86_64.exe cp out/windows/x64/templates/godot.windows.opt.64.exe ${templatesdir}/windows_64_release.exe
cp out/windows/x86_64/templates/godot.windows.template_debug.x86_64.exe ${templatesdir}/windows_debug_x86_64.exe cp out/windows/x64/templates/godot.windows.opt.debug.64.exe ${templatesdir}/windows_64_debug.exe
cp out/windows/x86_32/templates/godot.windows.template_release.x86_32.exe ${templatesdir}/windows_release_x86_32.exe cp out/windows/x86/templates/godot.windows.opt.32.exe ${templatesdir}/windows_32_release.exe
cp out/windows/x86_32/templates/godot.windows.template_debug.x86_32.exe ${templatesdir}/windows_debug_x86_32.exe cp out/windows/x86/templates/godot.windows.opt.debug.32.exe ${templatesdir}/windows_32_debug.exe
cp out/windows/arm64/templates/godot.windows.template_release.arm64.llvm.exe ${templatesdir}/windows_release_arm64.exe strip ${templatesdir}/windows*.exe
cp out/windows/arm64/templates/godot.windows.template_debug.arm64.llvm.exe ${templatesdir}/windows_debug_arm64.exe
cp out/windows/x86_64/templates/godot.windows.template_release.x86_64.console.exe ${templatesdir}/windows_release_x86_64_console.exe
cp out/windows/x86_64/templates/godot.windows.template_debug.x86_64.console.exe ${templatesdir}/windows_debug_x86_64_console.exe
cp out/windows/x86_32/templates/godot.windows.template_release.x86_32.console.exe ${templatesdir}/windows_release_x86_32_console.exe
cp out/windows/x86_32/templates/godot.windows.template_debug.x86_32.console.exe ${templatesdir}/windows_debug_x86_32_console.exe
cp out/windows/arm64/templates/godot.windows.template_release.arm64.llvm.console.exe ${templatesdir}/windows_release_arm64_console.exe
cp out/windows/arm64/templates/godot.windows.template_debug.arm64.llvm.console.exe ${templatesdir}/windows_debug_arm64_console.exe
## macOS (Classical) ## ## OSX (Classical) ##
# Editor # Editor
binname="${godot_basename}_macos.universal" binname="${godot_basename}_osx.universal"
rm -rf Godot.app rm -rf Godot.app
cp -r git/misc/dist/macos_tools.app Godot.app cp -r git/misc/dist/osx_tools.app Godot.app
mkdir -p Godot.app/Contents/MacOS mkdir -p Godot.app/Contents/MacOS
cp out/macos/tools/godot.macos.editor.universal Godot.app/Contents/MacOS/Godot cp out/macosx/tools/godot.osx.opt.tools.universal Godot.app/Contents/MacOS/Godot
chmod +x Godot.app/Contents/MacOS/Godot chmod +x Godot.app/Contents/MacOS/Godot
zip -q -9 -r "${reldir}/${binname}.zip" Godot.app zip -q -9 -r "${reldir}/${binname}.zip" Godot.app
rm -rf Godot.app rm -rf Godot.app
sign_macos ${reldir} ${binname} 0 sign_macos ${reldir} ${binname} 0
# Templates # Templates
rm -rf macos_template.app rm -rf osx_template.app
cp -r git/misc/dist/macos_template.app . cp -r git/misc/dist/osx_template.app .
mkdir -p macos_template.app/Contents/MacOS mkdir -p osx_template.app/Contents/MacOS
cp out/macos/templates/godot.macos.template_release.universal macos_template.app/Contents/MacOS/godot_macos_release.universal cp out/macosx/templates/godot.osx.opt.universal osx_template.app/Contents/MacOS/godot_osx_release.64
cp out/macos/templates/godot.macos.template_debug.universal macos_template.app/Contents/MacOS/godot_macos_debug.universal cp out/macosx/templates/godot.osx.opt.debug.universal osx_template.app/Contents/MacOS/godot_osx_debug.64
chmod +x macos_template.app/Contents/MacOS/godot_macos* chmod +x osx_template.app/Contents/MacOS/godot_osx*
zip -q -9 -r "${templatesdir}/macos.zip" macos_template.app zip -q -9 -r "${templatesdir}/osx.zip" osx_template.app
rm -rf macos_template.app rm -rf osx_template.app
sign_macos_template ${templatesdir} 0 sign_macos_template ${templatesdir} 0
## Steam (Classical) ## ## Server (Classical) ##
if [ -d out/windows/steam ]; then # Headless (editor)
cp out/windows/steam/godot.windows.editor.x86_64.exe ${steamdir}/godot.windows.opt.tools.64.exe binname="${godot_basename}_linux_headless.64"
cp out/windows/steam/godot.windows.editor.x86_32.exe ${steamdir}/godot.windows.opt.tools.32.exe cp out/server/x64/tools/godot_server.x11.opt.tools.64 ${binname}
sign_windows ${steamdir}/godot.windows.opt.tools.64.exe strip ${binname}
sign_windows ${steamdir}/godot.windows.opt.tools.32.exe zip -q -9 "${reldir}/${binname}.zip" ${binname}
unzip ${reldir}/${godot_basename}_linux.x86_64.zip -d ${steamdir}/ rm ${binname}
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
## Web (Classical) ## # Server (template)
binname="${godot_basename}_linux_server.64"
cp out/server/x64/templates/godot_server.x11.opt.64 ${binname}
strip ${binname}
zip -q -9 "${reldir}/${binname}.zip" ${binname}
rm ${binname}
## Javascript (Classical) ##
# Editor # Editor
unzip out/web/tools/godot.web.editor.wasm32.zip -d ${webdir}/ unzip out/javascript/tools/godot.javascript.opt.tools.threads.zip -d ${webdir}/
brotli --keep --force --quality=11 ${webdir}/* brotli --keep --force --quality=11 ${webdir}/*
binname="${godot_basename}_web_editor.zip" binname="${godot_basename}_web_editor.zip"
cp out/web/tools/godot.web.editor.wasm32.zip ${reldir}/${binname} cp out/javascript/tools/godot.javascript.opt.tools.threads.zip ${reldir}/${binname}
# Templates # Templates
cp out/web/templates/godot.web.template_release.wasm32.zip ${templatesdir}/web_release.zip cp out/javascript/templates/godot.javascript.opt.zip ${templatesdir}/webassembly_release.zip
cp out/web/templates/godot.web.template_debug.wasm32.zip ${templatesdir}/web_debug.zip cp out/javascript/templates/godot.javascript.opt.debug.zip ${templatesdir}/webassembly_debug.zip
cp out/web/templates/godot.web.template_release.wasm32.nothreads.zip ${templatesdir}/web_nothreads_release.zip cp out/javascript/templates/godot.javascript.opt.threads.zip ${templatesdir}/webassembly_threads_release.zip
cp out/web/templates/godot.web.template_debug.wasm32.nothreads.zip ${templatesdir}/web_nothreads_debug.zip cp out/javascript/templates/godot.javascript.opt.debug.threads.zip ${templatesdir}/webassembly_threads_debug.zip
cp out/web/templates/godot.web.template_release.wasm32.dlink.zip ${templatesdir}/web_dlink_release.zip cp out/javascript/templates/godot.javascript.opt.gdnative.zip ${templatesdir}/webassembly_gdnative_release.zip
cp out/web/templates/godot.web.template_debug.wasm32.dlink.zip ${templatesdir}/web_dlink_debug.zip cp out/javascript/templates/godot.javascript.opt.debug.gdnative.zip ${templatesdir}/webassembly_gdnative_debug.zip
cp out/web/templates/godot.web.template_release.wasm32.nothreads.dlink.zip ${templatesdir}/web_dlink_nothreads_release.zip
cp out/web/templates/godot.web.template_debug.wasm32.nothreads.dlink.zip ${templatesdir}/web_dlink_nothreads_debug.zip
## Android (Classical) ## ## Android (Classical) ##
# Lib for direct download # Lib for direct download
cp out/android/templates/godot-lib.template_release.aar ${reldir}/godot-lib.${templates_version}.template_release.aar cp out/android/templates/godot-lib.release.aar ${reldir}/godot-lib.${templates_version}.release.aar
# Editor # Editor
binname="${godot_basename}_android_editor.apk" binname="${godot_basename}_android_editor.apk"
cp out/android/tools/android_editor.apk ${reldir}/${binname} cp out/android/tools/android_editor.apk ${reldir}/${binname}
binname="${godot_basename}_android_editor_horizonos.apk"
cp out/android/tools/android_editor_horizonos.apk ${reldir}/${binname}
binname="${godot_basename}_android_editor_picoos.apk"
cp out/android/tools/android_editor_picoos.apk ${reldir}/${binname}
binname="${godot_basename}_android_editor.aab" binname="${godot_basename}_android_editor.aab"
cp out/android/tools/android_editor.aab ${reldir}/${binname} cp out/android/tools/android_editor.aab ${reldir}/${binname}
@@ -366,17 +311,58 @@ if [ "${build_classical}" == "1" ]; then
rm -rf ios_xcode rm -rf ios_xcode
cp -r git/misc/dist/ios_xcode ios_xcode cp -r git/misc/dist/ios_xcode ios_xcode
cp out/ios/templates/libgodot.ios.simulator.a ios_xcode/libgodot.ios.release.xcframework/ios-arm64_x86_64-simulator/libgodot.a cp out/ios/templates/libgodot.iphone.simulator.a ios_xcode/libgodot.iphone.release.xcframework/ios-arm64_x86_64-simulator/libgodot.a
cp out/ios/templates/libgodot.ios.debug.simulator.a ios_xcode/libgodot.ios.debug.xcframework/ios-arm64_x86_64-simulator/libgodot.a cp out/ios/templates/libgodot.iphone.debug.simulator.a ios_xcode/libgodot.iphone.debug.xcframework/ios-arm64_x86_64-simulator/libgodot.a
cp out/ios/templates/libgodot.ios.a ios_xcode/libgodot.ios.release.xcframework/ios-arm64/libgodot.a cp out/ios/templates/libgodot.iphone.a ios_xcode/libgodot.iphone.release.xcframework/ios-arm64/libgodot.a
cp out/ios/templates/libgodot.ios.debug.a ios_xcode/libgodot.ios.debug.xcframework/ios-arm64/libgodot.a cp out/ios/templates/libgodot.iphone.debug.a ios_xcode/libgodot.iphone.debug.xcframework/ios-arm64/libgodot.a
cp -r deps/moltenvk/MoltenVK/MoltenVK.xcframework ios_xcode/
rm -rf ios_xcode/MoltenVK.xcframework/{macos,tvos}*
cd ios_xcode cd ios_xcode
zip -q -9 -r "${templatesdir}/ios.zip" * zip -q -9 -r "${templatesdir}/iphone.zip" *
cd .. cd ..
rm -rf ios_xcode rm -rf ios_xcode
## UWP (Classical) ##
if [ -d "out/uwp" ]; then
# UWP is now optional as it's tricky to get a reproducible build container for it.
if [ ! -d "deps/angle-uwp" ]; then
echo "Downloading ANGLE binaries from https://github.com/godotengine/godot-build-scripts/releases/tag/_deps/"
mkdir -p deps && cd deps
curl -L -o angle-uwp.7z https://github.com/godotengine/godot-build-scripts/releases/download/_deps/angle-uwp-2.1.13.7z
7z x angle-uwp.7z && rm -f angle-uwp.7z
cd ..
fi
rm -rf uwp_template_*
for arch in ARM Win32 x64; do
cp -r git/misc/dist/uwp_template uwp_template_${arch}
cp deps/angle-uwp/${arch}/libEGL.dll \
deps/angle-uwp/${arch}/libGLESv2.dll \
uwp_template_${arch}/
cp -r uwp_template_${arch} uwp_template_${arch}_debug
done
cp out/uwp/arm/godot.uwp.opt.32.arm.exe uwp_template_ARM/godot.uwp.exe
cp out/uwp/arm/godot.uwp.opt.debug.32.arm.exe uwp_template_ARM_debug/godot.uwp.exe
cd uwp_template_ARM && zip -q -9 -r "${templatesdir}/uwp_arm_release.zip" * && cd ..
cd uwp_template_ARM_debug && zip -q -9 -r "${templatesdir}/uwp_arm_debug.zip" * && cd ..
rm -rf uwp_template_ARM*
cp out/uwp/x86/godot.uwp.opt.32.x86.exe uwp_template_Win32/godot.uwp.exe
cp out/uwp/x86/godot.uwp.opt.debug.32.x86.exe uwp_template_Win32_debug/godot.uwp.exe
cd uwp_template_Win32 && zip -q -9 -r "${templatesdir}/uwp_x86_release.zip" * && cd ..
cd uwp_template_Win32_debug && zip -q -9 -r "${templatesdir}/uwp_x86_debug.zip" * && cd ..
rm -rf uwp_template_Win32*
cp out/uwp/x64/godot.uwp.opt.64.x64.exe uwp_template_x64/godot.uwp.exe
cp out/uwp/x64/godot.uwp.opt.debug.64.x64.exe uwp_template_x64_debug/godot.uwp.exe
cd uwp_template_x64 && zip -q -9 -r "${templatesdir}/uwp_x64_release.zip" * && cd ..
cd uwp_template_x64_debug && zip -q -9 -r "${templatesdir}/uwp_x64_debug.zip" * && cd ..
rm -rf uwp_template_x64*
else
echo "Skipping UWP templates as no builds were found."
fi
## Templates TPZ (Classical) ## ## Templates TPZ (Classical) ##
echo "${templates_version}" > ${templatesdir}/version.txt echo "${templates_version}" > ${templatesdir}/version.txt
@@ -401,161 +387,172 @@ if [ "${build_mono}" == "1" ]; then
## Linux (Mono) ## ## Linux (Mono) ##
# Editor # Editor
binbasename="${godot_basename}_mono_linux" binbasename="${godot_basename}_mono_x11"
mkdir -p ${binbasename}_x86_64 mkdir -p ${binbasename}_64
cp out/linux/x86_64/tools-mono/godot.linuxbsd.editor.x86_64.mono ${binbasename}_x86_64/${binbasename}.x86_64 cp out/linux/x64/tools-mono/godot.x11.opt.tools.64.mono ${binbasename}_64/${binbasename}.64
cp -rp out/linux/x86_64/tools-mono/GodotSharp ${binbasename}_x86_64/ cp -rp out/linux/x64/tools-mono/GodotSharp ${binbasename}_64/
zip -r -q -9 "${reldir_mono}/${binbasename}_x86_64.zip" ${binbasename}_x86_64 cp -rp out/aot-compilers ${binbasename}_64/GodotSharp/Tools/
rm -rf ${binbasename}_x86_64 zip -r -q -9 "${reldir_mono}/${binbasename}_64.zip" ${binbasename}_64
rm -rf ${binbasename}_64
binbasename="${godot_basename}_mono_linux" binbasename="${godot_basename}_mono_x11"
mkdir -p ${binbasename}_x86_32 mkdir -p ${binbasename}_32
cp out/linux/x86_32/tools-mono/godot.linuxbsd.editor.x86_32.mono ${binbasename}_x86_32/${binbasename}.x86_32 cp out/linux/x86/tools-mono/godot.x11.opt.tools.32.mono ${binbasename}_32/${binbasename}.32
cp -rp out/linux/x86_32/tools-mono/GodotSharp/ ${binbasename}_x86_32/ cp -rp out/linux/x86/tools-mono/GodotSharp/ ${binbasename}_32/
zip -r -q -9 "${reldir_mono}/${binbasename}_x86_32.zip" ${binbasename}_x86_32 cp -rp out/aot-compilers ${binbasename}_32/GodotSharp/Tools/
rm -rf ${binbasename}_x86_32 zip -r -q -9 "${reldir_mono}/${binbasename}_32.zip" ${binbasename}_32
rm -rf ${binbasename}_32
binbasename="${godot_basename}_mono_linux"
mkdir -p ${binbasename}_arm64
cp out/linux/arm64/tools-mono/godot.linuxbsd.editor.arm64.mono ${binbasename}_arm64/${binbasename}.arm64
cp -rp out/linux/arm64/tools-mono/GodotSharp/ ${binbasename}_arm64/
zip -r -q -9 "${reldir_mono}/${binbasename}_arm64.zip" ${binbasename}_arm64
rm -rf ${binbasename}_arm64
binbasename="${godot_basename}_mono_linux"
mkdir -p ${binbasename}_arm32
cp out/linux/arm32/tools-mono/godot.linuxbsd.editor.arm32.mono ${binbasename}_arm32/${binbasename}.arm32
cp -rp out/linux/arm32/tools-mono/GodotSharp/ ${binbasename}_arm32/
zip -r -q -9 "${reldir_mono}/${binbasename}_arm32.zip" ${binbasename}_arm32
rm -rf ${binbasename}_arm32
# ICU data
if [ -f ${basedir}/git/thirdparty/icu4c/icudt_godot.dat ]; then
cp ${basedir}/git/thirdparty/icu4c/icudt_godot.dat ${templatesdir_mono}/icudt_godot.dat
else
echo "icudt_godot.dat" not found.
fi
# Templates # Templates
cp out/linux/x86_64/templates-mono/godot.linuxbsd.template_debug.x86_64.mono ${templatesdir_mono}/linux_debug.x86_64 cp -rp out/linux/x64/templates-mono/data.mono.x11.64.* ${templatesdir_mono}/
cp out/linux/x86_64/templates-mono/godot.linuxbsd.template_release.x86_64.mono ${templatesdir_mono}/linux_release.x86_64 cp out/linux/x64/templates-mono/godot.x11.opt.debug.64.mono ${templatesdir_mono}/linux_x11_64_debug
cp out/linux/x86_32/templates-mono/godot.linuxbsd.template_debug.x86_32.mono ${templatesdir_mono}/linux_debug.x86_32 cp out/linux/x64/templates-mono/godot.x11.opt.64.mono ${templatesdir_mono}/linux_x11_64_release
cp out/linux/x86_32/templates-mono/godot.linuxbsd.template_release.x86_32.mono ${templatesdir_mono}/linux_release.x86_32 cp -rp out/linux/x86/templates-mono/data.mono.x11.32.* ${templatesdir_mono}/
cp out/linux/arm64/templates-mono/godot.linuxbsd.template_debug.arm64.mono ${templatesdir_mono}/linux_debug.arm64 cp out/linux/x86/templates-mono/godot.x11.opt.debug.32.mono ${templatesdir_mono}/linux_x11_32_debug
cp out/linux/arm64/templates-mono/godot.linuxbsd.template_release.arm64.mono ${templatesdir_mono}/linux_release.arm64 cp out/linux/x86/templates-mono/godot.x11.opt.32.mono ${templatesdir_mono}/linux_x11_32_release
cp out/linux/arm32/templates-mono/godot.linuxbsd.template_debug.arm32.mono ${templatesdir_mono}/linux_debug.arm32
cp out/linux/arm32/templates-mono/godot.linuxbsd.template_release.arm32.mono ${templatesdir_mono}/linux_release.arm32 mkdir -p ${templatesdir_mono}/bcl
cp -r out/linux/x64/tools-mono/GodotSharp/Mono/lib/mono/4.5/ ${templatesdir_mono}/bcl/net_4_x
## Windows (Mono) ## ## Windows (Mono) ##
# Editor # Editor
binname="${godot_basename}_mono_win64" binname="${godot_basename}_mono_win64"
wrpname="${godot_basename}_mono_win64_console" batname="${godot_basename}_mono_win64_console.cmd"
mkdir -p ${binname} mkdir -p ${binname}
cp out/windows/x86_64/tools-mono/godot.windows.editor.x86_64.mono.exe ${binname}/${binname}.exe cp out/windows/x64/tools-mono/godot.windows.opt.tools.64.mono.exe ${binname}/${binname}.exe
strip ${binname}/${binname}.exe
sign_windows ${binname}/${binname}.exe sign_windows ${binname}/${binname}.exe
cp -rp out/windows/x86_64/tools-mono/GodotSharp ${binname}/ cp -rp out/windows/x64/tools-mono/GodotSharp ${binname}/
cp out/windows/x86_64/tools-mono/godot.windows.editor.x86_64.mono.console.exe ${binname}/${wrpname}.exe cp -rp out/aot-compilers ${binname}/GodotSharp/Tools/
sign_windows ${binname}/${wrpname}.exe echo "@echo off" > ${batname}
echo ${binname}.exe >> ${batname}
echo "pause > nul" >> ${batname}
mv ${batname} ${binname}/
zip -r -q -9 "${reldir_mono}/${binname}.zip" ${binname} zip -r -q -9 "${reldir_mono}/${binname}.zip" ${binname}
rm -rf ${binname} rm -rf ${binname}
binname="${godot_basename}_mono_win32" binname="${godot_basename}_mono_win32"
wrpname="${godot_basename}_mono_win32_console" batname="${godot_basename}_mono_win32_console.cmd"
mkdir -p ${binname} mkdir -p ${binname}
cp out/windows/x86_32/tools-mono/godot.windows.editor.x86_32.mono.exe ${binname}/${binname}.exe cp out/windows/x86/tools-mono/godot.windows.opt.tools.32.mono.exe ${binname}/${binname}.exe
strip ${binname}/${binname}.exe
sign_windows ${binname}/${binname}.exe sign_windows ${binname}/${binname}.exe
cp -rp out/windows/x86_32/tools-mono/GodotSharp ${binname}/ cp -rp out/windows/x86/tools-mono/GodotSharp ${binname}/
cp out/windows/x86_32/tools-mono/godot.windows.editor.x86_32.mono.console.exe ${binname}/${wrpname}.exe cp -rp out/aot-compilers ${binname}/GodotSharp/Tools/
sign_windows ${binname}/${wrpname}.exe echo "@echo off" > ${batname}
zip -r -q -9 "${reldir_mono}/${binname}.zip" ${binname} echo ${binname}.exe >> ${batname}
rm -rf ${binname} echo "pause > nul" >> ${batname}
mv ${batname} ${binname}/
binname="${godot_basename}_mono_windows_arm64"
wrpname="${godot_basename}_mono_windows_arm64_console"
mkdir -p ${binname}
cp out/windows/arm64/tools-mono/godot.windows.editor.arm64.llvm.mono.exe ${binname}/${binname}.exe
sign_windows ${binname}/${binname}.exe
cp -rp out/windows/arm64/tools-mono/GodotSharp ${binname}/
cp out/windows/arm64/tools-mono/godot.windows.editor.arm64.llvm.mono.console.exe ${binname}/${wrpname}.exe
sign_windows ${binname}/${wrpname}.exe
zip -r -q -9 "${reldir_mono}/${binname}.zip" ${binname} zip -r -q -9 "${reldir_mono}/${binname}.zip" ${binname}
rm -rf ${binname} rm -rf ${binname}
# Templates # Templates
cp out/windows/x86_64/templates-mono/godot.windows.template_debug.x86_64.mono.exe ${templatesdir_mono}/windows_debug_x86_64.exe cp -rp out/windows/x64/templates-mono/data.mono.windows.64.* ${templatesdir_mono}/
cp out/windows/x86_64/templates-mono/godot.windows.template_release.x86_64.mono.exe ${templatesdir_mono}/windows_release_x86_64.exe cp out/windows/x64/templates-mono/godot.windows.opt.debug.64.mono.exe ${templatesdir_mono}/windows_64_debug.exe
cp out/windows/x86_32/templates-mono/godot.windows.template_debug.x86_32.mono.exe ${templatesdir_mono}/windows_debug_x86_32.exe cp out/windows/x64/templates-mono/godot.windows.opt.64.mono.exe ${templatesdir_mono}/windows_64_release.exe
cp out/windows/x86_32/templates-mono/godot.windows.template_release.x86_32.mono.exe ${templatesdir_mono}/windows_release_x86_32.exe cp -rp out/windows/x86/templates-mono/data.mono.windows.32.* ${templatesdir_mono}/
cp out/windows/arm64/templates-mono/godot.windows.template_debug.arm64.llvm.mono.exe ${templatesdir_mono}/windows_debug_arm64.exe cp out/windows/x86/templates-mono/godot.windows.opt.debug.32.mono.exe ${templatesdir_mono}/windows_32_debug.exe
cp out/windows/arm64/templates-mono/godot.windows.template_release.arm64.llvm.mono.exe ${templatesdir_mono}/windows_release_arm64.exe cp out/windows/x86/templates-mono/godot.windows.opt.32.mono.exe ${templatesdir_mono}/windows_32_release.exe
cp out/windows/x86_64/templates-mono/godot.windows.template_debug.x86_64.mono.console.exe ${templatesdir_mono}/windows_debug_x86_64_console.exe strip ${templatesdir_mono}/windows*.exe
cp out/windows/x86_64/templates-mono/godot.windows.template_release.x86_64.mono.console.exe ${templatesdir_mono}/windows_release_x86_64_console.exe
cp out/windows/x86_32/templates-mono/godot.windows.template_debug.x86_32.mono.console.exe ${templatesdir_mono}/windows_debug_x86_32_console.exe
cp out/windows/x86_32/templates-mono/godot.windows.template_release.x86_32.mono.console.exe ${templatesdir_mono}/windows_release_x86_32_console.exe
cp out/windows/arm64/templates-mono/godot.windows.template_debug.arm64.llvm.mono.console.exe ${templatesdir_mono}/windows_debug_arm64_console.exe
cp out/windows/arm64/templates-mono/godot.windows.template_release.arm64.llvm.mono.console.exe ${templatesdir_mono}/windows_release_arm64_console.exe
## macOS (Mono) ## mkdir -p ${templatesdir_mono}/bcl
cp -r out/windows/x64/tools-mono/GodotSharp/Mono/lib/mono/4.5/ ${templatesdir_mono}/bcl/net_4_x_win
## OSX (Mono) ##
# Editor # Editor
binname="${godot_basename}_mono_macos.universal" binname="${godot_basename}_mono_osx.universal"
rm -rf Godot_mono.app rm -rf Godot_mono.app
cp -r git/misc/dist/macos_tools.app Godot_mono.app cp -r git/misc/dist/osx_tools.app Godot_mono.app
mkdir -p Godot_mono.app/Contents/{MacOS,Resources} mkdir -p Godot_mono.app/Contents/{MacOS,Resources}
cp out/macos/tools-mono/godot.macos.editor.universal.mono Godot_mono.app/Contents/MacOS/Godot cp out/macosx/tools-mono/godot.osx.opt.tools.universal.mono Godot_mono.app/Contents/MacOS/Godot
cp -rp out/macos/tools-mono/GodotSharp Godot_mono.app/Contents/Resources/GodotSharp cp -rp out/macosx/tools-mono/GodotSharp Godot_mono.app/Contents/Resources/GodotSharp
cp -rp out/aot-compilers Godot_mono.app/Contents/Resources/GodotSharp/Tools/
chmod +x Godot_mono.app/Contents/MacOS/Godot chmod +x Godot_mono.app/Contents/MacOS/Godot
zip -q -9 -r "${reldir_mono}/${binname}.zip" Godot_mono.app zip -q -9 -r "${reldir_mono}/${binname}.zip" Godot_mono.app
rm -rf Godot_mono.app rm -rf Godot_mono.app
sign_macos ${reldir_mono} ${binname} 1 sign_macos ${reldir_mono} ${binname} 1
# Templates # Templates
rm -rf macos_template.app rm -rf osx_template.app
cp -r git/misc/dist/macos_template.app . cp -r git/misc/dist/osx_template.app .
mkdir -p macos_template.app/Contents/{MacOS,Resources} mkdir -p osx_template.app/Contents/{MacOS,Resources}
cp out/macos/templates-mono/godot.macos.template_debug.universal.mono macos_template.app/Contents/MacOS/godot_macos_debug.universal cp out/macosx/templates-mono/godot.osx.opt.debug.universal.mono osx_template.app/Contents/MacOS/godot_osx_debug.64
cp out/macos/templates-mono/godot.macos.template_release.universal.mono macos_template.app/Contents/MacOS/godot_macos_release.universal cp out/macosx/templates-mono/godot.osx.opt.universal.mono osx_template.app/Contents/MacOS/godot_osx_release.64
chmod +x macos_template.app/Contents/MacOS/godot_macos* cp -rp out/macosx/templates-mono/data.mono.osx.64.* osx_template.app/Contents/Resources/
zip -q -9 -r "${templatesdir_mono}/macos.zip" macos_template.app chmod +x osx_template.app/Contents/MacOS/godot_osx*
rm -rf macos_template.app zip -q -9 -r "${templatesdir_mono}/osx.zip" osx_template.app
rm -rf osx_template.app
sign_macos_template ${templatesdir_mono} 1 sign_macos_template ${templatesdir_mono} 1
## Server (Mono) ##
# Headless (editor)
binbasename="${godot_basename}_mono_linux_headless"
mkdir -p ${binbasename}_64
cp out/server/x64/tools-mono/godot_server.x11.opt.tools.64.mono ${binbasename}_64/${binbasename}.64
strip ${binbasename}_64/${binbasename}.64
cp -rp out/server/x64/tools-mono/GodotSharp ${binbasename}_64/
cp -rp out/aot-compilers ${binbasename}_64/GodotSharp/Tools/
zip -r -q -9 "${reldir_mono}/${binbasename}_64.zip" ${binbasename}_64
rm -rf ${binbasename}_64
# Server (template)
binbasename="${godot_basename}_mono_linux_server"
mkdir -p ${binbasename}_64
cp out/server/x64/templates-mono/godot_server.x11.opt.64.mono ${binbasename}_64/${binbasename}.64
strip ${binbasename}_64/${binbasename}.64
cp -rp out/server/x64/templates-mono/data.mono.server.64.release ${binbasename}_64/data_${binbasename}_64
zip -r -q -9 "${reldir_mono}/${binbasename}_64.zip" ${binbasename}_64
rm -rf ${binbasename}_64
## Javascript (Mono) ##
# Templates
cp out/javascript/templates-mono/godot.javascript.opt.debug.mono.zip ${templatesdir_mono}/webassembly_debug.zip
cp out/javascript/templates-mono/godot.javascript.opt.mono.zip ${templatesdir_mono}/webassembly_release.zip
mkdir -p ${templatesdir_mono}/bcl
cp -r out/javascript/templates-mono/bcl/wasm ${templatesdir_mono}/bcl/
## Android (Mono) ## ## Android (Mono) ##
# Lib for direct download # Lib for direct download
cp out/android/templates-mono/godot-lib.template_release.aar ${reldir_mono}/godot-lib.${templates_version}.mono.template_release.aar cp out/android/templates-mono/godot-lib.release.aar ${reldir_mono}/godot-lib.${templates_version}.mono.release.aar
# Editor
#binname="${godot_basename}_mono_android_editor.apk"
#cp out/android/tools-mono/android_editor.apk ${reldir_mono}/${binname}
# Templates # Templates
cp out/android/templates-mono/*.apk ${templatesdir_mono}/ cp out/android/templates-mono/*.apk ${templatesdir_mono}/
cp out/android/templates-mono/android_source.zip ${templatesdir_mono}/ cp out/android/templates-mono/android_source.zip ${templatesdir_mono}/
mkdir -p ${templatesdir_mono}/bcl
cp -r out/android/templates-mono/bcl/godot_android_ext ${templatesdir_mono}/bcl/
cp -r out/android/templates-mono/bcl/monodroid ${templatesdir_mono}/bcl/
## iOS (Mono) ## ## iOS (Mono) ##
rm -rf ios_xcode rm -rf ios_xcode
cp -r git/misc/dist/ios_xcode ios_xcode cp -r git/misc/dist/ios_xcode ios_xcode
cp out/ios/templates-mono/libgodot.ios.simulator.a ios_xcode/libgodot.ios.release.xcframework/ios-arm64_x86_64-simulator/libgodot.a cp out/ios/templates-mono/libgodot.iphone.simulator.a ios_xcode/libgodot.iphone.release.xcframework/ios-arm64_x86_64-simulator/libgodot.a
cp out/ios/templates-mono/libgodot.ios.debug.simulator.a ios_xcode/libgodot.ios.debug.xcframework/ios-arm64_x86_64-simulator/libgodot.a cp out/ios/templates-mono/libgodot.iphone.debug.simulator.a ios_xcode/libgodot.iphone.debug.xcframework/ios-arm64_x86_64-simulator/libgodot.a
cp out/ios/templates-mono/libgodot.ios.a ios_xcode/libgodot.ios.release.xcframework/ios-arm64/libgodot.a cp out/ios/templates-mono/libgodot.iphone.a ios_xcode/libgodot.iphone.release.xcframework/ios-arm64/libgodot.a
cp out/ios/templates-mono/libgodot.ios.debug.a ios_xcode/libgodot.ios.debug.xcframework/ios-arm64/libgodot.a cp out/ios/templates-mono/libgodot.iphone.debug.a ios_xcode/libgodot.iphone.debug.xcframework/ios-arm64/libgodot.a
cp -r deps/moltenvk/MoltenVK/MoltenVK.xcframework ios_xcode/
rm -rf ios_xcode/MoltenVK.xcframework/{macos,tvos}*
cd ios_xcode cd ios_xcode
zip -q -9 -r "${templatesdir_mono}/ios.zip" * zip -q -9 -r "${templatesdir_mono}/iphone.zip" *
cd .. cd ..
rm -rf ios_xcode rm -rf ios_xcode
# No .NET support for those platforms yet. mkdir -p ${templatesdir_mono}/bcl
cp -r out/ios/templates-mono/bcl/monotouch* ${templatesdir_mono}/bcl/
cp -r out/ios/templates-mono/iphone-mono-libs ${templatesdir_mono}
if false; then ## UWP (Mono) ##
## Web (Mono) ## # Not supported yet.
# Templates
cp out/web/templates-mono/godot.web.template_debug.wasm32.mono.zip ${templatesdir_mono}/web_debug.zip
cp out/web/templates-mono/godot.web.template_release.wasm32.mono.zip ${templatesdir_mono}/web_release.zip
fi
## Templates TPZ (Mono) ## ## Templates TPZ (Mono) ##

54
build-server/build.sh Executable file
View File

@@ -0,0 +1,54 @@
#!/bin/bash
set -e
# Config
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
export OPTIONS="production=yes"
export OPTIONS_MONO="module_mono_enabled=yes mono_static=yes mono_prefix=/root/mono-installs/desktop-linux-x86_64-release"
export TERM=xterm
export PATH="${GODOT_SDK_LINUX_X86_64}/bin:${BASE_PATH}"
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 Server..."
$SCONS platform=server $OPTIONS tools=yes target=release_debug
mkdir -p /root/out/x64/tools
cp -rvp bin/* /root/out/x64/tools
rm -rf bin
$SCONS platform=server $OPTIONS tools=no target=release
mkdir -p /root/out/x64/templates
cp -rvp bin/* /root/out/x64/templates
rm -rf bin
fi
# Mono
if [ "${MONO}" == "1" ]; then
echo "Starting Mono build for Server..."
cp /root/mono-glue/*.cpp modules/mono/glue/
cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/
cp -r /root/mono-glue/GodotSharp/GodotSharpEditor/Generated modules/mono/glue/GodotSharp/GodotSharpEditor/
$SCONS platform=server $OPTIONS $OPTIONS_MONO tools=yes target=release_debug copy_mono_root=yes
mkdir -p /root/out/x64/tools-mono
cp -rvp bin/* /root/out/x64/tools-mono
rm -rf bin
$SCONS platform=server $OPTIONS $OPTIONS_MONO tools=no target=release
mkdir -p /root/out/x64/templates-mono
cp -rvp bin/* /root/out/x64/templates-mono
rm -rf bin
fi
echo "Server build successful"

3
build-uwp/build.bat Executable file
View File

@@ -0,0 +1,3 @@
call z:\root\build\env-%1.bat
%SCONS% platform=uwp %OPTIONS% tools=no target=%2 LINK="\"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX64\%1\link.exe\""

43
build-uwp/build.sh Executable file
View File

@@ -0,0 +1,43 @@
#!/bin/bash
set -e
# Config
export SCONS="call scons -j8 verbose=yes warnings=no progress=no"
export OPTIONS="production=yes"
export BUILD_ARCHES="x86 x64 arm"
export ANGLE_SRC_PATH='c:\angle'
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 UWP..."
for arch in ${BUILD_ARCHES}; do
for release in release release_debug; do
wine cmd /c /root/build/build.bat $arch $release
sync
wineserver -kw
mkdir -p /root/out/$arch
mv bin/* /root/out/$arch
done
done
fi
# Mono
if [ "${MONO}" == "1" ]; then
echo "No Mono support for UWP yet."
#cp /root/mono-glue/*.cpp modules/mono/glue/
#cp -r /root/mono-glue/Managed/Generated modules/mono/glue/Managed/
fi
echo "UWP build successful"

36
build-uwp/env-arm.bat Executable file
View File

@@ -0,0 +1,36 @@
set ALLUSERSPROFILE=C:\ProgramData
set CommandPromptType=Native
set CommonProgramFiles=C:\Program Files\Common Files
set CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
set CommonProgramW6432=C:\Program Files\Common Files
set DevEnvDir=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\
set ExtensionSdkDir=C:\Program Files (x86)\Microsoft SDKs\Windows Kits\10\ExtensionSDKs
set Framework40Version=v4.0
set FrameworkDir=C:\Windows\Microsoft.NET\Framework64\
set FrameworkDir64=C:\Windows\Microsoft.NET\Framework64\
set FrameworkVersion=v4.0.30319
set FrameworkVersion64=v4.0.30319
set VCIDEInstallDir=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\
set VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\
set VCToolsInstallDir=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\
set VCToolsRedistDir=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Redist\MSVC\14.16.27012\
set VCToolsVersion=14.16.27023
set VisualStudioVersion=15.0
set VS150COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\
set VSCMD_ARG_app_plat=UWP
set Platform=arm
set VSCMD_ARG_HOST_ARCH=x86
set VSCMD_ARG_TGT_ARCH=arm
set VSCMD_ARG_winsdk=10.0.16299.0
set VSCMD_VER=15.0
set VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\
set Path=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\arm;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\VCPackages;C:\Program Files (x86)\Microsoft Visual Studio\2017\Build Tools\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\bin\Roslyn;C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\arm;C:\Program Files (x86)\Windows Kits\10\bin\arm;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\\MSBuild\15.0\bin;C:\Windows\Microsoft.NET\Framework\ v4.0.30319;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\;C:\Program Files\Python37\Scripts\;C:\Program Files\Python37\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\ProgramData\chocolatey\bin;C:\Program Files\OpenSSH-Win64;C:\Program Files\Git\cmd;C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps;C:\Users\user\AppData\Local\Microsoft\WindowsApps;
set INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include;C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt;C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared;C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um;C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt;C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\cppwinrt
set LIB=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\lib\arm\store\;C:\Program Files (x86)\Windows Kits\10\lib\10.0.16299.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\lib\10.0.16299.0\um\arm;
set LIBPATH=C:\Program Files (x86)\Microsoft SDKs\Windows Kits\10\ExtensionSDKs\Microsoft.VCLibs\14.0\References\CommonConfiguration\neutral;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\lib\arm\store\references;C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.16299.0;C:\Program Files (x86)\Windows Kits\10\References\10.0.16299.0;C:\Windows\Microsoft.NET\Framework\v4.0.30319;
set WindowsLibPath=C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.16299.0;C:\Program Files (x86)\Windows Kits\10\References\10.0.16299.0
set WindowsSdkBinPath=C:\Program Files (x86)\Windows Kits\10\bin\
set WindowsSdkDir=C:\Program Files (x86)\Windows Kits\10\
set WindowsSDKLibVersion=10.0.16299.0\
set WindowsSdkVerBinPath=C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\
set WindowsSDKVersion=10.0.16299.0\

35
build-uwp/env-x64.bat Executable file
View File

@@ -0,0 +1,35 @@
set ALLUSERSPROFILE=C:\ProgramData
set CommandPromptType=Native
set CommonProgramFiles=C:\Program Files\Common Files
set CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
set CommonProgramW6432=C:\Program Files\Common Files
set DevEnvDir=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\
set ExtensionSdkDir=C:\Program Files (x86)\Microsoft SDKs\Windows Kits\10\ExtensionSDKs
set Framework40Version=v4.0
set FrameworkDir=C:\Windows\Microsoft.NET\Framework64\
set FrameworkDir64=C:\Windows\Microsoft.NET\Framework64\
set FrameworkVersion=v4.0.30319
set FrameworkVersion64=v4.0.30319
set VCIDEInstallDir=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\
set VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\
set VCToolsInstallDir=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\
set VCToolsRedistDir=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Redist\MSVC\14.16.27012\
set VCToolsVersion=14.16.27023
set VisualStudioVersion=15.0
set VS150COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\
set VSCMD_ARG_app_plat=UWP
set VSCMD_ARG_HOST_ARCH=x86
set VSCMD_ARG_TGT_ARCH=x64
set VSCMD_ARG_winsdk=10.0.16299.0
set VSCMD_VER=15.0
set VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\
set Path=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\VCPackages;C:\Program Files (x86)\Microsoft Visual Studio\2017\Build Tools\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\bin\Roslyn;C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x64;C:\Program Files (x86)\Windows Kits\10\bin\x64;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\\MSBuild\15.0\bin;C:\Windows\Microsoft.NET\Framework\ v4.0.30319;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\;C:\Program Files\Python37\Scripts\;C:\Program Files\Python37\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\ProgramData\chocolatey\bin;C:\Program Files\OpenSSH-Win64;C:\Program Files\Git\cmd;C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps;C:\Users\user\AppData\Local\Microsoft\WindowsApps;
set INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include;C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt;C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared;C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um;C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt;C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\cppwinrt
set LIB=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\lib\x64\store\;C:\Program Files (x86)\Windows Kits\10\lib\10.0.16299.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\lib\10.0.16299.0\um\x64;
set LIBPATH=C:\Program Files (x86)\Microsoft SDKs\Windows Kits\10\ExtensionSDKs\Microsoft.VCLibs\14.0\References\CommonConfiguration\neutral;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\lib\x64\store\references;C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.16299.0;C:\Program Files (x86)\Windows Kits\10\References\10.0.16299.0;C:\Windows\Microsoft.NET\Framework\v4.0.30319;
set WindowsLibPath=C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.16299.0;C:\Program Files (x86)\Windows Kits\10\References\10.0.16299.0
set WindowsSdkBinPath=C:\Program Files (x86)\Windows Kits\10\bin\
set WindowsSdkDir=C:\Program Files (x86)\Windows Kits\10\
set WindowsSDKLibVersion=10.0.16299.0\
set WindowsSdkVerBinPath=C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\
set WindowsSDKVersion=10.0.16299.0\

36
build-uwp/env-x86.bat Executable file
View File

@@ -0,0 +1,36 @@
set ALLUSERSPROFILE=C:\ProgramData
set CommandPromptType=Native
set CommonProgramFiles=C:\Program Files\Common Files
set CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
set CommonProgramW6432=C:\Program Files\Common Files
set DevEnvDir=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\
set ExtensionSdkDir=C:\Program Files (x86)\Microsoft SDKs\Windows Kits\10\ExtensionSDKs
set Framework40Version=v4.0
set FrameworkDir=C:\Windows\Microsoft.NET\Framework64\
set FrameworkDir64=C:\Windows\Microsoft.NET\Framework64\
set FrameworkVersion=v4.0.30319
set FrameworkVersion64=v4.0.30319
set VCIDEInstallDir=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\
set VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\
set VCToolsInstallDir=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\
set VCToolsRedistDir=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Redist\MSVC\14.16.27012\
set VCToolsVersion=14.16.27023
set VisualStudioVersion=15.0
set VS150COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\
set VSCMD_ARG_app_plat=UWP
set VSCMD_ARG_HOST_ARCH=x86
set VSCMD_ARG_TGT_ARCH=x86
set VSCMD_ARG_winsdk=10.0.16299.0
set VSCMD_VER=15.0
set VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\
set Path=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\VCPackages;C:\Program Files (x86)\Microsoft Visual Studio\2017\Build Tools\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\bin\Roslyn;C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x86;C:\Program Files (x86)\Windows Kits\10\bin\x86;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\\MSBuild\15.0\bin;C:\Windows\Microsoft.NET\Framework\ v4.0.30319;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\;C:\Program Files\Python37\Scripts\;C:\Program Files\Python37\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\ProgramData\chocolatey\bin;C:\Program Files\OpenSSH-Win64;C:\Program Files\Git\cmd;C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps;C:\Users\user\AppData\Local\Microsoft\WindowsApps;
set INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include;C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt;C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared;C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um;C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt;C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\cppwinrt
set LIB=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\lib\x86\store\;C:\Program Files (x86)\Windows Kits\10\lib\10.0.16299.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\lib\10.0.16299.0\um\x86;
set LIBPATH=C:\Program Files (x86)\Microsoft SDKs\Windows Kits\10\ExtensionSDKs\Microsoft.VCLibs\14.0\References\CommonConfiguration\neutral;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\lib\x86\store\references;C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.16299.0;C:\Program Files (x86)\Windows Kits\10\References\10.0.16299.0;C:\Windows\Microsoft.NET\Framework\v4.0.30319;
set WindowsLibPath=C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.16299.0;C:\Program Files (x86)\Windows Kits\10\References\10.0.16299.0
set WindowsSdkBinPath=C:\Program Files (x86)\Windows Kits\10\bin\
set WindowsSdkDir=C:\Program Files (x86)\Windows Kits\10\
set WindowsSDKLibVersion=10.0.16299.0\
set WindowsSdkVerBinPath=C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\
set WindowsSDKVersion=10.0.16299.0\

View File

@@ -1,97 +0,0 @@
#!/bin/bash
set -e
# Config
# To speed up builds with single-threaded full LTO linking,
# we run all builds in parallel each from their own folder.
export NUM_JOBS=5
declare -a JOBS=(
"target=template_debug"
"target=template_release"
"target=template_debug dlink_enabled=yes"
"target=template_release dlink_enabled=yes"
)
declare -a JOBS_NOTHREADS=(
"target=template_debug threads=no"
"target=template_release threads=no"
"target=template_debug dlink_enabled=yes threads=no"
"target=template_release dlink_enabled=yes threads=no"
)
export SCONS="scons -j$(expr ${NUM_CORES} / ${NUM_JOBS}) verbose=yes warnings=no progress=no"
export OPTIONS="production=yes"
export OPTIONS_MONO="module_mono_enabled=yes -j${NUM_CORES}"
export TERM=xterm
source /root/emsdk/emsdk_env.sh
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 Web..."
for i in {0..3}; do
cp -r /root/godot /root/godot$i
cd /root/godot$i
echo "$SCONS platform=web ${OPTIONS} ${JOBS[$i]}"
$SCONS platform=web ${OPTIONS} ${JOBS[$i]} &
pids[$i]=$!
done
cd /root/godot
echo "$SCONS platform=web ${OPTIONS} target=editor use_closure_compiler=yes"
$SCONS platform=web ${OPTIONS} target=editor use_closure_compiler=yes &
pid_editor=$!
for pid in ${pids[*]}; do
wait $pid
done
wait $pid_editor
for i in {0..3}; do
cp -r /root/godot /root/godot-nothreads$i
cd /root/godot-nothreads$i
echo "$SCONS platform=web ${OPTIONS} ${JOBS_NOTHREADS[$i]}"
$SCONS platform=web ${OPTIONS} ${JOBS_NOTHREADS[$i]} &
pids_nothreads[$i]=$!
done
for pid in ${pids_nothreads[*]}; do
wait $pid
done
mkdir -p /root/out/tools
cp -rvp /root/godot/bin/*.editor*.zip /root/out/tools
mkdir -p /root/out/templates
for i in {0..3}; do
cp -rvp /root/godot$i/bin/*.zip /root/out/templates
cp -rvp /root/godot-nothreads$i/bin/*.zip /root/out/templates
done
fi
# Mono
# No Web support with .NET 6 yet.
#if [ "${MONO}" == "1" ]; then
if false; then
echo "Starting Mono build for Web..."
cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/
$SCONS platform=web ${OPTIONS} ${OPTIONS_MONO} target=template_debug
$SCONS platform=web ${OPTIONS} ${OPTIONS_MONO} target=template_release
mkdir -p /root/out/templates-mono
cp -rvp bin/*.zip /root/out/templates-mono
rm -f bin/*.zip
fi
echo "Web build successful"

View File

@@ -5,9 +5,10 @@ set -e
# Config # Config
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no" export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
export OPTIONS="production=yes use_mingw=yes angle_libs=/root/angle mesa_libs=/root/mesa d3d12=yes" export OPTIONS="production=yes"
export OPTIONS_MONO="module_mono_enabled=yes" export OPTIONS_MONO="module_mono_enabled=yes mono_static=yes"
export OPTIONS_LLVM="use_llvm=yes mingw_prefix=/root/llvm-mingw" export MONO_PREFIX_X86_64="/root/mono-installs/desktop-windows-x86_64-release"
export MONO_PREFIX_X86="/root/mono-installs/desktop-windows-x86-release"
export TERM=xterm export TERM=xterm
rm -rf godot rm -rf godot
@@ -20,49 +21,27 @@ tar xf /root/godot.tar.gz --strip-components=1
if [ "${CLASSICAL}" == "1" ]; then if [ "${CLASSICAL}" == "1" ]; then
echo "Starting classical build for Windows..." echo "Starting classical build for Windows..."
$SCONS platform=windows arch=x86_64 $OPTIONS target=editor $SCONS platform=windows bits=64 $OPTIONS tools=yes target=release_debug
mkdir -p /root/out/x86_64/tools mkdir -p /root/out/x64/tools
cp -rvp bin/* /root/out/x86_64/tools cp -rvp bin/* /root/out/x64/tools
rm -rf bin rm -rf bin
$SCONS platform=windows arch=x86_64 $OPTIONS target=template_debug $SCONS platform=windows bits=64 $OPTIONS tools=no target=release_debug
$SCONS platform=windows arch=x86_64 $OPTIONS target=template_release $SCONS platform=windows bits=64 $OPTIONS tools=no target=release
mkdir -p /root/out/x86_64/templates mkdir -p /root/out/x64/templates
cp -rvp bin/* /root/out/x86_64/templates cp -rvp bin/* /root/out/x64/templates
rm -rf bin rm -rf bin
$SCONS platform=windows arch=x86_32 $OPTIONS target=editor $SCONS platform=windows bits=32 $OPTIONS tools=yes target=release_debug
mkdir -p /root/out/x86_32/tools mkdir -p /root/out/x86/tools
cp -rvp bin/* /root/out/x86_32/tools cp -rvp bin/* /root/out/x86/tools
rm -rf bin rm -rf bin
$SCONS platform=windows arch=x86_32 $OPTIONS target=template_debug $SCONS platform=windows bits=32 $OPTIONS tools=no target=release_debug
$SCONS platform=windows arch=x86_32 $OPTIONS target=template_release $SCONS platform=windows bits=32 $OPTIONS tools=no target=release
mkdir -p /root/out/x86_32/templates mkdir -p /root/out/x86/templates
cp -rvp bin/* /root/out/x86_32/templates cp -rvp bin/* /root/out/x86/templates
rm -rf bin rm -rf bin
$SCONS platform=windows arch=arm64 $OPTIONS $OPTIONS_LLVM target=editor
mkdir -p /root/out/arm64/tools
cp -rvp bin/* /root/out/arm64/tools
rm -rf bin
$SCONS platform=windows arch=arm64 $OPTIONS $OPTIONS_LLVM target=template_debug
$SCONS platform=windows arch=arm64 $OPTIONS $OPTIONS_LLVM target=template_release
mkdir -p /root/out/arm64/templates
cp -rvp bin/* /root/out/arm64/templates
rm -rf bin
if [ "${STEAM}" == "1" ]; then
build_name=${BUILD_NAME}
export BUILD_NAME="steam"
$SCONS platform=windows arch=x86_64 $OPTIONS target=editor steamapi=yes
$SCONS platform=windows arch=x86_32 $OPTIONS target=editor steamapi=yes
mkdir -p /root/out/steam
cp -rvp bin/* /root/out/steam
rm -rf bin
export BUILD_NAME=${build_name}
fi
fi fi
# Mono # Mono
@@ -70,43 +49,34 @@ fi
if [ "${MONO}" == "1" ]; then if [ "${MONO}" == "1" ]; then
echo "Starting Mono build for Windows..." echo "Starting Mono build for Windows..."
cp /root/mono-glue/*.cpp modules/mono/glue/
cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/ cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/
cp -r /root/mono-glue/GodotSharp/GodotSharpEditor/Generated modules/mono/glue/GodotSharp/GodotSharpEditor/ cp -r /root/mono-glue/GodotSharp/GodotSharpEditor/Generated modules/mono/glue/GodotSharp/GodotSharpEditor/
$SCONS platform=windows arch=x86_64 $OPTIONS $OPTIONS_MONO target=editor export OPTIONS_MONO_PREFIX="${OPTIONS} ${OPTIONS_MONO} mono_prefix=${MONO_PREFIX_X86_64}"
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=windows
mkdir -p /root/out/x86_64/tools-mono $SCONS platform=windows bits=64 $OPTIONS_MONO_PREFIX tools=yes target=release_debug copy_mono_root=yes
cp -rvp bin/* /root/out/x86_64/tools-mono mkdir -p /root/out/x64/tools-mono
cp -rvp bin/* /root/out/x64/tools-mono
rm -rf bin rm -rf bin
$SCONS platform=windows arch=x86_64 $OPTIONS $OPTIONS_MONO target=template_debug $SCONS platform=windows bits=64 $OPTIONS_MONO_PREFIX tools=no target=release_debug
$SCONS platform=windows arch=x86_64 $OPTIONS $OPTIONS_MONO target=template_release $SCONS platform=windows bits=64 $OPTIONS_MONO_PREFIX tools=no target=release
mkdir -p /root/out/x86_64/templates-mono mkdir -p /root/out/x64/templates-mono
cp -rvp bin/* /root/out/x86_64/templates-mono cp -rvp bin/* /root/out/x64/templates-mono
rm -rf bin rm -rf bin
$SCONS platform=windows arch=x86_32 $OPTIONS $OPTIONS_MONO target=editor export OPTIONS_MONO_PREFIX="${OPTIONS} ${OPTIONS_MONO} mono_prefix=${MONO_PREFIX_X86}"
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=windows
mkdir -p /root/out/x86_32/tools-mono $SCONS platform=windows bits=32 $OPTIONS_MONO_PREFIX tools=yes target=release_debug copy_mono_root=yes
cp -rvp bin/* /root/out/x86_32/tools-mono mkdir -p /root/out/x86/tools-mono
cp -rvp bin/* /root/out/x86/tools-mono
rm -rf bin rm -rf bin
$SCONS platform=windows arch=x86_32 $OPTIONS $OPTIONS_MONO target=template_debug $SCONS platform=windows bits=32 $OPTIONS_MONO_PREFIX tools=no target=release_debug
$SCONS platform=windows arch=x86_32 $OPTIONS $OPTIONS_MONO target=template_release $SCONS platform=windows bits=32 $OPTIONS_MONO_PREFIX tools=no target=release
mkdir -p /root/out/x86_32/templates-mono mkdir -p /root/out/x86/templates-mono
cp -rvp bin/* /root/out/x86_32/templates-mono cp -rvp bin/* /root/out/x86/templates-mono
rm -rf bin
$SCONS platform=windows arch=arm64 $OPTIONS $OPTIONS_MONO $OPTIONS_LLVM target=editor
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=windows
mkdir -p /root/out/arm64/tools-mono
cp -rvp bin/* /root/out/arm64/tools-mono
rm -rf bin
$SCONS platform=windows arch=arm64 $OPTIONS $OPTIONS_MONO $OPTIONS_LLVM target=template_debug
$SCONS platform=windows arch=arm64 $OPTIONS $OPTIONS_MONO $OPTIONS_LLVM target=template_release
mkdir -p /root/out/arm64/templates-mono
cp -rvp bin/* /root/out/arm64/templates-mono
rm -rf bin rm -rf bin
fi fi

100
build.sh
View File

@@ -7,7 +7,6 @@ OPTIND=1
export basedir="$(pwd)" export basedir="$(pwd)"
mkdir -p ${basedir}/out mkdir -p ${basedir}/out
mkdir -p ${basedir}/out/logs mkdir -p ${basedir}/out/logs
mkdir -p ${basedir}/mono-glue
# Log output to a file automatically. # Log output to a file automatically.
exec > >(tee -a "out/logs/build") 2>&1 exec > >(tee -a "out/logs/build") 2>&1
@@ -36,12 +35,12 @@ godot_version=""
git_treeish="master" git_treeish="master"
build_classical=1 build_classical=1
build_mono=1 build_mono=1
build_steam=0
force_download=0 force_download=0
skip_download=1 skip_download=1
skip_git_checkout=0 skip_git_checkout=0
build_uwp=0
while getopts "h?r:u:p:v:g:b:fsc" opt; do while getopts "h?r:u:p:v:g:b:fscw" opt; do
case "$opt" in case "$opt" in
h|\?) h|\?)
echo "Usage: $0 [OPTIONS...]" echo "Usage: $0 [OPTIONS...]"
@@ -55,6 +54,7 @@ while getopts "h?r:u:p:v:g:b:fsc" opt; do
echo " -f force redownload of all images" echo " -f force redownload of all images"
echo " -s skip downloading" echo " -s skip downloading"
echo " -c skip checkout" echo " -c skip checkout"
echo " -w build UWP templates"
echo echo
exit 1 exit 1
;; ;;
@@ -89,11 +89,18 @@ while getopts "h?r:u:p:v:g:b:fsc" opt; do
c) c)
skip_git_checkout=1 skip_git_checkout=1
;; ;;
w)
build_uwp=1
;;
esac esac
done done
export podman=${PODMAN} export podman=${PODMAN}
if [ $UID != 0 ] && grep -qv sudo <<< "${podman}"; then
echo "WARNING: Running as non-root may cause problems for the uwp build"
fi
if [ -z "${godot_version}" ]; then if [ -z "${godot_version}" ]; then
echo "-v <version> is mandatory!" echo "-v <version> is mandatory!"
exit 1 exit 1
@@ -109,10 +116,6 @@ case "$choice" in
esac esac
export GODOT_VERSION_STATUS="${status}" export GODOT_VERSION_STATUS="${status}"
if [ "${status}" == "stable" ]; then
build_steam=1
fi
if [ ! -z "${username}" ] && [ ! -z "${password}" ]; then if [ ! -z "${username}" ] && [ ! -z "${password}" ]; then
if ${podman} login ${registry} -u "${username}" -p "${password}"; then if ${podman} login ${registry} -u "${username}" -p "${password}"; then
export logged_in=true export logged_in=true
@@ -121,7 +124,7 @@ fi
if [ $skip_download == 0 ]; then if [ $skip_download == 0 ]; then
echo "Fetching images" echo "Fetching images"
for image in windows linux web; do for image in mono-glue windows linux javascript; do
if [ ${force_download} == 1 ] || ! ${podman} image exists godot/$image; then if [ ${force_download} == 1 ] || ! ${podman} image exists godot/$image; then
if ! ${podman} pull ${registry}/godot/${image}; then if ! ${podman} pull ${registry}/godot/${image}; then
echo "ERROR: image $image does not exist and can't be downloaded" echo "ERROR: image $image does not exist and can't be downloaded"
@@ -133,7 +136,7 @@ if [ $skip_download == 0 ]; then
if [ ! -z "${logged_in}" ]; then if [ ! -z "${logged_in}" ]; then
echo "Fetching private images" echo "Fetching private images"
for image in macosx android ios; do for image in macosx android ios uwp; do
if [ ${force_download} == 1 ] || ! ${podman} image exists godot-private/$image; then if [ ${force_download} == 1 ] || ! ${podman} image exists godot-private/$image; then
if ! ${podman} pull ${registry}/godot-private/${image}; then if ! ${podman} pull ${registry}/godot-private/${image}; then
echo "ERROR: image $image does not exist and can't be downloaded" echo "ERROR: image $image does not exist and can't be downloaded"
@@ -144,59 +147,6 @@ if [ $skip_download == 0 ]; then
fi fi
fi fi
# macOS needs MoltenVK
if [ ! -d "deps/moltenvk" ]; then
echo "Missing MoltenVK for macOS, downloading it."
mkdir -p deps/moltenvk
pushd deps/moltenvk
curl -L -o moltenvk.tar https://github.com/godotengine/moltenvk-osxcross/releases/download/vulkan-sdk-1.3.283.0-2/MoltenVK-all.tar
tar xf moltenvk.tar && rm -f moltenvk.tar
mv MoltenVK/MoltenVK/include/ MoltenVK/
mv MoltenVK/MoltenVK/static/MoltenVK.xcframework/ MoltenVK/
popd
fi
# Windows and macOS need ANGLE
if [ ! -d "deps/angle" ]; then
echo "Missing ANGLE libraries, downloading them."
mkdir -p deps/angle
pushd deps/angle
base_url=https://github.com/godotengine/godot-angle-static/releases/download/chromium%2F6601.2/godot-angle-static
curl -L -o windows_arm64.zip $base_url-arm64-llvm-release.zip
curl -L -o windows_x86_64.zip $base_url-x86_64-gcc-release.zip
curl -L -o windows_x86_32.zip $base_url-x86_32-gcc-release.zip
curl -L -o macos_arm64.zip $base_url-arm64-macos-release.zip
curl -L -o macos_x86_64.zip $base_url-x86_64-macos-release.zip
unzip -o windows_arm64.zip && rm -f windows_arm64.zip
unzip -o windows_x86_64.zip && rm -f windows_x86_64.zip
unzip -o windows_x86_32.zip && rm -f windows_x86_32.zip
unzip -o macos_arm64.zip && rm -f macos_arm64.zip
unzip -o macos_x86_64.zip && rm -f macos_x86_64.zip
popd
fi
if [ ! -d "deps/mesa" ]; then
echo "Missing Mesa/NIR libraries, downloading them."
mkdir -p deps/mesa
pushd deps/mesa
curl -L -o mesa_arm64.zip https://github.com/godotengine/godot-nir-static/releases/download/23.1.9-1/godot-nir-static-arm64-llvm-release.zip
curl -L -o mesa_x86_64.zip https://github.com/godotengine/godot-nir-static/releases/download/23.1.9-1/godot-nir-static-x86_64-gcc-release.zip
curl -L -o mesa_x86_32.zip https://github.com/godotengine/godot-nir-static/releases/download/23.1.9-1/godot-nir-static-x86_32-gcc-release.zip
unzip -o mesa_arm64.zip && rm -f mesa_arm64.zip
unzip -o mesa_x86_64.zip && rm -f mesa_x86_64.zip
unzip -o mesa_x86_32.zip && rm -f mesa_x86_32.zip
popd
fi
if [ ! -d "deps/swappy" ]; then
echo "Missing Swappy libraries, downloading them."
mkdir -p deps/swappy
pushd deps/swappy
curl -L -O https://github.com/godotengine/godot-swappy/releases/download/from-source-2025-01-31/godot-swappy.7z
7z x godot-swappy.7z && rm godot-swappy.7z
popd
fi
# Keystore for Android editor signing # Keystore for Android editor signing
# Optional - the config.sh will be copied but if it's not filled in, # Optional - the config.sh will be copied but if it's not filled in,
# it will do an unsigned build. # it will do an unsigned build.
@@ -239,27 +189,39 @@ fi
export podman_run="${podman} run -it --rm --env BUILD_NAME=${BUILD_NAME} --env GODOT_VERSION_STATUS=${GODOT_VERSION_STATUS} --env NUM_CORES=${NUM_CORES} --env CLASSICAL=${build_classical} --env MONO=${build_mono} -v ${basedir}/godot-${godot_version}.tar.gz:/root/godot.tar.gz -v ${basedir}/mono-glue:/root/mono-glue -w /root/" export podman_run="${podman} run -it --rm --env BUILD_NAME=${BUILD_NAME} --env GODOT_VERSION_STATUS=${GODOT_VERSION_STATUS} --env NUM_CORES=${NUM_CORES} --env CLASSICAL=${build_classical} --env MONO=${build_mono} -v ${basedir}/godot-${godot_version}.tar.gz:/root/godot.tar.gz -v ${basedir}/mono-glue:/root/mono-glue -w /root/"
export img_version=$IMAGE_VERSION export img_version=$IMAGE_VERSION
# Get AOT compilers from their containers.
mkdir -p ${basedir}/out/aot-compilers
${podman} run -it --rm -w /root -v ${basedir}/out/aot-compilers:/root/out localhost/godot-ios:${img_version} bash -c "cp -r /root/aot-compilers/* /root/out && chmod +x /root/out/*/*"
mkdir -p ${basedir}/mono-glue mkdir -p ${basedir}/mono-glue
${podman_run} -v ${basedir}/build-mono-glue:/root/build localhost/godot-linux:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/mono-glue ${podman_run} -v ${basedir}/build-mono-glue:/root/build localhost/godot-mono-glue:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/mono-glue
mkdir -p ${basedir}/out/windows mkdir -p ${basedir}/out/windows
${podman_run} -v ${basedir}/build-windows:/root/build -v ${basedir}/out/windows:/root/out -v ${basedir}/deps/angle:/root/angle -v ${basedir}/deps/mesa:/root/mesa --env STEAM=${build_steam} localhost/godot-windows:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/windows ${podman_run} -v ${basedir}/build-windows:/root/build -v ${basedir}/out/windows:/root/out localhost/godot-windows:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/windows
mkdir -p ${basedir}/out/linux mkdir -p ${basedir}/out/linux
${podman_run} -v ${basedir}/build-linux:/root/build -v ${basedir}/out/linux:/root/out localhost/godot-linux:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/linux ${podman_run} -v ${basedir}/build-linux:/root/build -v ${basedir}/out/linux:/root/out localhost/godot-linux:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/linux
mkdir -p ${basedir}/out/web mkdir -p ${basedir}/out/javascript
${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 ${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
mkdir -p ${basedir}/out/macos mkdir -p ${basedir}/out/macosx
${podman_run} -v ${basedir}/build-macos:/root/build -v ${basedir}/out/macos:/root/out -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-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
mkdir -p ${basedir}/out/android 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 ${podman_run} -v ${basedir}/build-android:/root/build -v ${basedir}/out/android:/root/out -v ${basedir}/deps/keystore:/root/keystore localhost/godot-android:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/android
mkdir -p ${basedir}/out/ios mkdir -p ${basedir}/out/ios
${podman_run} -v ${basedir}/build-ios:/root/build -v ${basedir}/out/ios:/root/out localhost/godot-ios:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/ios ${podman_run} -v ${basedir}/build-ios:/root/build -v ${basedir}/out/ios:/root/out localhost/godot-ios:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/ios
mkdir -p ${basedir}/out/server
${podman_run} -v ${basedir}/build-server:/root/build -v ${basedir}/out/server:/root/out localhost/godot-linux:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/server
if [ "${build_uwp}" == "1" ]; then
mkdir -p ${basedir}/out/uwp
${podman_run} --ulimit nofile=32768:32768 -v ${basedir}/build-uwp:/root/build -v ${basedir}/out/uwp:/root/out ${registry}/godot-private/uwp:latest bash build/build.sh 2>&1 | tee ${basedir}/out/logs/uwp
fi
uid=$(id -un) uid=$(id -un)
gid=$(id -gn) gid=$(id -gn)
if [ ! -z "$SUDO_UID" ]; then if [ ! -z "$SUDO_UID" ]; then

View File

@@ -1,3 +1,3 @@
#!/bin/bash #!/bin/bash
rm -rf releases steam tmp web rm -rf releases tmp web

View File

@@ -1,4 +1,4 @@
#!/bin/bash #!/bin/bash
rm -rf godot*.tar.gz mono-glue out releases steam tmp web rm -rf godot*.tar.gz mono-glue out releases tmp web
git status git status

View File

@@ -10,7 +10,7 @@
# These scripts are designed and tested against podman. They may also work # These scripts are designed and tested against podman. They may also work
# with docker, but it's not guaranteed. You can set this variable to the # with docker, but it's not guaranteed. You can set this variable to the
# relevant tool in your PATH or an absolute path to run it from. # relevant tool in your PATH or an absolute path to run it from.
export PODMAN='podman' export PODMAN='sudo podman'
# GitHub token for @GodotBuilder for releases on godotengine/godot-builds, # GitHub token for @GodotBuilder for releases on godotengine/godot-builds,
# can use a long expiry date. # can use a long expiry date.
@@ -25,12 +25,6 @@ export GODOT_BUILDS_PATH=''
# Path to the directory with the Steam upload setup. # Path to the directory with the Steam upload setup.
export UPLOAD_STEAM_PATH='' export UPLOAD_STEAM_PATH=''
# Path to the directory with the EGS upload setup.
export UPLOAD_EGS_PATH=''
# Path to the 'butler' binary for upload of stable releases to itch.io.
export UPLOAD_ITCH_BUTLER=''
# SSH hostname to upload Web editor builds to. # SSH hostname to upload Web editor builds to.
# Only used for uploading official releases. # Only used for uploading official releases.
export WEB_EDITOR_HOSTNAME='' export WEB_EDITOR_HOSTNAME=''
@@ -44,7 +38,7 @@ export WEB_EDITOR_HOSTNAME=''
export REGISTRY='registry.prehensile-tales.com' export REGISTRY='registry.prehensile-tales.com'
# Version string of the images to use in build.sh. # Version string of the images to use in build.sh.
export IMAGE_VERSION='4.x-f36' export IMAGE_VERSION='3.7-f42-mono-6.12.0.206'
# Default build name used to distinguish between official and custom builds. # Default build name used to distinguish between official and custom builds.
export BUILD_NAME='custom_build' export BUILD_NAME='custom_build'
@@ -52,19 +46,13 @@ export BUILD_NAME='custom_build'
# Default number of parallel cores for each build. # Default number of parallel cores for each build.
export NUM_CORES=16 export NUM_CORES=16
# Set up your own signing keystore and relevant details below. # Set up your own Windows signing details below.
# If you do not fill all SIGN_* fields, signing will be skipped. # If you do not fill all WINDOWS_SIGN_* fields, signing will be skipped.
# Path to pkcs12 archive.
export SIGN_KEYSTORE=''
# Password for the private key.
export SIGN_PASSWORD=''
# Name and URL of the signed application. # Name and URL of the signed application.
# Use your own when making a thirdparty build. # Use your own when making a thirdparty build.
export SIGN_NAME='' export WINDOWS_SIGN_NAME=''
export SIGN_URL='' export WINDOWS_SIGN_URL=''
# Hostname or IP address of an OSX host (Needed for signing) # Hostname or IP address of an OSX host (Needed for signing)
# eg 'user@10.1.0.10' # eg 'user@10.1.0.10'
@@ -78,11 +66,6 @@ export APPLE_TEAM=''
export APPLE_ID='' export APPLE_ID=''
export APPLE_ID_PASSWORD='' export APPLE_ID_PASSWORD=''
# NuGet source for publishing .NET packages
export NUGET_SOURCE='nuget.org'
# API key for publishing NuGet packages to nuget.org
export NUGET_API_KEY=''
# MavenCentral (sonatype) credentials # MavenCentral (sonatype) credentials
export OSSRH_GROUP_ID='' export OSSRH_GROUP_ID=''
export OSSRH_USERNAME='' export OSSRH_USERNAME=''

View File

@@ -11,17 +11,15 @@ exec > >(tee -a "out/logs/publish-release") 2>&1
source ./config.sh source ./config.sh
godot_version="" godot_version=""
latest_stable=0
skip_stable=0 skip_stable=0
draft_arg="" draft_arg=""
while getopts "h?v:lsd" opt; do while getopts "h?v:sd" opt; do
case "$opt" in case "$opt" in
h|\?) h|\?)
echo "Usage: $0 [OPTIONS...]" echo "Usage: $0 [OPTIONS...]"
echo echo
echo " -v godot version (e.g: 3.2-stable) [mandatory]" echo " -v godot version (e.g: 3.2-stable) [mandatory]"
echo " -l latest stable release (web editor, itch.io, EGS)"
echo " -s don't run stable specific steps" echo " -s don't run stable specific steps"
echo " -d publish as draft release on GitHub" echo " -d publish as draft release on GitHub"
echo echo
@@ -30,9 +28,6 @@ while getopts "h?v:lsd" opt; do
v) v)
godot_version=$OPTARG godot_version=$OPTARG
;; ;;
l)
latest_stable=1
;;
s) s)
skip_stable=1 skip_stable=1
;; ;;
@@ -83,17 +78,6 @@ if [ "${status}" == "stable" -a "${skip_stable}" == "0" ]; then
echo "Invalid config.sh: UPLOAD_STEAM_PATH is not a directory, aborting." echo "Invalid config.sh: UPLOAD_STEAM_PATH is not a directory, aborting."
exit 1 exit 1
fi fi
if [ "${latest_stable}" == "1" ]; then
if [ ! -d "${UPLOAD_EGS_PATH}" ]; then
echo "Invalid config.sh: UPLOAD_EGS_PATH is not a directory, aborting."
exit 1
fi
if [ ! -x "${UPLOAD_ITCH_BUTLER}" ]; then
echo "Invalid config.sh: UPLOAD_ITCH_BUTLER does not point to an executable, aborting."
exit 1
fi
fi
fi fi
# Upload to GitHub godot-builds # Upload to GitHub godot-builds
@@ -134,62 +118,27 @@ if [ "${status}" == "stable" -a "${skip_stable}" == "0" ]; then
pushd ${UPLOAD_STEAM_PATH} pushd ${UPLOAD_STEAM_PATH}
rm -rf content/bin/[Gg]* rm -rf content/bin/[Gg]*
rm -rf content/editor_data/export_templates/* rm -rf content/editor_data/templates/*
cp -f ${basedir}/git/*.{md,txt,png,svg} content/ cp -f ${basedir}/git/*.{md,txt,png,svg} content/
# Steam specific binaries prepared by build-release.sh pushd content/bin/
cp -r ${basedir}/steam/[Gg]* content/bin/ unzip ${reldir}/${namever}_x11.64.zip
unzip ${reldir}/${namever}_export_templates.tpz -d content/editor_data/export_templates/ unzip ${reldir}/${namever}_x11.32.zip
mv content/editor_data/export_templates/{templates,${template_version}} unzip ${reldir}/${namever}_win64.exe.zip
unzip ${reldir}/${namever}_win32.exe.zip
unzip ${reldir}/${namever}_osx.universal.zip
mv ${namever}_x11.64 godot.x11.opt.tools.64
mv ${namever}_x11.32 godot.x11.opt.tools.32
mv ${namever}_win64.exe godot.windows.opt.tools.64.exe
mv ${namever}_win32.exe godot.windows.opt.tools.32.exe
popd
unzip ${reldir}/${namever}_export_templates.tpz -d content/editor_data/templates/
mv content/editor_data/templates/{templates,${template_version}}
steam_build/build.sh steam_build/build.sh
popd popd
if [ "${latest_stable}" == "1" ]; then
echo "Uploading stable release to EGS (latest only)."
pushd ${UPLOAD_EGS_PATH}
rm -rf buildroot-*/*
unzip ${reldir}/${namever}_win64.exe.zip -d buildroot-win64/
unzip ${reldir}/${namever}_win32.exe.zip -d buildroot-win32/
unzip ${reldir}/${namever}_macos.universal.zip -d buildroot-macos/
./upload.sh -v ${godot_version}
popd
echo "Uploading stable release to itch.io (latest only)."
${UPLOAD_ITCH_BUTLER} push ${reldir}/${namever}_linux.x86_64.zip godotengine/godot:linux-64-stable --userversion ${godot_version}
${UPLOAD_ITCH_BUTLER} push ${reldir}/${namever}_linux.x86_32.zip godotengine/godot:linux-32-stable --userversion ${godot_version}
${UPLOAD_ITCH_BUTLER} push ${reldir}/${namever}_win64.exe.zip godotengine/godot:windows-64-stable --userversion ${godot_version}
${UPLOAD_ITCH_BUTLER} push ${reldir}/${namever}_win32.exe.zip godotengine/godot:windows-32-stable --userversion ${godot_version}
${UPLOAD_ITCH_BUTLER} push ${reldir}/${namever}_macos.universal.zip godotengine/godot:osx-64-stable --userversion ${godot_version}
fi
echo "All stable release upload steps done." echo "All stable release upload steps done."
fi fi
# NuGet packages
publish_nuget_packages() {
for pkg in "$@"; do
dotnet nuget push $pkg --source "${NUGET_SOURCE}" --api-key "${NUGET_API_KEY}" --skip-duplicate
done
}
if [ ! -z "${NUGET_SOURCE}" ] && [ ! -z "${NUGET_API_KEY}" ] && [[ $(type -P "dotnet") ]]; then
echo "Publishing NuGet packages..."
publish_nuget_packages out/linux/x86_64/tools-mono/GodotSharp/Tools/nupkgs/*.nupkg
else
echo "Disabling NuGet package publishing as config.sh does not define the required data (NUGET_SOURCE, NUGET_API_KEY), or dotnet can't be found in PATH."
fi
# Godot Android library
if [ -d "deps/keystore" ]; then
echo "Publishing Android library to MavenCentral..."
sh build-android/upload-mavencentral.sh
else
echo "Disabling Android library publishing as deps/keystore doesn't exist."
fi
# Web editor # Web editor
echo "Uploading web editor... (with retry logic as it can be flaky)" echo "Uploading web editor... (with retry logic as it can be flaky)"
@@ -217,10 +166,6 @@ retry_command() {
command="sudo mv /home/akien/web_editor/${template_version} /var/www/editor.godotengine.org/public/releases/" command="sudo mv /home/akien/web_editor/${template_version} /var/www/editor.godotengine.org/public/releases/"
command="${command}; cd /var/www/editor.godotengine.org; sudo chown -R www-data:www-data public/releases/${template_version}" command="${command}; cd /var/www/editor.godotengine.org; sudo chown -R www-data:www-data public/releases/${template_version}"
command="${command}; sudo ./create-symlinks.sh -v ${template_version}" command="${command}; sudo ./create-symlinks.sh -v ${template_version}"
if [ "${latest_stable}" == "1" ]; then
echo "Marking web editor build as 'latest'."
command="${command} -l"
fi
retry_command "scp -P 22 -r web/${template_version} ${WEB_EDITOR_HOSTNAME}:/home/akien/web_editor/" retry_command "scp -P 22 -r web/${template_version} ${WEB_EDITOR_HOSTNAME}:/home/akien/web_editor/"
sleep 2 sleep 2