46 Commits

Author SHA1 Message Date
Rémi Verschelde
69b6f0a66e publish-release: Add -d argument to publish as draft release on GH (#135)
(cherry picked from commit fd3bd4ad89)
2025-10-29 10:52:49 +01:00
Anish Kumar
13e2c35a67 Android Editor: Add release url to dev/beta/rc notes on Play Store (#134)
(cherry picked from commit 38f2a5e351)
2025-10-27 18:30:48 +01:00
Rémi Verschelde
5adaf9761a Fix check for Play Store JSON upload key
(cherry picked from commit d72076547a)
2025-10-15 23:09:14 +02:00
Anish Mishra
daba64bcfa Publish Android Editor stable releases to open testing track (#130)
(cherry picked from commit 33d44ce966)
2025-10-14 01:01:58 +02:00
Anish Mishra
eea2b5572b Automate Play Store uploads for the Android Editor (#128)
Co-authored-by: Rémi Verschelde <remi@godotengine.org>
(cherry picked from commit f17aad663b)
2025-10-10 14:08:06 +02:00
Thaddeus Crews
a08918cf61 Merge pull request #126 from m4gr3d/fix_android_native_debug_symbols_name
Update the name of the Android native debug symbols files to start with a `g`
2025-08-28 12:36:32 -05:00
Fredia Huya-Kouadio
dd9cf6163a Update the name of the Android native debug symbols files to start with a g 2025-08-28 10:32:22 -07:00
Thaddeus Crews
f1439e80e1 Merge pull request #123 from bruvzg/ac17
Update access-kit to 0.17.0
2025-08-01 12:22:04 -05:00
Pāvels Nadtočajevs
dbe21464e8 Update access-kit to 0.17.0 2025-07-24 10:33:34 +03:00
Thaddeus Crews
84d8bf774a Merge pull request #122 from m4gr3d/include_native_debug_symbols_android
Include the Android native debug symbols in the release binaries
2025-07-22 12:52:00 -05:00
Fredia Huya-Kouadio
6224c714c9 Include the Android native debug symbols in the release binaries 2025-07-22 10:16:04 -07:00
Thaddeus Crews
5b0684d8fb Merge pull request #120 from m4gr3d/update_android_build_config
Android: Fix native debug symbols generation
2025-07-07 10:15:37 -05:00
Fredia Huya-Kouadio
2c4962d347 Fix native debug symbols generation 2025-06-26 00:15:51 -07:00
Rémi Verschelde
fb6991e3c0 Merge pull request #118 from godotengine/windows-new-signing
Windows: Change code signing process to match new key
2025-06-24 10:21:38 +02:00
Rémi Verschelde
11046692e1 Windows: Change code signing process to match new key 2025-06-18 12:44:22 +02:00
Rémi Verschelde
7cc22b8254 Merge pull request #115 from stuartcarnie/appleembedded
Apple: add visionOS build support; unify build container
2025-06-16 02:04:05 +02:00
Stuart Carnie
e7412b53cd Apple: add visionOS build support; unify build container
iOS builds now use the godot-embedded build container, like visionOS
(and eventually tvOS).

Refactored iOS build script to be easier to maintain and duplicate
for visionOS.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2025-06-13 23:43:49 +02:00
Rémi Verschelde
f8e8e20da2 Merge pull request #117 from godotengine/update-toolchains-f42
Update toolchains based on Fedora 42 for Godot 4.5
2025-06-13 23:40:12 +02:00
Rémi Verschelde
d95bc9b24c Update toolchains based on Fedora 42 for Godot 4.5 2025-06-13 23:39:07 +02:00
Rémi Verschelde
7b2ea29c50 Merge pull request #116 from bruvzg/angle_upd
Update Angle to chromium/7219
2025-06-09 10:57:27 +02:00
Pāvels Nadtočajevs
3e4ab70d3c Update Angle to chromium/7219 2025-06-09 11:17:24 +03:00
Rémi Verschelde
b1cf9b6095 Merge pull request #114 from bruvzg/ac_16
Update access-kit to 0.16.0, reenable it for 32-bit Windows builds.
2025-06-04 15:39:03 +02:00
Pāvels Nadtočajevs
74e21311a4 Update access-kit to 0.16.0, reenable it for 32-bit Windows builds. 2025-06-03 10:54:41 +03:00
Rémi Verschelde
6d05bde764 Android: Clean build folder at some intermediate steps to reduce disk usage
With debug symbols, the full Android build can take around 100G currently.
2025-06-02 12:05:34 +02:00
Rémi Verschelde
05a4bfed90 Merge pull request #113 from rsanchezsaez/apple/apple-embedded-rename
[build-ios] Rename 'IOS_TOOLCHAIN_PATH' to 'APPLE_TOOLCHAIN_PATH'
2025-05-29 09:54:05 +02:00
Ricardo Sanchez-Saez
38dbce0679 [build-ios] Rename 'IOS_TOOLCHAIN_PATH' to 'APPLE_TOOLCHAIN_PATH' 2025-05-14 07:35:56 +01:00
Rémi Verschelde
8c9fd0328b Define redirect_build_objects=no to avoid copying GBs of bin/obj 2025-05-13 23:23:27 +02:00
Rémi Verschelde
7a89e9087d Merge pull request #112 from m4gr3d/enable_android_debug_symbols
Setup Android debug symbols
2025-05-13 15:48:43 +02:00
Rémi Verschelde
6cc1418b6b Windows: Disable accesskit for x86_32 builds, doesn't work yet with MinGW 2025-04-25 23:55:34 +02:00
Fredia Huya-Kouadio
3a34cfa1bc Setup Android debug symbols 2025-04-22 10:49:47 -07:00
Rémi Verschelde
36d2cc32d6 Merge pull request #111 from m4gr3d/setup_godot_tools_lib_maven_central
Update the Android build scripts to allow exporting 'Godot Tools' Android library to MavenCentral
2025-04-22 12:20:57 +02:00
Fredia Huya-Kouadio
95ed6d23db Update the Android build scripts to allow exporting 'Godot Tools' Android library to MavenCentral 2025-03-30 19:11:43 -07:00
Rémi Verschelde
3348432f38 Merge pull request #110 from godotengine/stable-release-upload
publish-release: Add support to upload stable builds to GH, Steam, EGS and itch.io
2025-03-27 11:26:57 +01:00
Rémi Verschelde
73402a1c9f publish-release: Add support to upload stable builds to GH, Steam, EGS and itch.io 2025-03-26 13:14:08 +01:00
Rémi Verschelde
d831be12a8 Merge pull request #109 from bruvzg/accesskit
Add accesskit-c to the build setup.
2025-03-21 10:01:30 +01:00
Pāvels Nadtočajevs
44992c6c76 Add accesskit-c to the build setup. 2025-03-21 09:47:31 +02: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
17 changed files with 554 additions and 112 deletions

2
.gitignore vendored
View File

@@ -3,6 +3,7 @@ config.sh
*.jks
*.pfx
*.pkcs12
/*.json
# Generated by build scripts
angle/
@@ -16,6 +17,7 @@ angle.7z
out/
releases/
sha512sums/
steam/
tmp/
web/

View File

@@ -4,16 +4,21 @@ set -e
# Config
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
export OPTIONS="production=yes"
# Debug symbols are enabled for the Android builds so we can generate a separate debug symbols file.
# Gradle will strip them out of the final artifacts.
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no redirect_build_objects=no"
export OPTIONS="production=yes debug_symbols=yes"
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
cp -rf /root/swappy/* thirdparty/swappy-frame-pacing/
prepare_source() {
cd /root
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.
@@ -30,49 +35,61 @@ fi
if [ "${CLASSICAL}" == "1" ]; then
echo "Starting classical build for Android..."
prepare_source
$SCONS platform=android arch=arm32 $OPTIONS target=editor store_release=${store_release}
$SCONS platform=android arch=arm64 $OPTIONS target=editor store_release=${store_release}
$SCONS platform=android arch=x86_32 $OPTIONS target=editor store_release=${store_release}
$SCONS platform=android arch=x86_64 $OPTIONS target=editor store_release=${store_release}
$SCONS platform=android arch=x86_64 $OPTIONS target=editor store_release=${store_release} separate_debug_symbols=yes # Generate native debug symbols.
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
# Copy the native debug symbols, a single one cover all editor builds.
cp bin/android-editor-release-native-symbols.zip /root/out/tools/android_editor_native_debug_symbols.zip
# Copy the generated Android editor binaries (apk & 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 build, we only copy the apk.
# 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
# Copy the native debug symbols, a single one cover all editor builds.
cp bin/android-editor-debug-native-symbols.zip /root/out/tools/android_editor_native_debug_symbols.zip
# Copy the generated Android editor binaries (apk & 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 build, we only copy the apk.
# 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/
# Template builds
prepare_source
$SCONS platform=android arch=arm32 $OPTIONS target=template_release
$SCONS platform=android arch=arm64 $OPTIONS target=template_release
$SCONS platform=android arch=x86_32 $OPTIONS target=template_release
$SCONS platform=android arch=x86_64 $OPTIONS target=template_release separate_debug_symbols=yes # Generate native debug symbols only for the release templates.
$SCONS platform=android arch=arm32 $OPTIONS target=template_debug
$SCONS platform=android arch=arm32 $OPTIONS target=template_release
$SCONS platform=android arch=arm64 $OPTIONS target=template_debug
$SCONS platform=android arch=arm64 $OPTIONS target=template_release
$SCONS platform=android arch=x86_32 $OPTIONS target=template_debug
$SCONS platform=android arch=x86_32 $OPTIONS target=template_release
$SCONS platform=android arch=x86_64 $OPTIONS target=template_debug
$SCONS platform=android arch=x86_64 $OPTIONS target=template_release
pushd platform/android/java
./gradlew generateGodotTemplates
@@ -91,6 +108,7 @@ if [ "${CLASSICAL}" == "1" ]; then
cp bin/android_debug.apk /root/out/templates/
cp bin/android_release.apk /root/out/templates/
cp bin/godot-lib.template_release.aar /root/out/templates/
cp bin/android-template-release-native-symbols.zip /root/out/templates/android_release_template_native_debug_symbols.zip
fi
# Mono
@@ -98,6 +116,8 @@ fi
if [ "${MONO}" == "1" ]; then
echo "Starting Mono build for Android..."
prepare_source
cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/
$SCONS platform=android arch=arm32 $OPTIONS $OPTIONS_MONO target=template_debug

View File

@@ -0,0 +1,109 @@
import sys, socket
from google.oauth2 import service_account
from googleapiclient.discovery import build
PACKAGE_NAME = "org.godotengine.editor.v4"
def main(aab_path, nds_path, key_path, version_name):
version_base = version_name.split("-")[0]
version_parts = version_base.split(".")
major = version_parts[0]
minor = version_parts[1]
patch = int(version_parts[2]) if len(version_parts) > 2 else 0
channel = version_name.split("-")[1]
release_note = f"Godot Engine {version_name} has arrived!\nNote: This is a pre-release piece of software so be sure to make backups."
track = "alpha"
if "stable" in channel:
if patch == 0:
release_url = f"https://godotengine.org/releases/{major}.{minor}/"
else:
release_url = f"https://godotengine.org/article/maintenance-release-godot-{major}-{minor}-{patch}/"
release_note = f"Godot Engine {version_name} has arrived!\nRelease page: {release_url}"
track = "beta"
elif "rc" in channel:
channel_url = channel.replace("rc", "rc-")
if patch == 0:
release_url = f"https://godotengine.org/article/release-candidate-godot-{major}-{minor}-{channel_url}/"
else:
release_url = f"https://godotengine.org/article/release-candidate-godot-{major}-{minor}-{patch}-{channel_url}/"
release_note += f"\nRelease page: {release_url}"
else:
# No need to handle patch versions here: maintenance releases go straight to RC and stable.
# There are no 4.5.1-dev or 4.5.1-beta builds.
if "beta" in channel:
channel_url = channel.replace("beta", "beta-")
else:
channel_url = channel.replace("dev", "dev-")
release_url = f"https://godotengine.org/article/dev-snapshot-godot-{major}-{minor}-{channel_url}/"
release_note += f"\nRelease page: {release_url}"
scopes = ["https://www.googleapis.com/auth/androidpublisher"]
credentials = service_account.Credentials.from_service_account_file(key_path, scopes=scopes)
initial_timeout = socket.getdefaulttimeout()
socket.setdefaulttimeout(900)
service = build("androidpublisher", "v3", credentials=credentials)
print("Creating a new edit")
edit = service.edits().insert(body={}, packageName=PACKAGE_NAME).execute()
edit_id = edit["id"]
print(f"Uploading {aab_path}")
bundle_response = service.edits().bundles().upload(
editId=edit_id,
packageName=PACKAGE_NAME,
media_body=aab_path,
media_mime_type="application/octet-stream"
).execute()
version_code = bundle_response["versionCode"]
print(f"Uploaded AAB with versionCode: {version_code}")
print(f"Uploading native debug symbols {nds_path}")
service.edits().deobfuscationfiles().upload(
editId=edit_id,
packageName=PACKAGE_NAME,
apkVersionCode=version_code,
deobfuscationFileType="nativeCode",
media_body=nds_path,
media_mime_type="application/octet-stream"
).execute()
release_name = f"v{version_name} ({version_code})"
print(f"Assigning {release_name} to {track} track")
service.edits().tracks().update(
editId=edit_id,
packageName=PACKAGE_NAME,
track=track,
body={
"releases": [{
"name": release_name,
"versionCodes": [str(version_code)],
"status": "completed",
"releaseNotes": [{
"language": "en-US",
"text": release_note
}]
}]
}
).execute()
service.edits().commit(editId=edit_id, packageName=PACKAGE_NAME).execute()
print("Release uploaded and published successfully!")
socket.setdefaulttimeout(initial_timeout)
if __name__ == "__main__":
if len(sys.argv) != 5:
print("Usage: python3 upload_playstore.py <aab-path> <native-debug-symbols-path> <json-key-path> <version-name>")
print("version-name format: <major>.<minor>[.<patch>]-<channel> (e.g. 4.4.1-stable, 4.5-stable, 4.6-dev1)")
sys.exit(1)
aab_path = sys.argv[1]
nds_path = sys.argv[2]
key_path = sys.argv[3]
version_name = sys.argv[4]
main(aab_path, nds_path, key_path, version_name)

View File

@@ -15,4 +15,4 @@ ${PODMAN} run -it --rm \
"source /root/keystore/config.sh && \
cp -r /root/godot/.gradle /root && \
cd /root/godot/platform/android/java && \
./gradlew publishTemplateReleasePublicationToSonatypeRepository --max-workers 1 closeAndReleaseSonatypeStagingRepository"
./gradlew publishAllPublicationToSonatypeRepository --max-workers 1 closeAndReleaseSonatypeStagingRepository"

View File

@@ -0,0 +1,29 @@
#!/bin/bash
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <version-name>"
exit 1
fi
VERSION_NAME="$1"
BASEDIR="$(pwd)"
source ${BASEDIR}/config.sh
VENV_DIR="${BASEDIR}/venv"
PYTHON_SCRIPT="${BASEDIR}/build-android/playstore_upload_script.py"
AAB_FILE="${BASEDIR}/out/android/tools/android_editor.aab"
NDS_FILE="${BASEDIR}/out/android/tools/android_editor_native_debug_symbols.zip"
JSON_KEY_FILE="${BASEDIR}/${GODOT_ANDROID_UPLOAD_JSON_KEY}"
echo "Creating virtual environment"
rm -rf "$VENV_DIR"
python3 -m venv "$VENV_DIR"
source "$VENV_DIR/bin/activate"
echo "Installing google-api-python-client"
pip install --upgrade google-api-python-client
echo "Uploading editor to Google Play Store..."
python3 "$PYTHON_SCRIPT" "$AAB_FILE" "$NDS_FILE" "$JSON_KEY_FILE" "$VERSION_NAME"

View File

@@ -4,15 +4,18 @@ set -e
# 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 redirect_build_objects=no"
# 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.
export OPTIONS="production=yes use_lto=no"
export OPTIONS_MONO="module_mono_enabled=yes"
export TERM=xterm
export IOS_SDK="17.5"
export IOS_LIPO="/root/ioscross/arm64/bin/arm-apple-darwin11-lipo"
export IOS_SDK="18.5"
export IOS_DEVICE="IOS_SDK_PATH=/root/SDKs/iPhoneOS${IOS_SDK}.sdk"
export IOS_SIMULATOR="IOS_SDK_PATH=/root/SDKs/iPhoneSimulator${IOS_SDK}.sdk simulator=yes"
export APPLE_TARGET_ARM64="APPLE_TOOLCHAIN_PATH=/root/ioscross/arm64 apple_target_triple=arm-apple-darwin11-"
export APPLE_TARGET_X86_64="APPLE_TOOLCHAIN_PATH=/root/ioscross/x86_64 apple_target_triple=x86_64-apple-darwin11-"
rm -rf godot
mkdir godot
@@ -25,30 +28,22 @@ if [ "${CLASSICAL}" == "1" ]; then
echo "Starting classical build for iOS..."
# arm64 device
$SCONS platform=ios $OPTIONS arch=arm64 ios_simulator=no target=template_debug \
IOS_SDK_PATH="/root/ioscross/arm64/SDK/iPhoneOS${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/arm64/" ios_triple="arm-apple-darwin11-"
$SCONS platform=ios $OPTIONS arch=arm64 ios_simulator=no target=template_release \
IOS_SDK_PATH="/root/ioscross/arm64/SDK/iPhoneOS${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/arm64/" ios_triple="arm-apple-darwin11-"
$SCONS platform=ios $OPTIONS arch=arm64 target=template_debug $IOS_DEVICE $APPLE_TARGET_ARM64
$SCONS platform=ios $OPTIONS arch=arm64 target=template_release $IOS_DEVICE $APPLE_TARGET_ARM64
# arm64 simulator
# 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/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-"
#$SCONS platform=ios $OPTIONS arch=arm64 target=template_debug $IOS_SIMULATOR $APPLE_TARGET_ARM64
#$SCONS platform=ios $OPTIONS arch=arm64 target=template_release $IOS_SIMULATOR $APPLE_TARGET_ARM64
# 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/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/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 target=template_debug $IOS_SIMULATOR $APPLE_TARGET_X86_64
$SCONS platform=ios $OPTIONS arch=x86_64 target=template_release $IOS_SIMULATOR $APPLE_TARGET_X86_64
mkdir -p /root/out/templates
cp bin/libgodot.ios.template_release.arm64.a /root/out/templates/libgodot.ios.a
cp bin/libgodot.ios.template_debug.arm64.a /root/out/templates/libgodot.ios.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.ios.template_debug.arm64.simulator.a bin/libgodot.ios.template_debug.x86_64.simulator.a -output /root/out/templates/libgodot.ios.debug.simulator.a
cp bin/libgodot.ios.template_release.x86_64.simulator.a /root/out/templates/libgodot.ios.simulator.a
cp bin/libgodot.ios.template_debug.x86_64.simulator.a /root/out/templates/libgodot.ios.debug.simulator.a
fi
@@ -61,31 +56,22 @@ if [ "${MONO}" == "1" ]; then
cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/
# arm64 device
$SCONS platform=ios $OPTIONS $OPTIONS_MONO arch=arm64 ios_simulator=no target=template_debug \
IOS_SDK_PATH="/root/ioscross/arm64/SDK/iPhoneOS${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/arm64/" ios_triple="arm-apple-darwin11-"
$SCONS platform=ios $OPTIONS $OPTIONS_MONO arch=arm64 ios_simulator=no target=template_release \
IOS_SDK_PATH="/root/ioscross/arm64/SDK/iPhoneOS${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/arm64/" ios_triple="arm-apple-darwin11-"
$SCONS platform=ios $OPTIONS $OPTIONS_MONO arch=arm64 target=template_debug $IOS_DEVICE $APPLE_TARGET_ARM64
$SCONS platform=ios $OPTIONS $OPTIONS_MONO arch=arm64 target=template_release $IOS_DEVICE $APPLE_TARGET_ARM64
# arm64 simulator
# 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/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/iPhoneSimulator${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/arm64_sim/" ios_triple="arm-apple-darwin11-"
#$SCONS platform=ios $OPTIONS $OPTIONS_MONO arch=arm64 target=template_debug $IOS_SIMULATOR $APPLE_TARGET_ARM64
#$SCONS platform=ios $OPTIONS $OPTIONS_MONO arch=arm64 target=template_release $IOS_SIMULATOR $APPLE_TARGET_ARM64
# 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/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/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 target=template_debug $IOS_SIMULATOR $APPLE_TARGET_X86_64
$SCONS platform=ios $OPTIONS $OPTIONS_MONO arch=x86_64 target=template_release $IOS_SIMULATOR $APPLE_TARGET_X86_64
mkdir -p /root/out/templates-mono
cp bin/libgodot.ios.template_release.arm64.a /root/out/templates-mono/libgodot.ios.a
cp bin/libgodot.ios.template_debug.arm64.a /root/out/templates-mono/libgodot.ios.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.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
cp bin/libgodot.ios.template_release.x86_64.simulator.a /root/out/templates-mono/libgodot.ios.simulator.a
cp bin/libgodot.ios.template_debug.x86_64.simulator.a /root/out/templates-mono/libgodot.ios.debug.simulator.a
fi

View File

@@ -4,8 +4,8 @@ set -e
# Config
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
export OPTIONS="production=yes debug_symbols=yes separate_debug_symbols=yes debug_paths_relative=yes"
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no redirect_build_objects=no"
export OPTIONS="production=yes accesskit_sdk_path=/root/accesskit/accesskit-c"
export OPTIONS_MONO="module_mono_enabled=yes"
export TERM=xterm
@@ -14,8 +14,6 @@ mkdir godot
cd godot
tar xf /root/godot.tar.gz --strip-components=1
dnf install -y binutils
# Classical
if [ "${CLASSICAL}" == "1" ]; then

View File

@@ -4,8 +4,8 @@ set -e
# Config
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
export OPTIONS="osxcross_sdk=darwin23.6 production=yes debug_symbols=yes separate_debug_symbols=yes debug_paths_relative=yes use_volk=no vulkan_sdk_path=/root/moltenvk angle_libs=/root/angle"
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no redirect_build_objects=no"
export OPTIONS="osxcross_sdk=darwin24.5 production=yes use_volk=no vulkan_sdk_path=/root/moltenvk angle_libs=/root/angle accesskit_sdk_path=/root/accesskit/accesskit-c"
export OPTIONS_MONO="module_mono_enabled=yes"
export TERM=xterm

View File

@@ -3,23 +3,26 @@
set -e
export basedir=$(pwd)
# Log output to a file automatically.
exec > >(tee -a "out/logs/build-release") 2>&1
# Config
# For signing keystore and password.
source ./config.sh
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
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
sign_windows() {
if [ $can_sign_windows == 0 ]; then
return
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
}
@@ -151,12 +154,13 @@ elif [[ "{$templates_version}" == *"-"* ]]; then
exit 1
fi
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}"
@@ -164,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
@@ -214,6 +222,13 @@ if [ "${build_classical}" == "1" ]; then
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
@@ -293,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
@@ -324,6 +353,8 @@ if [ "${build_classical}" == "1" ]; then
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}
@@ -331,6 +362,10 @@ if [ "${build_classical}" == "1" ]; then
cp out/android/templates/*.apk ${templatesdir}/
cp out/android/templates/android_source.zip ${templatesdir}/
# Native debug symbols
cp out/android/templates/android_release_template_native_debug_symbols.zip ${reldir}/Godot_native_debug_symbols.${templates_version}.template_release.android.zip
cp out/android/tools/android_editor_native_debug_symbols.zip ${reldir}/Godot_native_debug_symbols.${templates_version}.editor.android.zip
## iOS (Classical) ##
rm -rf ios_xcode
@@ -346,6 +381,17 @@ if [ "${build_classical}" == "1" ]; then
cd ..
rm -rf ios_xcode
## visionOS (Classical) ##
rm -rf visionos_xcode
cp -r git/misc/dist/visionos_xcode visionos_xcode
cp out/visionos/templates/libgodot.visionos.a visionos_xcode/libgodot.visionos.release.xcframework/xros-arm64/libgodot.a
cp out/visionos/templates/libgodot.visionos.debug.a visionos_xcode/libgodot.visionos.debug.xcframework/xros-arm64/libgodot.a
cd visionos_xcode
zip -q -9 -r "${templatesdir}/visionos.zip" *
cd ..
rm -rf visionos_xcode
## Templates TPZ (Classical) ##
echo "${templates_version}" > ${templatesdir}/version.txt
@@ -398,6 +444,13 @@ if [ "${build_mono}" == "1" ]; then
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
@@ -507,6 +560,17 @@ if [ "${build_mono}" == "1" ]; then
cd ..
rm -rf ios_xcode
## visionOS (Mono) ##
rm -rf visionos_xcode
cp -r git/misc/dist/visionos_xcode visionos_xcode
cp out/visionos/templates-mono/libgodot.visionos.a visionos_xcode/libgodot.visionos.release.xcframework/xros-arm64/libgodot.a
cp out/visionos/templates-mono/libgodot.visionos.debug.a visionos_xcode/libgodot.visionos.debug.xcframework/xros-arm64/libgodot.a
cd visionos_xcode
zip -q -9 -r "${templatesdir_mono}/visionos.zip" *
cd ..
rm -rf visionos_xcode
# No .NET support for those platforms yet.
if false; then

63
build-visionos/build.sh Executable file
View File

@@ -0,0 +1,63 @@
#!/bin/bash
set -e
# Config
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no redirect_build_objects=no"
# Keep LTO disabled for visionOS - it works but it makes linking apps on deploy very slow,
# which is seen as a regression in the current workflow.
# Disable Vulkan and MoltenVK for visionOS - visionOS doesn't support MoltenVK.
export OPTIONS="production=yes use_lto=no vulkan=no"
export OPTIONS_MONO="module_mono_enabled=yes"
export TERM=xterm
export VISIONOS_SDK="2.5"
export VISIONOS_DEVICE="VISIONOS_SDK_PATH=/root/SDKs/XROS${VISIONOS_SDK}.sdk"
export VISIONOS_SIMULATOR="VISIONOS_SDK_PATH=/root/SDKs/XRSimulator${VISIONOS_SDK}.sdk simulator=yes"
export APPLE_TARGET_ARM64="APPLE_TOOLCHAIN_PATH=/root/ioscross/arm64 apple_target_triple=arm-apple-darwin11-"
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 visionOS..."
# arm64 device
$SCONS platform=visionos $OPTIONS arch=arm64 target=template_debug $VISIONOS_DEVICE $APPLE_TARGET_ARM64
$SCONS platform=visionos $OPTIONS arch=arm64 target=template_release $VISIONOS_DEVICE $APPLE_TARGET_ARM64
# arm64 simulator (disabled for now, see build-ios)
#$SCONS platform=visionos $OPTIONS arch=arm64 target=template_debug $VISIONOS_SIMULATOR $APPLE_TARGET_ARM64
#$SCONS platform=visionos $OPTIONS arch=arm64 target=template_release $VISIONOS_SIMULATOR $APPLE_TARGET_ARM64
mkdir -p /root/out/templates
cp bin/libgodot.visionos.template_release.arm64.a /root/out/templates/libgodot.visionos.a
cp bin/libgodot.visionos.template_debug.arm64.a /root/out/templates/libgodot.visionos.debug.a
fi
# Mono
if [ "${MONO}" == "1" ]; then
echo "Starting Mono build for visionOS..."
cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/
# arm64 device
$SCONS platform=visionos $OPTIONS $OPTIONS_MONO arch=arm64 target=template_debug $VISIONOS_DEVICE $APPLE_TARGET_ARM64
$SCONS platform=visionos $OPTIONS $OPTIONS_MONO arch=arm64 target=template_release $VISIONOS_DEVICE $APPLE_TARGET_ARM64
# arm64 simulator (disabled for now, see build-ios)
#$SCONS platform=visionos $OPTIONS $OPTIONS_MONO arch=arm64 target=template_debug $VISIONOS_SIMULATOR $APPLE_TARGET_ARM64
#$SCONS platform=visionos $OPTIONS $OPTIONS_MONO arch=arm64 target=template_release $VISIONOS_SIMULATOR $APPLE_TARGET_ARM64
mkdir -p /root/out/templates-mono
cp bin/libgodot.visionos.template_release.arm64.a /root/out/templates-mono/libgodot.visionos.a
cp bin/libgodot.visionos.template_debug.arm64.a /root/out/templates-mono/libgodot.visionos.debug.a
fi
echo "visionOS build successful"

View File

@@ -20,7 +20,7 @@ declare -a JOBS_NOTHREADS=(
"target=template_release dlink_enabled=yes threads=no"
)
export SCONS="scons -j$(expr ${NUM_CORES} / ${NUM_JOBS}) verbose=yes warnings=no progress=no"
export SCONS="scons -j$(expr ${NUM_CORES} / ${NUM_JOBS}) verbose=yes warnings=no progress=no redirect_build_objects=no"
export OPTIONS="production=yes"
export OPTIONS_MONO="module_mono_enabled=yes -j${NUM_CORES}"
export TERM=xterm

View File

@@ -4,8 +4,8 @@ set -e
# Config
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
export OPTIONS="production=yes debug_symbols=yes separate_debug_symbols=yes debug_paths_relative=yes use_mingw=yes angle_libs=/root/angle mesa_libs=/root/mesa d3d12=yes"
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no redirect_build_objects=no"
export OPTIONS="production=yes use_mingw=yes angle_libs=/root/angle mesa_libs=/root/mesa d3d12=yes accesskit_sdk_path=/root/accesskit/accesskit-c"
export OPTIONS_MONO="module_mono_enabled=yes"
export OPTIONS_LLVM="use_llvm=yes mingw_prefix=/root/llvm-mingw"
export TERM=xterm

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.
@@ -125,7 +133,7 @@ if [ $skip_download == 0 ]; then
if [ ! -z "${logged_in}" ]; then
echo "Fetching private images"
for image in macosx android ios; do
for image in macosx android appleembedded; do
if [ ${force_download} == 1 ] || ! ${podman} image exists godot-private/$image; then
if ! ${podman} pull ${registry}/godot-private/${image}; then
echo "ERROR: image $image does not exist and can't be downloaded"
@@ -148,12 +156,23 @@ if [ ! -d "deps/moltenvk" ]; then
popd
fi
# accesskit-c for Windows, macOS and Linux
if [ ! -d "deps/accesskit" ]; then
echo "Missing accesskit, downloading it."
mkdir -p deps/accesskit
pushd deps/accesskit
curl -L -o accesskit.zip https://github.com/godotengine/godot-accesskit-c-static/releases/download/0.17.0/accesskit-c-0.17.0.zip
unzip -o accesskit.zip && rm -f accesskit.zip
mv accesskit-c-* accesskit-c
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
base_url=https://github.com/godotengine/godot-angle-static/releases/download/chromium%2F7219/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
@@ -184,7 +203,7 @@ if [ ! -d "deps/swappy" ]; then
echo "Missing Swappy libraries, downloading them."
mkdir -p deps/swappy
pushd deps/swappy
curl -L -O https://github.com/darksylinc/godot-swappy/releases/download/v2023.3.0.0/godot-swappy.7z
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
@@ -228,11 +247,6 @@ 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=${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
@@ -240,22 +254,25 @@ 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 -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 -v ${basedir}/deps/angle:/root/angle -v ${basedir}/deps/mesa:/root/mesa -v ${basedir}/deps/accesskit:/root/accesskit --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
${podman_run} -v ${basedir}/build-linux:/root/build -v ${basedir}/out/linux:/root/out -v ${basedir}/deps/accesskit:/root/accesskit localhost/godot-linux:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/linux
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/moltenvk:/root/moltenvk -v ${basedir}/deps/angle:/root/angle localhost/godot-osx:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/macos
${podman_run} -v ${basedir}/build-macos:/root/build -v ${basedir}/out/macos:/root/out -v ${basedir}/deps/accesskit:/root/accesskit -v ${basedir}/deps/moltenvk:/root/moltenvk -v ${basedir}/deps/angle:/root/angle localhost/godot-osx:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/macos
mkdir -p ${basedir}/out/android
${podman_run} -v ${basedir}/build-android:/root/build -v ${basedir}/out/android:/root/out -v ${basedir}/deps/swappy:/root/swappy -v ${basedir}/deps/keystore:/root/keystore localhost/godot-android:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/android
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-appleembedded:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/ios
mkdir -p ${basedir}/out/visionos
${podman_run} -v ${basedir}/build-visionos:/root/build -v ${basedir}/out/visionos:/root/out localhost/godot-appleembedded:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/visionos
uid=$(id -un)
gid=$(id -gn)
@@ -264,3 +281,5 @@ if [ ! -z "$SUDO_UID" ]; then
gid="${SUDO_GID}"
fi
chown -R -f $uid:$gid ${basedir}/git ${basedir}/out ${basedir}/mono-glue ${basedir}/godot*.tar.gz
echo "All builds completed. Check `out/logs/` to validate that they all succeeded (e.g. `tail -n 1 out/logs/*`)."

View File

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

View File

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

View File

@@ -12,10 +12,25 @@
# 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=''
@@ -37,19 +52,13 @@ export BUILD_NAME='custom_build'
# Default number of parallel cores for each build.
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.
# Path to pkcs12 archive.
export SIGN_KEYSTORE=''
# Password for the private key.
export SIGN_PASSWORD=''
# Name and URL of the signed application.
# Use your own when making a thirdparty build.
export SIGN_NAME=''
export SIGN_URL=''
export WINDOWS_SIGN_NAME=''
export WINDOWS_SIGN_URL=''
# Hostname or IP address of an OSX host (Needed for signing)
# eg 'user@10.1.0.10'
@@ -89,3 +98,6 @@ export GODOT_ANDROID_SIGN_KEYSTORE=''
export GODOT_ANDROID_KEYSTORE_ALIAS=''
# Password for the key used for signing the release build
export GODOT_ANDROID_SIGN_PASSWORD=''
# Google Cloud Service Account JSON key with access to Play Console upload permissions
# (View app information + Release apps to production and/or testing.)
export GODOT_ANDROID_UPLOAD_JSON_KEY=''

View File

@@ -2,21 +2,28 @@
set -e
# Log output to a file automatically.
exec > >(tee -a "out/logs/publish-release") 2>&1
# Config
# For signing keys, and path to godot-builds repo.
# For upload tools and signing/release keys.
source ./config.sh
godot_version=""
web_editor_latest=0
latest_stable=0
skip_stable=0
draft_arg=""
while getopts "h?v:l" opt; do
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 mark web editor as latest"
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
;;
@@ -24,7 +31,13 @@ while getopts "h?v:l" opt; do
godot_version=$OPTARG
;;
l)
web_editor_latest=1
latest_stable=1
;;
s)
skip_stable=1
;;
d)
draft_arg="-d"
;;
esac
done
@@ -34,6 +47,9 @@ if [ -z "${godot_version}" ]; then
exit 1
fi
basedir=$(pwd)
reldir=${basedir}/releases/${godot_version}
# Confirm
IFS=- read version status <<< "${godot_version}"
@@ -46,26 +62,109 @@ case "$choice" in
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}
${GODOT_BUILDS_PATH}/tools/upload-github.sh -v ${version} -f ${status} ${draft_arg}
# Web editor
# Stable release only
scp -P 22 -r web/${template_version} ${WEB_EDITOR_HOSTNAME}:/home/akien/web_editor/
sleep 2
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 [ $web_editor_latest == 1 ]; then
command="${command} -l"
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
ssh -P 22 ${WEB_EDITOR_HOSTNAME} "${command}"
# NuGet packages
@@ -82,6 +181,15 @@ 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 Editor
if [ -e "${GODOT_ANDROID_UPLOAD_JSON_KEY}" ]; then
echo "Publishing Android Editor to Play Store..."
sh build-android/upload-playstore.sh ${godot_version}
else
echo "Disabling Android Editor publishing as no valid Play Store JSON key was found."
fi
# Godot Android library
if [ -d "deps/keystore" ]; then
@@ -91,8 +199,40 @@ else
echo "Disabling Android library publishing as deps/keystore doesn't exist."
fi
# Stable release only
# Web editor
if [ "${status}" == "stable" ]; then
echo "NOTE: This script doesn't handle yet uploading stable releases to the main GitHub repository, Steam, EGS, and itch.io."
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."