mirror of
https://github.com/godotengine/godot-build-scripts.git
synced 2025-12-31 05:48:35 +03:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6def3039b1 | ||
|
|
6f0a10f6f9 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -3,7 +3,6 @@ config.sh
|
||||
*.jks
|
||||
*.pfx
|
||||
*.pkcs12
|
||||
/*.json
|
||||
|
||||
# Generated by build scripts
|
||||
angle/
|
||||
|
||||
@@ -4,21 +4,16 @@ set -e
|
||||
|
||||
# Config
|
||||
|
||||
# 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 SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
|
||||
export OPTIONS="production=yes"
|
||||
export OPTIONS_MONO="module_mono_enabled=yes"
|
||||
export TERM=xterm
|
||||
|
||||
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/
|
||||
}
|
||||
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.
|
||||
@@ -35,12 +30,10 @@ 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} separate_debug_symbols=yes # Generate native debug symbols.
|
||||
$SCONS platform=android arch=x86_64 $OPTIONS target=editor store_release=${store_release}
|
||||
|
||||
pushd platform/android/java
|
||||
# Generate the regular Android editor.
|
||||
@@ -52,44 +45,38 @@ if [ "${CLASSICAL}" == "1" ]; then
|
||||
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 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 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
|
||||
|
||||
# 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.
|
||||
# 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
|
||||
|
||||
$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
|
||||
@@ -108,7 +95,6 @@ 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
|
||||
@@ -116,8 +102,6 @@ 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
|
||||
|
||||
@@ -1,109 +0,0 @@
|
||||
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)
|
||||
@@ -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 publishAllPublicationToSonatypeRepository --max-workers 1 closeAndReleaseSonatypeStagingRepository"
|
||||
./gradlew publishTemplateReleasePublicationToSonatypeRepository --max-workers 1 closeAndReleaseSonatypeStagingRepository"
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
#!/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"
|
||||
@@ -4,18 +4,15 @@ set -e
|
||||
|
||||
# Config
|
||||
|
||||
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no redirect_build_objects=no"
|
||||
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
|
||||
# Keep LTO disabled for iOS - it works but it makes linking apps on deploy very slow,
|
||||
# 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="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-"
|
||||
export IOS_SDK="18.2"
|
||||
export IOS_LIPO="/root/ioscross/arm64/bin/arm-apple-darwin11-lipo"
|
||||
|
||||
rm -rf godot
|
||||
mkdir godot
|
||||
@@ -28,22 +25,30 @@ if [ "${CLASSICAL}" == "1" ]; then
|
||||
echo "Starting classical build for iOS..."
|
||||
|
||||
# arm64 device
|
||||
$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
|
||||
$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-"
|
||||
|
||||
# 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 target=template_debug $IOS_SIMULATOR $APPLE_TARGET_ARM64
|
||||
#$SCONS platform=ios $OPTIONS arch=arm64 target=template_release $IOS_SIMULATOR $APPLE_TARGET_ARM64
|
||||
#$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-"
|
||||
|
||||
# x86_64 simulator
|
||||
$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
|
||||
$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-"
|
||||
|
||||
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
|
||||
@@ -56,22 +61,31 @@ 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 target=template_debug $IOS_DEVICE $APPLE_TARGET_ARM64
|
||||
$SCONS platform=ios $OPTIONS $OPTIONS_MONO arch=arm64 target=template_release $IOS_DEVICE $APPLE_TARGET_ARM64
|
||||
$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-"
|
||||
|
||||
# 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 target=template_debug $IOS_SIMULATOR $APPLE_TARGET_ARM64
|
||||
#$SCONS platform=ios $OPTIONS $OPTIONS_MONO arch=arm64 target=template_release $IOS_SIMULATOR $APPLE_TARGET_ARM64
|
||||
#$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-"
|
||||
|
||||
# x86_64 simulator
|
||||
$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
|
||||
$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-"
|
||||
|
||||
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
|
||||
|
||||
@@ -4,8 +4,8 @@ set -e
|
||||
|
||||
# Config
|
||||
|
||||
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 SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
|
||||
export OPTIONS="production=yes"
|
||||
export OPTIONS_MONO="module_mono_enabled=yes"
|
||||
export TERM=xterm
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@ set -e
|
||||
|
||||
# Config
|
||||
|
||||
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 SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
|
||||
export OPTIONS="osxcross_sdk=darwin24.2 production=yes use_volk=no vulkan_sdk_path=/root/moltenvk angle_libs=/root/angle"
|
||||
export OPTIONS_MONO="module_mono_enabled=yes"
|
||||
export TERM=xterm
|
||||
|
||||
|
||||
@@ -12,17 +12,17 @@ exec > >(tee -a "out/logs/build-release") 2>&1
|
||||
source ./config.sh
|
||||
|
||||
can_sign_windows=0
|
||||
if [ ! -z "${WINDOWS_SIGN_NAME}" ] && [ ! -z "${WINDOWS_SIGN_URL}" ] && [[ $(type -P "osslsigncode") ]]; then
|
||||
if [ ! -z "${SIGN_KEYSTORE}" ] && [ ! -z "${SIGN_PASSWORD}" ] && [[ $(type -P "osslsigncode") ]]; then
|
||||
can_sign_windows=1
|
||||
else
|
||||
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."
|
||||
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."
|
||||
fi
|
||||
|
||||
sign_windows() {
|
||||
if [ $can_sign_windows == 0 ]; then
|
||||
return
|
||||
fi
|
||||
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
|
||||
osslsigncode sign -pkcs12 ${SIGN_KEYSTORE} -pass "${SIGN_PASSWORD}" -n "${SIGN_NAME}" -i "${SIGN_URL}" -t http://timestamp.comodoca.com -in $1 -out $1-signed
|
||||
mv $1-signed $1
|
||||
}
|
||||
|
||||
@@ -362,10 +362,6 @@ 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
|
||||
@@ -381,17 +377,6 @@ 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
|
||||
@@ -560,17 +545,6 @@ 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
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
#!/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"
|
||||
@@ -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 redirect_build_objects=no"
|
||||
export SCONS="scons -j$(expr ${NUM_CORES} / ${NUM_JOBS}) verbose=yes warnings=no progress=no"
|
||||
export OPTIONS="production=yes"
|
||||
export OPTIONS_MONO="module_mono_enabled=yes -j${NUM_CORES}"
|
||||
export TERM=xterm
|
||||
|
||||
@@ -4,8 +4,8 @@ set -e
|
||||
|
||||
# Config
|
||||
|
||||
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 SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
|
||||
export OPTIONS="production=yes use_mingw=yes angle_libs=/root/angle mesa_libs=/root/mesa d3d12=yes"
|
||||
export OPTIONS_MONO="module_mono_enabled=yes"
|
||||
export OPTIONS_LLVM="use_llvm=yes mingw_prefix=/root/llvm-mingw"
|
||||
export TERM=xterm
|
||||
|
||||
28
build.sh
28
build.sh
@@ -133,7 +133,7 @@ if [ $skip_download == 0 ]; then
|
||||
if [ ! -z "${logged_in}" ]; then
|
||||
echo "Fetching private images"
|
||||
|
||||
for image in macosx android appleembedded; do
|
||||
for image in macosx android ios; 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"
|
||||
@@ -156,23 +156,12 @@ 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%2F7219/godot-angle-static
|
||||
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
|
||||
@@ -254,25 +243,22 @@ 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 -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
|
||||
${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 -v ${basedir}/deps/accesskit:/root/accesskit localhost/godot-linux:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/linux
|
||||
${podman_run} -v ${basedir}/build-linux:/root/build -v ${basedir}/out/linux:/root/out localhost/godot-linux:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/linux
|
||||
|
||||
mkdir -p ${basedir}/out/web
|
||||
${podman_run} -v ${basedir}/build-web:/root/build -v ${basedir}/out/web:/root/out localhost/godot-web:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/web
|
||||
|
||||
mkdir -p ${basedir}/out/macos
|
||||
${podman_run} -v ${basedir}/build-macos:/root/build -v ${basedir}/out/macos:/root/out -v ${basedir}/deps/accesskit:/root/accesskit -v ${basedir}/deps/moltenvk:/root/moltenvk -v ${basedir}/deps/angle:/root/angle localhost/godot-osx:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/macos
|
||||
${podman_run} -v ${basedir}/build-macos:/root/build -v ${basedir}/out/macos:/root/out -v ${basedir}/deps/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-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
|
||||
${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)
|
||||
@@ -281,5 +267,3 @@ 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/*`)."
|
||||
|
||||
15
config.sh.in
15
config.sh.in
@@ -52,13 +52,19 @@ export BUILD_NAME='custom_build'
|
||||
# Default number of parallel cores for each build.
|
||||
export NUM_CORES=16
|
||||
|
||||
# Set up your own Windows signing details below.
|
||||
# Set up your own signing keystore and relevant 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 WINDOWS_SIGN_NAME=''
|
||||
export WINDOWS_SIGN_URL=''
|
||||
export SIGN_NAME=''
|
||||
export SIGN_URL=''
|
||||
|
||||
# Hostname or IP address of an OSX host (Needed for signing)
|
||||
# eg 'user@10.1.0.10'
|
||||
@@ -98,6 +104,3 @@ 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=''
|
||||
|
||||
@@ -181,15 +181,6 @@ 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
|
||||
|
||||
Reference in New Issue
Block a user