58 Commits
_deps ... 4.4

Author SHA1 Message Date
Rémi Verschelde
6def3039b1 publish-release: Add -d argument to publish as draft release on GH (#135)
(cherry picked from commit fd3bd4ad89)
2025-10-29 10:53:15 +01:00
Rémi Verschelde
6f0a10f6f9 publish-release: Add support to upload stable builds to GH, Steam, EGS and itch.io
(cherry picked from commit 73402a1c9f)
2025-03-27 11:27:38 +01:00
Rémi Verschelde
d2e5eab17c Merge pull request #108 from godotengine/steam
build-release: Copy and sign Steam Windows exe for stable releases
2025-03-18 17:12:16 +01:00
Rémi Verschelde
fb34c3ff3e build-release: Copy and sign Steam Windows exe for stable releases 2025-03-12 23:43:17 +01:00
Rémi Verschelde
e2e01f05df Merge pull request #106 from darksylinc/matias-swappy-2025-01
Update to latest version of Swappy
2025-03-04 00:45:26 +01:00
Matias N. Goldberg
c9f1d801ae Update to latest version of Swappy
Fixes #103294
2025-03-03 20:44:32 -03:00
Rémi Verschelde
7cfa88aaaf Merge pull request #105 from godotengine/android-picoos-editor
Add support for Android editor builds for PicoOS devices
2025-02-07 01:44:25 +01:00
Rémi Verschelde
c9d351ab67 Add support for Android editor builds for PicoOS devices 2025-01-15 18:01:31 +01:00
Rémi Verschelde
e7210ecc92 Merge pull request #104 from godotengine/update-toolchains-f41
Update toolchains based on Fedora 41 for Godot 4.4
2024-12-16 23:03:04 +01:00
Rémi Verschelde
5e3a9b9cdc Update toolchains based on Fedora 41 for Godot 4.4 2024-12-16 23:01:51 +01:00
HP van Braam
b4613cec24 Merge pull request #102 from bruvzg/ts_data_in_template
Add ICU data to export templates.
2024-12-12 16:19:01 +01:00
Pāvels Nadtočajevs
bf0dd1992c Add ICU data to export templates. 2024-12-09 15:58:49 +02:00
Rémi Verschelde
1e4dc88253 Add script to publish releases everywhere
- GitHub godot-builds
- Web editor
- NuGet
- MavenCentral

Still missing instructions for uploading stable releases to stores, etc.
2024-11-21 10:57:27 +01:00
Rémi Verschelde
8c176b460b Android: Download and copy swappy libraries 2024-11-08 14:39:11 +01:00
Rémi Verschelde
e0891e9fde Adapt build scripts to run with passwordless sudo podman 2024-11-07 22:36:40 +01:00
Rémi Verschelde
251cea182e Merge pull request #94 from raulsntos/dotnet/android-monovm
.NET: Build Android templates with 'mono' edition
2024-11-07 20:50:02 +01:00
Rémi Verschelde
9259edf571 Merge pull request #99 from adamscott/add-gitignore-dsstore
Add `.DS_Store` to .gitignore
2024-09-16 15:44:41 +02:00
Rémi Verschelde
cc7ca0f706 Merge pull request #101 from m4gr3d/main
Update the Android editor build scripts
2024-09-16 15:44:26 +02:00
Fredia Huya-Kouadio
5f48331f5d Update the Android editor build scripts to match the updated build flavors in https://github.com/godotengine/godot/pull/96967 2024-09-14 12:15:22 -07:00
Fredia Huya-Kouadio
fa404f8c17 Add support for Android editor builds for Meta devices (#100) 2024-09-08 23:07:07 +02:00
Adam Scott
d808ce84ce Add .DS_Store to .gitignore 2024-08-21 12:04:20 -04:00
Rémi Verschelde
c3d199c4d4 Merge pull request #98 from godotengine/stable-windows-steamapi
Windows: Add extra editor build with `steamapi=yes` for stable releases
2024-08-15 00:56:16 +02:00
Rémi Verschelde
629090d76e Windows: Add extra editor build with steamapi=yes for stable releases 2024-08-15 00:39:35 +02:00
Rémi Verschelde
834f6223d8 New ANGLE build, fixes macOS crash by removing conflicting astcenc lib 2024-07-30 11:31:37 +02:00
Rémi Verschelde
1bf0772565 New ANGLE build, restores Windows 7 support 2024-07-28 19:23:17 +02:00
Rémi Verschelde
7131e406ae build_release: Fix name of new Windows ARM64 binaries 2024-07-25 20:07:01 +02:00
Rémi Verschelde
62a88ec262 build_release: Fix path to MoltenVK after b3ba0ae93
I didn't run into it before as I had an old `deps/vulkansdk-macos` folder
locally.
(Which means we've been shipping an old MoltenVK version on iOS for a bit.)
2024-07-25 19:08:03 +02:00
Rémi Verschelde
0c96c1ea15 Merge pull request #96 from bruvzg/arm64_win
Add commands to make ARM64 Windows engine builds, update Mesa/NIR and ANGLE downloads to the latest releases.
2024-07-22 11:53:43 +02:00
bruvzg
c3f202946a Add commands to make ARM64 Windows engine builds, update Mesa/NIR and ANGLE downloads to the latest releases. 2024-07-22 12:13:53 +03:00
Rémi Verschelde
3cb13f27ea Merge pull request #97 from godotengine/no-strip
Don't strip Windows and macOS binaries, already done at build time
2024-07-22 11:12:32 +02:00
Rémi Verschelde
d99668ccaa Don't strip Windows and macOS binaries, already done at build time 2024-07-22 10:59:45 +02:00
Rémi Verschelde
a29f0a255d Update MoltenVK build to re-add support for macOS 10.13
See https://github.com/godotengine/moltenvk-osxcross/pull/1 for context.
2024-07-11 22:50:56 +02:00
Rémi Verschelde
d36a865ff1 Merge pull request #95 from godotengine/xcode-15.4
macOS/iOS: Update SDK versions to Xcode 15.4
2024-06-20 10:07:35 +02:00
Rémi Verschelde
15810984ed macOS/iOS: Update SDK versions to Xcode 15.4
Following merge of https://github.com/godotengine/build-containers/pull/141.
2024-06-20 10:06:58 +02:00
Rémi Verschelde
a79a7d16ce macOS: Update ANGLE library build to support ANGLE over GL 2024-05-30 23:18:03 +02:00
Rémi Verschelde
b3ba0ae932 macOS: Download custom osxcross-compatible MoltenVK build automatically 2024-05-16 15:23:29 +02:00
Raul Santos
232be2e47f .NET: Build Android templates with 'mono' edition
Build the Android templates for .NET using the 'mono' edition that contains additional dependencies required by .NET projects to support Android OS APIs (like crypto).
2024-04-29 03:56:22 +02:00
Rémi Verschelde
0f11496664 macOS/iOS: Update SDK versions to Xcode 15.2
Following merge of https://github.com/godotengine/build-containers/pull/138.
2024-03-13 22:04:40 +01:00
Rémi Verschelde
e321eca2bf Web: Tweak build concurrency, doesn't seem to work with all in parallel 2024-02-28 10:21:27 +01:00
Rémi Verschelde
ef6c745075 Web: Add threads=no template builds 2024-02-07 10:48:09 +01:00
Rémi Verschelde
3fd3880077 deps: Update godot-nir-static to 23.1.9 2024-02-05 15:24:31 +01:00
Rémi Verschelde
0da7793d2d Merge pull request #92 from bruvzg/dx12_enable
[Windows] Enable D3D12 support.
2024-01-29 23:14:31 +01:00
bruvzg
9bba647a8b [Windows] Enabled D3D12 support. 2024-01-04 12:12:26 +02:00
Rémi Verschelde
ceadb16e22 Revert "Linux: Disable LTO for ARM64/ARM32, it crashes on Raspberry Pi OS"
This reverts commit f8a41bc69f.

This wasn't actually the cause for the crash.
The issue is fixed by https://github.com/godotengine/build-containers/pull/134.
2023-12-11 22:21:31 +01:00
Rémi Verschelde
ee35cb71ca Merge pull request #91 from godotengine/linux-arm64-disable-lto
Linux: Disable LTO for ARM64/ARM32, it crashes on Raspberry Pi OS
2023-11-24 12:30:50 +01:00
Rémi Verschelde
f8a41bc69f Linux: Disable LTO for ARM64/ARM32, it crashes on Raspberry Pi OS
Needs further investigation and reporting the bug upstream.
2023-11-24 00:03:24 +01:00
Rémi Verschelde
2398d61b29 Merge pull request #90 from godotengine/linux-buildroot-update-arm
Linux: Update to new SDK with GCC 13, add ARM64 and ARM32
2023-11-01 17:47:03 +01:00
Rémi Verschelde
96b8f89a22 Linux: Update to new SDK with GCC 13, add ARM64 and ARM32 2023-11-01 17:42:57 +01:00
Rémi Verschelde
09b9dcf969 Merge pull request #76 from bruvzg/notarytool
[macOS] Use notarytool instead of deprecated altool.
2023-10-31 18:50:31 +01:00
bruvzg
7b9e4271f4 [macOS] Use notarytool instead of deprecated altool. 2023-10-31 19:26:52 +02:00
Rémi Verschelde
93d253330f Merge pull request #89 from godotengine/f39-images
Update scripts for new Fedora 39 based images for 4.2-beta3 and later
2023-10-24 16:31:23 +02:00
Rémi Verschelde
65cca8165a Update scripts for new Fedora 39 based images for 4.2-beta3 and later
Follow-up to https://github.com/godotengine/build-containers/pull/128.

Also reverts #88 since these new images include JDK 17, and the closure
compiler issue was fixed upstream.

And removes the manual install of gettext which is now also part of the
images.

X11 libs should not be needed to generate the Mono glue anymore (they've been
unnecessary for a while already).
2023-10-24 11:45:29 +02:00
Rémi Verschelde
be182f1ed7 Merge pull request #88 from godotengine/4.2-beta2-jdk-17
Android: Install JDK 17 needed for 4.2-beta2 and later
2023-10-19 10:47:04 +02:00
Rémi Verschelde
2c7419a7ed Android: Install JDK 17 needed for 4.2-beta2 and later
Temporary change until we switch to newer build containers with it.

Also temporarily disable closure compiler for Web editor, needed for
4.2 beta 1 and beta 2, should be fixed upstream afterwarads.
2023-10-19 10:45:43 +02:00
Rémi Verschelde
ad9e3b238a Merge pull request #87 from YuriSizov/publish-maven
Publish Android library from the main build-release script
2023-10-11 20:43:40 +02:00
Yuri Sizov
9d40b39c01 Publish Android library from the main build-release script 2023-10-11 20:08:40 +02:00
Rémi Verschelde
066ede3602 Merge pull request #86 from godotengine/dotnet-ios
.NET: Add support for iOS builds
2023-10-10 08:12:52 +02:00
Rémi Verschelde
75877451f2 .NET: Add support for iOS builds 2023-10-04 01:15:30 +02:00
15 changed files with 610 additions and 149 deletions

4
.gitignore vendored
View File

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

View File

@@ -13,6 +13,7 @@ rm -rf godot
mkdir godot
cd godot
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,
# as well as signing and publishing to MavenCentral.
@@ -26,8 +27,6 @@ fi
# Classical
dnf -y install gettext
if [ "${CLASSICAL}" == "1" ]; then
echo "Starting classical build for Android..."
@@ -37,23 +36,35 @@ if [ "${CLASSICAL}" == "1" ]; then
$SCONS platform=android arch=x86_64 $OPTIONS target=editor store_release=${store_release}
pushd platform/android/java
# Generate the regular Android editor.
./gradlew generateGodotEditor
# Generate the Android editor for HorizonOS devices.
./gradlew generateGodotHorizonOSEditor
# Generate the Android editor for PicoOS devices.
./gradlew generateGodotPicoOSEditor
popd
mkdir -p /root/out/tools
# Copy the generated Android editor binaries (apk & aab).
if [ "$store_release" == "yes" ]; then
cp bin/android_editor_builds/android_editor-release.apk /root/out/tools/android_editor.apk
cp bin/android_editor_builds/android_editor-release.aab /root/out/tools/android_editor.aab
cp bin/android_editor_builds/android_editor-android-release.apk /root/out/tools/android_editor.apk
cp bin/android_editor_builds/android_editor-android-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
cp bin/android_editor_builds/android_editor-debug.apk /root/out/tools/android_editor.apk
cp bin/android_editor_builds/android_editor-debug.aab /root/out/tools/android_editor.aab
cp bin/android_editor_builds/android_editor-android-debug.apk /root/out/tools/android_editor.apk
cp bin/android_editor_builds/android_editor-android-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
# Restart from a clean tarball, as we'll copy all the contents
# outside the container for the MavenCentral upload.
rm -rf /root/godot/*
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 arch=arm32 $OPTIONS target=template_release
@@ -106,13 +117,13 @@ if [ "${MONO}" == "1" ]; then
$SCONS platform=android arch=x86_64 $OPTIONS $OPTIONS_MONO target=template_release
pushd platform/android/java
./gradlew generateGodotTemplates
./gradlew generateGodotMonoTemplates
popd
mkdir -p /root/out/templates-mono
cp bin/android_source.zip /root/out/templates-mono/
cp bin/android_debug.apk /root/out/templates-mono/
cp bin/android_release.apk /root/out/templates-mono/
cp bin/android_monoDebug.apk /root/out/templates-mono/android_debug.apk
cp bin/android_monoRelease.apk /root/out/templates-mono/android_release.apk
cp bin/godot-lib.template_release.aar /root/out/templates-mono/
fi

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

View File

@@ -11,7 +11,7 @@ export OPTIONS="production=yes use_lto=no"
export OPTIONS_MONO="module_mono_enabled=yes"
export TERM=xterm
export IOS_SDK="16.1"
export IOS_SDK="18.2"
export IOS_LIPO="/root/ioscross/arm64/bin/arm-apple-darwin11-lipo"
rm -rf godot
@@ -21,8 +21,6 @@ tar xf /root/godot.tar.gz --strip-components=1
# Classical
dnf -y install gettext
if [ "${CLASSICAL}" == "1" ]; then
echo "Starting classical build for iOS..."
@@ -36,15 +34,15 @@ if [ "${CLASSICAL}" == "1" ]; then
# Disabled for now as it doesn't work with cctools-port and current LLVM.
# See https://github.com/godotengine/build-containers/pull/85.
#$SCONS platform=ios $OPTIONS arch=arm64 ios_simulator=yes target=template_debug \
# IOS_SDK_PATH="/root/ioscross/arm64_sim/SDK/iPhoneOS${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/arm64_sim/" ios_triple="arm-apple-darwin11-"
#$SCONS platform=ios $OPTIONS arch=arm64 ios_simulator=no target=template_release \
# IOS_SDK_PATH="/root/ioscross/arm64_sim/SDK/iPhoneOS${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/arm64_sim/" ios_triple="arm-apple-darwin11-"
# IOS_SDK_PATH="/root/ioscross/arm64_sim/SDK/iPhoneSimulator${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/arm64_sim/" ios_triple="arm-apple-darwin11-"
#$SCONS platform=ios $OPTIONS arch=arm64 ios_simulator=yes target=template_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-"
# x86_64 simulator
$SCONS platform=ios $OPTIONS arch=x86_64 ios_simulator=yes target=template_debug \
IOS_SDK_PATH="/root/ioscross/x86_64_sim/SDK/iPhoneOS${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/x86_64_sim/" ios_triple="x86_64-apple-darwin11-"
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-"
$SCONS platform=ios $OPTIONS arch=x86_64 ios_simulator=yes target=template_release \
IOS_SDK_PATH="/root/ioscross/x86_64_sim/SDK/iPhoneOS${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/x86_64_sim/" ios_triple="x86_64-apple-darwin11-"
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-"
mkdir -p /root/out/templates
cp bin/libgodot.ios.template_release.arm64.a /root/out/templates/libgodot.ios.a
@@ -57,9 +55,7 @@ fi
# Mono
# No iOS support with .NET 6 yet.
#if [ "${MONO}" == "1" ]; then
if false; then
if [ "${MONO}" == "1" ]; then
echo "Starting Mono build for iOS..."
cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/
@@ -74,15 +70,15 @@ if false; then
# Disabled for now as it doesn't work with cctools-port and current LLVM.
# See https://github.com/godotengine/build-containers/pull/85.
#$SCONS platform=ios $OPTIONS $OPTIONS_MONO arch=arm64 ios_simulator=yes target=template_debug \
# IOS_SDK_PATH="/root/ioscross/arm64_sim/SDK/iPhoneOS${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/arm64_sim/" ios_triple="arm-apple-darwin11-"
# IOS_SDK_PATH="/root/ioscross/arm64_sim/SDK/iPhoneSimulator${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/arm64_sim/" ios_triple="arm-apple-darwin11-"
#$SCONS platform=ios $OPTIONS $OPTIONS_MONO arch=arm64 ios_simulator=yes target=template_release \
# IOS_SDK_PATH="/root/ioscross/arm64_sim/SDK/iPhoneOS${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/arm64_sim/" ios_triple="arm-apple-darwin11-"
# IOS_SDK_PATH="/root/ioscross/arm64_sim/SDK/iPhoneSimulator${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/arm64_sim/" ios_triple="arm-apple-darwin11-"
# x86_64 simulator
$SCONS platform=ios $OPTIONS $OPTIONS_MONO arch=x86_64 ios_simulator=yes target=template_debug \
IOS_SDK_PATH="/root/ioscross/x86_64_sim/SDK/iPhoneOS${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/x86_64_sim/" ios_triple="x86_64-apple-darwin11-"
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-"
$SCONS platform=ios $OPTIONS $OPTIONS_MONO arch=x86_64 ios_simulator=yes target=template_release \
IOS_SDK_PATH="/root/ioscross/x86_64_sim/SDK/iPhoneOS${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/x86_64_sim/" ios_triple="x86_64-apple-darwin11-"
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-"
mkdir -p /root/out/templates-mono

View File

@@ -14,11 +14,6 @@ mkdir godot
cd godot
tar xf /root/godot.tar.gz --strip-components=1
# pkg-config wrongly points to lib instead of lib64 for arch-dependent header.
sed -i ${GODOT_SDK_LINUX_X86_64}/x86_64-godot-linux-gnu/sysroot/usr/lib/pkgconfig/dbus-1.pc -e "s@/lib@/lib64@g"
dnf -y install gettext
# Classical
if [ "${CLASSICAL}" == "1" ]; then
@@ -37,7 +32,7 @@ if [ "${CLASSICAL}" == "1" ]; then
cp -rvp bin/* /root/out/x86_64/templates
rm -rf bin
export PATH="${GODOT_SDK_LINUX_X86}/bin:${BASE_PATH}"
export PATH="${GODOT_SDK_LINUX_X86_32}/bin:${BASE_PATH}"
$SCONS platform=linuxbsd arch=x86_32 $OPTIONS target=editor
mkdir -p /root/out/x86_32/tools
@@ -49,6 +44,32 @@ if [ "${CLASSICAL}" == "1" ]; then
mkdir -p /root/out/x86_32/templates
cp -rvp bin/* /root/out/x86_32/templates
rm -rf bin
export PATH="${GODOT_SDK_LINUX_ARM64}/bin:${BASE_PATH}"
$SCONS platform=linuxbsd arch=arm64 $OPTIONS target=editor
mkdir -p /root/out/arm64/tools
cp -rvp bin/* /root/out/arm64/tools
rm -rf bin
$SCONS platform=linuxbsd arch=arm64 $OPTIONS target=template_debug
$SCONS platform=linuxbsd arch=arm64 $OPTIONS target=template_release
mkdir -p /root/out/arm64/templates
cp -rvp bin/* /root/out/arm64/templates
rm -rf bin
export PATH="${GODOT_SDK_LINUX_ARM32}/bin:${BASE_PATH}"
$SCONS platform=linuxbsd arch=arm32 $OPTIONS target=editor
mkdir -p /root/out/arm32/tools
cp -rvp bin/* /root/out/arm32/tools
rm -rf bin
$SCONS platform=linuxbsd arch=arm32 $OPTIONS target=template_debug
$SCONS platform=linuxbsd arch=arm32 $OPTIONS target=template_release
mkdir -p /root/out/arm32/templates
cp -rvp bin/* /root/out/arm32/templates
rm -rf bin
fi
# Mono
@@ -73,7 +94,7 @@ if [ "${MONO}" == "1" ]; then
cp -rvp bin/* /root/out/x86_64/templates-mono
rm -rf bin
export PATH="${GODOT_SDK_LINUX_X86}/bin:${BASE_PATH}"
export PATH="${GODOT_SDK_LINUX_X86_32}/bin:${BASE_PATH}"
$SCONS platform=linuxbsd arch=x86_32 $OPTIONS $OPTIONS_MONO target=editor
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=linuxbsd
@@ -86,6 +107,34 @@ if [ "${MONO}" == "1" ]; then
mkdir -p /root/out/x86_32/templates-mono
cp -rvp bin/* /root/out/x86_32/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
fi
echo "Linux build successful"

View File

@@ -5,9 +5,8 @@ set -e
# Config
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
export OPTIONS="osxcross_sdk=darwin22 production=yes use_volk=no vulkan_sdk_path=/root/vulkansdk angle_libs=/root/angle"
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 STRIP="x86_64-apple-darwin22-strip -u -r"
export TERM=xterm
rm -rf godot
@@ -17,15 +16,12 @@ tar xf /root/godot.tar.gz --strip-components=1
# Classical
dnf -y install gettext
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
$STRIP bin/godot.macos.editor.universal
mkdir -p /root/out/tools
cp -rvp bin/* /root/out/tools
@@ -34,11 +30,9 @@ if [ "${CLASSICAL}" == "1" ]; then
$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
$STRIP 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
$STRIP bin/godot.macos.template_release.universal
mkdir -p /root/out/templates
cp -rvp bin/* /root/out/templates
@@ -56,7 +50,6 @@ if [ "${MONO}" == "1" ]; then
$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
$STRIP 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
@@ -66,11 +59,9 @@ if [ "${MONO}" == "1" ]; then
$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
$STRIP 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
$STRIP bin/godot.macos.template_release.universal.mono
mkdir -p /root/out/templates-mono
cp -rvp bin/* /root/out/templates-mono

View File

@@ -15,20 +15,12 @@ mkdir godot
cd godot
tar xf ../godot.tar.gz --strip-components=1
# pkg-config wrongly points to lib instead of lib64 for arch-dependent header.
sed -i ${GODOT_SDK_LINUX_X86_64}/x86_64-godot-linux-gnu/sysroot/usr/lib/pkgconfig/dbus-1.pc -e "s@/lib@/lib64@g"
# Temporarily until we make --headless mode actually skip X11.
dnf install -y libX11 libXcursor libXrandr libXinerama libXi mesa-libGL
dnf -y install gettext
# Mono
if [ "${MONO}" == "1" ]; then
echo "Building and generating Mono glue..."
dotnet --info
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/pkgconfig/
${SCONS} platform=linuxbsd ${OPTIONS} target=editor module_mono_enabled=yes

View File

@@ -1,6 +1,10 @@
#!/bin/bash
set -e
export basedir=$(pwd)
# Log output to a file automatically.
exec > >(tee -a "out/logs/build-release") 2>&1
# Config
@@ -48,12 +52,11 @@ sign_macos() {
-s ${OSX_KEY_ID} -v ${_appname} && \
zip -r ${_binname}_signed.zip ${_appname}"
_request_uuid=$(ssh "${OSX_HOST}" "xcrun altool --notarize-app --primary-bundle-id \"${OSX_BUNDLE_ID}\" --username \"${APPLE_ID}\" --password \"${APPLE_ID_PASSWORD}\" --file ${_macos_tmpdir}/${_binname}_signed.zip")
_request_uuid=$(echo ${_request_uuid} | sed -e 's/.*RequestUUID = //')
ssh "${OSX_HOST}" "while xcrun altool --notarization-info ${_request_uuid} -u \"${APPLE_ID}\" -p \"${APPLE_ID_PASSWORD}\" | grep -q Status:\ in\ progress; do echo Waiting on Apple notarization...; sleep 30s; done"
if ! ssh "${OSX_HOST}" "xcrun altool --notarization-info ${_request_uuid} -u \"${APPLE_ID}\" -p \"${APPLE_ID_PASSWORD}\" | grep -q Status:\ success"; then
_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=$(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
echo "Notarization failed."
_notarization_log=$(ssh "${OSX_HOST}" "xcrun altool --notarization-info ${_request_uuid} -u \"${APPLE_ID}\" -p \"${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}"
ssh "${OSX_HOST}" "rm -rf ${_macos_tmpdir}"
exit 1
@@ -88,29 +91,12 @@ sign_macos_template() {
ssh "${OSX_HOST}" "rm -rf ${_macos_tmpdir}"
}
can_publish_nuget=0
if [ ! -z "${NUGET_SOURCE}" ] && [ ! -z "${NUGET_API_KEY}" ] && [[ $(type -P "dotnet") ]]; then
can_publish_nuget=1
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
publish_nuget_packages() {
if [ $can_publish_nuget == 0 ]; then
return
fi
for pkg in "$@"; do
dotnet nuget push $pkg --source "${NUGET_SOURCE}" --api-key "${NUGET_API_KEY}" --skip-duplicate
done
}
godot_version=""
templates_version=""
do_cleanup=1
make_tarball=1
build_classical=1
build_mono=1
publish_nuget=0
while getopts "h?v:t:b:n-:" opt; do
case "$opt" in
@@ -120,7 +106,6 @@ while getopts "h?v:t:b:n-:" opt; do
echo " -v godot 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 " -n publish nuget packages (default: false)"
echo " --no-cleanup disable deleting pre-existing output folders (default: false)"
echo " --no-tarball disable generating source tarball (default: false)"
echo
@@ -142,9 +127,6 @@ while getopts "h?v:t:b:n-:" opt; do
build_mono=0
fi
;;
n)
publish_nuget=1
;;
-)
case "${OPTARG}" in
no-cleanup)
@@ -172,13 +154,13 @@ elif [[ "{$templates_version}" == *"-"* ]]; then
exit 1
fi
export basedir=$(pwd)
export webdir="${basedir}/web/${templates_version}"
export reldir="${basedir}/releases/${godot_version}"
export reldir_mono="${reldir}/mono"
export tmpdir="${basedir}/tmp"
export templatesdir="${tmpdir}/templates"
export templatesdir_mono="${tmpdir}/mono/templates"
export webdir="${basedir}/web/${templates_version}"
export steamdir="${basedir}/steam"
export godot_basename="Godot_v${godot_version}"
@@ -186,15 +168,19 @@ export godot_basename="Godot_v${godot_version}"
if [ "${do_cleanup}" == "1" ]; then
rm -rf ${webdir}
rm -rf ${reldir}
rm -rf ${tmpdir}
rm -rf ${webdir}
rm -rf ${steamdir}
mkdir -p ${webdir}
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
@@ -218,22 +204,40 @@ if [ "${build_classical}" == "1" ]; then
# Editor
binname="${godot_basename}_linux.x86_64"
cp out/linux/x86_64/tools/godot.linuxbsd.editor.x86_64 ${binname}
strip ${binname}
zip -q -9 "${reldir}/${binname}.zip" ${binname}
rm ${binname}
binname="${godot_basename}_linux.x86_32"
cp out/linux/x86_32/tools/godot.linuxbsd.editor.x86_32 ${binname}
strip ${binname}
zip -q -9 "${reldir}/${binname}.zip" ${binname}
rm ${binname}
binname="${godot_basename}_linux.arm64"
cp out/linux/arm64/tools/godot.linuxbsd.editor.arm64 ${binname}
zip -q -9 "${reldir}/${binname}.zip" ${binname}
rm ${binname}
binname="${godot_basename}_linux.arm32"
cp out/linux/arm32/tools/godot.linuxbsd.editor.arm32 ${binname}
zip -q -9 "${reldir}/${binname}.zip" ${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
cp out/linux/x86_64/templates/godot.linuxbsd.template_release.x86_64 ${templatesdir}/linux_release.x86_64
cp out/linux/x86_64/templates/godot.linuxbsd.template_debug.x86_64 ${templatesdir}/linux_debug.x86_64
cp out/linux/x86_32/templates/godot.linuxbsd.template_release.x86_32 ${templatesdir}/linux_release.x86_32
cp out/linux/x86_32/templates/godot.linuxbsd.template_debug.x86_32 ${templatesdir}/linux_debug.x86_32
strip ${templatesdir}/linux*
cp out/linux/arm64/templates/godot.linuxbsd.template_release.arm64 ${templatesdir}/linux_release.arm64
cp out/linux/arm64/templates/godot.linuxbsd.template_debug.arm64 ${templatesdir}/linux_debug.arm64
cp out/linux/arm32/templates/godot.linuxbsd.template_release.arm32 ${templatesdir}/linux_release.arm32
cp out/linux/arm32/templates/godot.linuxbsd.template_debug.arm32 ${templatesdir}/linux_debug.arm32
## Windows (Classical) ##
@@ -241,10 +245,8 @@ if [ "${build_classical}" == "1" ]; then
binname="${godot_basename}_win64.exe"
wrpname="${godot_basename}_win64_console.exe"
cp out/windows/x86_64/tools/godot.windows.editor.x86_64.exe ${binname}
strip ${binname}
sign_windows ${binname}
cp out/windows/x86_64/tools/godot.windows.editor.x86_64.console.exe ${wrpname}
strip ${wrpname}
sign_windows ${wrpname}
zip -q -9 "${reldir}/${binname}.zip" ${binname} ${wrpname}
rm ${binname} ${wrpname}
@@ -252,10 +254,17 @@ if [ "${build_classical}" == "1" ]; then
binname="${godot_basename}_win32.exe"
wrpname="${godot_basename}_win32_console.exe"
cp out/windows/x86_32/tools/godot.windows.editor.x86_32.exe ${binname}
strip ${binname}
sign_windows ${binname}
cp out/windows/x86_32/tools/godot.windows.editor.x86_32.console.exe ${wrpname}
strip ${wrpname}
sign_windows ${wrpname}
zip -q -9 "${reldir}/${binname}.zip" ${binname} ${wrpname}
rm ${binname} ${wrpname}
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}
@@ -265,11 +274,14 @@ if [ "${build_classical}" == "1" ]; then
cp out/windows/x86_64/templates/godot.windows.template_debug.x86_64.exe ${templatesdir}/windows_debug_x86_64.exe
cp out/windows/x86_32/templates/godot.windows.template_release.x86_32.exe ${templatesdir}/windows_release_x86_32.exe
cp out/windows/x86_32/templates/godot.windows.template_debug.x86_32.exe ${templatesdir}/windows_debug_x86_32.exe
cp out/windows/arm64/templates/godot.windows.template_release.arm64.llvm.exe ${templatesdir}/windows_release_arm64.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
strip ${templatesdir}/windows*.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) ##
@@ -296,6 +308,20 @@ if [ "${build_classical}" == "1" ]; then
rm -rf macos_template.app
sign_macos_template ${templatesdir} 0
## Steam (Classical) ##
if [ -d out/windows/steam ]; then
cp out/windows/steam/godot.windows.editor.x86_64.exe ${steamdir}/godot.windows.opt.tools.64.exe
cp out/windows/steam/godot.windows.editor.x86_32.exe ${steamdir}/godot.windows.opt.tools.32.exe
sign_windows ${steamdir}/godot.windows.opt.tools.64.exe
sign_windows ${steamdir}/godot.windows.opt.tools.32.exe
unzip ${reldir}/${godot_basename}_linux.x86_64.zip -d ${steamdir}/
unzip ${reldir}/${godot_basename}_linux.x86_32.zip -d ${steamdir}/
mv ${steamdir}/{${godot_basename}_linux.x86_64,godot.x11.opt.tools.64}
mv ${steamdir}/{${godot_basename}_linux.x86_32,godot.x11.opt.tools.32}
unzip ${reldir}/${godot_basename}_macos.universal -d ${steamdir}/
fi
## Web (Classical) ##
# Editor
@@ -308,9 +334,15 @@ if [ "${build_classical}" == "1" ]; then
cp out/web/templates/godot.web.template_release.wasm32.zip ${templatesdir}/web_release.zip
cp out/web/templates/godot.web.template_debug.wasm32.zip ${templatesdir}/web_debug.zip
cp out/web/templates/godot.web.template_release.wasm32.nothreads.zip ${templatesdir}/web_nothreads_release.zip
cp out/web/templates/godot.web.template_debug.wasm32.nothreads.zip ${templatesdir}/web_nothreads_debug.zip
cp out/web/templates/godot.web.template_release.wasm32.dlink.zip ${templatesdir}/web_dlink_release.zip
cp out/web/templates/godot.web.template_debug.wasm32.dlink.zip ${templatesdir}/web_dlink_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) ##
# Lib for direct download
@@ -319,6 +351,10 @@ if [ "${build_classical}" == "1" ]; then
# Editor
binname="${godot_basename}_android_editor.apk"
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"
cp out/android/tools/android_editor.aab ${reldir}/${binname}
@@ -334,7 +370,7 @@ if [ "${build_classical}" == "1" ]; then
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.ios.a ios_xcode/libgodot.ios.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 -r deps/vulkansdk-macos/MoltenVK/MoltenVK.xcframework ios_xcode/
cp -r deps/moltenvk/MoltenVK/MoltenVK.xcframework ios_xcode/
rm -rf ios_xcode/MoltenVK.xcframework/{macos,tvos}*
cd ios_xcode
zip -q -9 -r "${templatesdir}/ios.zip" *
@@ -368,7 +404,6 @@ if [ "${build_mono}" == "1" ]; then
binbasename="${godot_basename}_mono_linux"
mkdir -p ${binbasename}_x86_64
cp out/linux/x86_64/tools-mono/godot.linuxbsd.editor.x86_64.mono ${binbasename}_x86_64/${binbasename}.x86_64
strip ${binbasename}_x86_64/${binbasename}.x86_64
cp -rp out/linux/x86_64/tools-mono/GodotSharp ${binbasename}_x86_64/
zip -r -q -9 "${reldir_mono}/${binbasename}_x86_64.zip" ${binbasename}_x86_64
rm -rf ${binbasename}_x86_64
@@ -376,17 +411,40 @@ if [ "${build_mono}" == "1" ]; then
binbasename="${godot_basename}_mono_linux"
mkdir -p ${binbasename}_x86_32
cp out/linux/x86_32/tools-mono/godot.linuxbsd.editor.x86_32.mono ${binbasename}_x86_32/${binbasename}.x86_32
strip ${binbasename}_x86_32/${binbasename}.x86_32
cp -rp out/linux/x86_32/tools-mono/GodotSharp/ ${binbasename}_x86_32/
zip -r -q -9 "${reldir_mono}/${binbasename}_x86_32.zip" ${binbasename}_x86_32
rm -rf ${binbasename}_x86_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
cp out/linux/x86_64/templates-mono/godot.linuxbsd.template_debug.x86_64.mono ${templatesdir_mono}/linux_debug.x86_64
cp out/linux/x86_64/templates-mono/godot.linuxbsd.template_release.x86_64.mono ${templatesdir_mono}/linux_release.x86_64
cp out/linux/x86_32/templates-mono/godot.linuxbsd.template_debug.x86_32.mono ${templatesdir_mono}/linux_debug.x86_32
cp out/linux/x86_32/templates-mono/godot.linuxbsd.template_release.x86_32.mono ${templatesdir_mono}/linux_release.x86_32
strip ${templatesdir_mono}/linux*
cp out/linux/arm64/templates-mono/godot.linuxbsd.template_debug.arm64.mono ${templatesdir_mono}/linux_debug.arm64
cp out/linux/arm64/templates-mono/godot.linuxbsd.template_release.arm64.mono ${templatesdir_mono}/linux_release.arm64
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
## Windows (Mono) ##
@@ -395,11 +453,9 @@ if [ "${build_mono}" == "1" ]; then
wrpname="${godot_basename}_mono_win64_console"
mkdir -p ${binname}
cp out/windows/x86_64/tools-mono/godot.windows.editor.x86_64.mono.exe ${binname}/${binname}.exe
strip ${binname}/${binname}.exe
sign_windows ${binname}/${binname}.exe
cp -rp out/windows/x86_64/tools-mono/GodotSharp ${binname}/
cp out/windows/x86_64/tools-mono/godot.windows.editor.x86_64.mono.console.exe ${binname}/${wrpname}.exe
strip ${binname}/${wrpname}.exe
sign_windows ${binname}/${wrpname}.exe
zip -r -q -9 "${reldir_mono}/${binname}.zip" ${binname}
rm -rf ${binname}
@@ -408,11 +464,20 @@ if [ "${build_mono}" == "1" ]; then
wrpname="${godot_basename}_mono_win32_console"
mkdir -p ${binname}
cp out/windows/x86_32/tools-mono/godot.windows.editor.x86_32.mono.exe ${binname}/${binname}.exe
strip ${binname}/${binname}.exe
sign_windows ${binname}/${binname}.exe
cp -rp out/windows/x86_32/tools-mono/GodotSharp ${binname}/
cp out/windows/x86_32/tools-mono/godot.windows.editor.x86_32.mono.console.exe ${binname}/${wrpname}.exe
strip ${binname}/${wrpname}.exe
sign_windows ${binname}/${wrpname}.exe
zip -r -q -9 "${reldir_mono}/${binname}.zip" ${binname}
rm -rf ${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}
rm -rf ${binname}
@@ -422,11 +487,14 @@ if [ "${build_mono}" == "1" ]; then
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/x86_32/templates-mono/godot.windows.template_debug.x86_32.mono.exe ${templatesdir_mono}/windows_debug_x86_32.exe
cp out/windows/x86_32/templates-mono/godot.windows.template_release.x86_32.mono.exe ${templatesdir_mono}/windows_release_x86_32.exe
cp out/windows/arm64/templates-mono/godot.windows.template_debug.arm64.llvm.mono.exe ${templatesdir_mono}/windows_debug_arm64.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_64/templates-mono/godot.windows.template_debug.x86_64.mono.console.exe ${templatesdir_mono}/windows_debug_x86_64_console.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
strip ${templatesdir_mono}/windows*.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) ##
@@ -462,6 +530,21 @@ if [ "${build_mono}" == "1" ]; then
cp out/android/templates-mono/*.apk ${templatesdir_mono}/
cp out/android/templates-mono/android_source.zip ${templatesdir_mono}/
## iOS (Mono) ##
rm -rf 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.ios.debug.simulator.a ios_xcode/libgodot.ios.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.ios.debug.a ios_xcode/libgodot.ios.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
zip -q -9 -r "${templatesdir_mono}/ios.zip" *
cd ..
rm -rf ios_xcode
# No .NET support for those platforms yet.
if false; then
@@ -472,21 +555,6 @@ if [ "${build_mono}" == "1" ]; then
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
## iOS (Mono) ##
rm -rf 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.ios.debug.simulator.a ios_xcode/libgodot.ios.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.ios.debug.a ios_xcode/libgodot.ios.debug.xcframework/ios-arm64/libgodot.a
cp -r deps/vulkansdk-macos/MoltenVK/MoltenVK.xcframework ios_xcode/
rm -rf ios_xcode/MoltenVK.xcframework/{macos,tvos}*
cd ios_xcode
zip -q -9 -r "${templatesdir_mono}/ios.zip" *
cd ..
rm -rf ios_xcode
fi
## Templates TPZ (Mono) ##
@@ -506,13 +574,4 @@ if [ "${build_mono}" == "1" ]; then
fi
# NuGet packages
if [ "${publish_nuget}" == "1" ]; then
echo "Publishing NuGet packages..."
publish_nuget_packages out/linux/x86_64/tools-mono/GodotSharp/Tools/nupkgs/*.nupkg
fi
echo "All editor binaries and templates prepared successfully for release"

View File

@@ -8,12 +8,17 @@ set -e
# we run all builds in parallel each from their own folder.
export NUM_JOBS=5
declare -a JOBS=(
"target=editor use_closure_compiler=yes"
"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"
@@ -29,12 +34,10 @@ tar xf /root/godot.tar.gz --strip-components=1
# Classical
dnf -y install gettext
if [ "${CLASSICAL}" == "1" ]; then
echo "Starting classical build for Web..."
for i in {0..4}; do
for i in {0..3}; do
cp -r /root/godot /root/godot$i
cd /root/godot$i
echo "$SCONS platform=web ${OPTIONS} ${JOBS[$i]}"
@@ -42,16 +45,35 @@ if [ "${CLASSICAL}" == "1" ]; then
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/godot0/bin/*.editor*.zip /root/out/tools
cp -rvp /root/godot/bin/*.editor*.zip /root/out/tools
mkdir -p /root/out/templates
for i in {1..4}; do
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

View File

@@ -5,8 +5,9 @@ set -e
# Config
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
export OPTIONS="production=yes angle_libs=/root/angle"
export OPTIONS="production=yes use_mingw=yes angle_libs=/root/angle mesa_libs=/root/mesa d3d12=yes"
export OPTIONS_MONO="module_mono_enabled=yes"
export OPTIONS_LLVM="use_llvm=yes mingw_prefix=/root/llvm-mingw"
export TERM=xterm
rm -rf godot
@@ -16,8 +17,6 @@ tar xf /root/godot.tar.gz --strip-components=1
# Classical
dnf -y install gettext
if [ "${CLASSICAL}" == "1" ]; then
echo "Starting classical build for Windows..."
@@ -42,6 +41,28 @@ if [ "${CLASSICAL}" == "1" ]; then
mkdir -p /root/out/x86_32/templates
cp -rvp bin/* /root/out/x86_32/templates
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
# Mono
@@ -75,6 +96,18 @@ if [ "${MONO}" == "1" ]; then
mkdir -p /root/out/x86_32/templates-mono
cp -rvp bin/* /root/out/x86_32/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
fi
echo "Windows build successful"

View File

@@ -4,6 +4,14 @@ set -e
OPTIND=1
export basedir="$(pwd)"
mkdir -p ${basedir}/out
mkdir -p ${basedir}/out/logs
mkdir -p ${basedir}/mono-glue
# Log output to a file automatically.
exec > >(tee -a "out/logs/build") 2>&1
# Config
# For default registry and number of cores.
@@ -28,6 +36,7 @@ godot_version=""
git_treeish="master"
build_classical=1
build_mono=1
build_steam=0
force_download=0
skip_download=1
skip_git_checkout=0
@@ -100,6 +109,10 @@ case "$choice" in
esac
export GODOT_VERSION_STATUS="${status}"
if [ "${status}" == "stable" ]; then
build_steam=1
fi
if [ ! -z "${username}" ] && [ ! -z "${password}" ]; then
if ${podman} login ${registry} -u "${username}" -p "${password}"; then
export logged_in=true
@@ -131,9 +144,16 @@ if [ $skip_download == 0 ]; then
fi
fi
# macOS and iOS need the Vulkan SDK
if [ ! -d "deps/vulkansdk-macos" ]; then
echo "Missing Vulkan SDK for macOS, we're going to run into issues!"
# 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
@@ -141,10 +161,39 @@ if [ ! -d "deps/angle" ]; then
echo "Missing ANGLE libraries, downloading them."
mkdir -p deps/angle
pushd deps/angle
curl -L -o windows.zip https://github.com/godotengine/godot-angle-static/releases/download/chromium%2F6029/Windows.6029-1.MinGW_11.x86_64.x86_32.zip
curl -L -o macos.zip https://github.com/godotengine/godot-angle-static/releases/download/chromium%2F6029/macOS.6029.Xcode_15.arm64.x86_64.zip
unzip windows.zip && rm -f windows.zip
unzip macos.zip && rm -f macos.zip
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
@@ -187,19 +236,14 @@ EOF
popd
fi
export basedir="$(pwd)"
mkdir -p ${basedir}/out
mkdir -p ${basedir}/out/logs
mkdir -p ${basedir}/mono-glue
export podman_run="${podman} run -it --rm --env BUILD_NAME --env GODOT_VERSION_STATUS --env 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
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
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 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 -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
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
@@ -208,14 +252,18 @@ mkdir -p ${basedir}/out/web
${podman_run} -v ${basedir}/build-web:/root/build -v ${basedir}/out/web:/root/out localhost/godot-web:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/web
mkdir -p ${basedir}/out/macos
${podman_run} -v ${basedir}/build-macos:/root/build -v ${basedir}/out/macos:/root/out -v ${basedir}/deps/vulkansdk-macos:/root/vulkansdk -v ${basedir}/deps/angle:/root/angle localhost/godot-osx:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/macos
${podman_run} -v ${basedir}/build-macos:/root/build -v ${basedir}/out/macos:/root/out -v ${basedir}/deps/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
mkdir -p ${basedir}/out/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
${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
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
uid=$(id -un)
gid=$(id -gn)
if [ ! -z "$SUDO_UID" ]; then
chown -R "${SUDO_UID}":"${SUDO_GID}" ${basedir}/git ${basedir}/out ${basedir}/mono-glue ${basedir}/godot*.tar.gz
uid="${SUDO_UID}"
gid="${SUDO_GID}"
fi
chown -R -f $uid:$gid ${basedir}/git ${basedir}/out ${basedir}/mono-glue ${basedir}/godot*.tar.gz

View File

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

View File

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

View File

@@ -12,6 +12,29 @@
# relevant tool in your PATH or an absolute path to run it from.
export PODMAN='podman'
# GitHub token for @GodotBuilder for releases on godotengine/godot-builds,
# can use a long expiry date.
# For stable releases to godotengine/godot, generate a personal token with
# write access to godotengine/godot for use in publish-release.sh.
export GH_TOKEN=''
# Path to a Git clone of https://github.com/godotengine/godot-builds.
# Only used for uploading official releases.
export GODOT_BUILDS_PATH=''
# Path to the directory with the Steam upload setup.
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.
# Only used for uploading official releases.
export WEB_EDITOR_HOSTNAME=''
# Registry for build containers.
# The default registry is the one used for official Godot builds.
# Note that some of its images are private and only accessible to selected
@@ -50,7 +73,8 @@ export OSX_HOST=''
export OSX_KEY_ID=''
# Bundle id for the signed app
export OSX_BUNDLE_ID=''
# Username/password for Apple's signing APIs (used for atltool)
# Username/password for Apple's signing APIs (used for notarytool)
export APPLE_TEAM=''
export APPLE_ID=''
export APPLE_ID_PASSWORD=''

229
publish-release.sh Executable file
View File

@@ -0,0 +1,229 @@
#!/bin/bash
set -e
# Log output to a file automatically.
exec > >(tee -a "out/logs/publish-release") 2>&1
# Config
# For upload tools and signing/release keys.
source ./config.sh
godot_version=""
latest_stable=0
skip_stable=0
draft_arg=""
while getopts "h?v:lsd" opt; do
case "$opt" in
h|\?)
echo "Usage: $0 [OPTIONS...]"
echo
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 " -d publish as draft release on GitHub"
echo
exit 1
;;
v)
godot_version=$OPTARG
;;
l)
latest_stable=1
;;
s)
skip_stable=1
;;
d)
draft_arg="-d"
;;
esac
done
if [ -z "${godot_version}" ]; then
echo "Mandatory argument -v missing."
exit 1
fi
basedir=$(pwd)
reldir=${basedir}/releases/${godot_version}
# Confirm
IFS=- read version status <<< "${godot_version}"
echo "Publishing Godot ${version} ${status}."
read -p "Is this correct (y/n)? " choice
case "$choice" in
y|Y ) echo "yes";;
n|N ) echo "No, aborting."; exit 0;;
* ) echo "Invalid choice, aborting."; exit 1;;
esac
template_version=${version}.${status}
# Config checks for stable releases.
if [ "${status}" == "stable" -a "${skip_stable}" == "0" ]; then
echo "Publishing a stable release. Checking that configuration is valid to perform stable release specific steps."
read -p "Enter personal access token (GH_TOKEN) for godotengine/godot: " personal_gh_token
if [[ "${personal_gh_token}" != "github_pat_"* ]]; then
echo "Provided personal access token should start with 'github_pat', aborting."
exit 1
fi
if ! gh api repos/godotengine/godot/git/refs/tags | grep -q ${godot_version}; then
echo "The tag '${godot_version}' does not exist in godotengine/godot, aborting."
echo "Push commits and create it manually before running this script."
exit 1
fi
if [ ! -d "${UPLOAD_STEAM_PATH}" ]; then
echo "Invalid config.sh: UPLOAD_STEAM_PATH is not a directory, aborting."
exit 1
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
# Upload to GitHub godot-builds
echo "Uploading release to to godotengine/godot-builds repository."
if [ -z "${GODOT_BUILDS_PATH}" ]; then
echo "Missing path to godotengine/godot-builds clone in config.sh, necessary to upload releases. Aborting."
exit 1
fi
${GODOT_BUILDS_PATH}/tools/upload-github.sh -v ${version} -f ${status} ${draft_arg}
# Stable release only
if [ "${status}" == "stable" -a "${skip_stable}" == "0" ]; then
namever=Godot_v${godot_version}
echo "Uploading stable release to main GitHub repository."
export GH_TOKEN=${personal_gh_token}
pushd git
# Get release details from existing godot-builds release.
release_info=$(gh release view ${godot_version} --repo godotengine/godot-builds --json name,body)
release_title=$(echo "$release_info" | jq -r '.name')
release_desc=$(echo "$release_info" | jq -r '.body')
gh release create ${godot_version} --repo godotengine/godot --title "$release_title" --notes "$release_desc" ${draft_arg}
gh release upload ${godot_version} ${reldir}/[Gg]* ${reldir}/mono/[Gg]*
# Concatenate SHA sums.
cp ${reldir}/SHA512-SUMS.txt .
cat ${reldir}/mono/SHA512-SUMS.txt >> SHA512-SUMS.txt
gh release upload ${godot_version} SHA512-SUMS.txt
rm SHA512-SUMS.txt
popd
echo "Uploading stable release to Steam."
pushd ${UPLOAD_STEAM_PATH}
rm -rf content/bin/[Gg]*
rm -rf content/editor_data/export_templates/*
cp -f ${basedir}/git/*.{md,txt,png,svg} content/
# Steam specific binaries prepared by build-release.sh
cp -r ${basedir}/steam/[Gg]* content/bin/
unzip ${reldir}/${namever}_export_templates.tpz -d content/editor_data/export_templates/
mv content/editor_data/export_templates/{templates,${template_version}}
steam_build/build.sh
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."
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
echo "Uploading web editor... (with retry logic as it can be flaky)"
MAX_RETRIES=5
delay=5
retry_command() {
local attempt=1
local cmd=$1
while [ ${attempt} -le ${MAX_RETRIES} ]; do
echo "Attempt ${attempt}: Running command..."
eval "${cmd}" && return 0 # Success
echo "Command failed. Retrying in ${delay} seconds..."
sleep ${delay}
((attempt++))
delay=$((delay * 2)) # Exponential backoff
done
echo "❌ Command failed after ${MAX_RETRIES} attempts."
return 1
}
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}; 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/"
sleep 2
retry_command "ssh -p 22 ${WEB_EDITOR_HOSTNAME} '${command}'"
echo "All publishing steps done. Check out/logs/publish-release to double check that all steps succeeded."