mirror of
https://github.com/godotengine/godot-build-scripts.git
synced 2025-12-31 05:48:35 +03:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5bf3bab772 | ||
|
|
d381d33b8e | ||
|
|
dea7aa483e | ||
|
|
9da8d72dfe | ||
|
|
4e25acea96 |
9
.gitignore
vendored
9
.gitignore
vendored
@@ -1,9 +1,6 @@
|
||||
# User-specific configuration and signing keys
|
||||
# User-specific configuration and signing key
|
||||
config.sh
|
||||
*.jks
|
||||
*.pfx
|
||||
*.pkcs12
|
||||
/*.json
|
||||
|
||||
# Generated by build scripts
|
||||
angle/
|
||||
@@ -17,9 +14,5 @@ angle.7z
|
||||
out/
|
||||
releases/
|
||||
sha512sums/
|
||||
steam/
|
||||
tmp/
|
||||
web/
|
||||
|
||||
# macOS
|
||||
.DS_Store
|
||||
|
||||
@@ -4,112 +4,44 @@ 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 OPTIONS_MONO="module_mono_enabled=yes"
|
||||
export OPTIONS_DOTNET="module_dotnet_enabled=yes"
|
||||
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
|
||||
export OPTIONS="production=yes"
|
||||
export OPTIONS_MONO="module_mono_enabled=yes mono_static=no"
|
||||
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/
|
||||
}
|
||||
${ANDROID_SDK_ROOT}/cmdline-tools/bin/sdkmanager --sdk_root="${ANDROID_SDK_ROOT}" 'platforms;android-30'
|
||||
|
||||
# Environment variables and keystore needed for signing store editor build,
|
||||
# as well as signing and publishing to MavenCentral.
|
||||
source /root/keystore/config.sh
|
||||
|
||||
store_release="yes"
|
||||
if [ -z "${GODOT_ANDROID_SIGN_KEYSTORE}" ]; then
|
||||
echo "No keystore provided to sign the Android release editor build, using debug build instead."
|
||||
store_release="no"
|
||||
fi
|
||||
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 Android..."
|
||||
|
||||
prepare_source
|
||||
$SCONS platform=android android_arch=armv7 $OPTIONS tools=no target=release_debug
|
||||
$SCONS platform=android android_arch=armv7 $OPTIONS tools=no target=release
|
||||
|
||||
$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 android_arch=arm64v8 $OPTIONS tools=no target=release_debug
|
||||
$SCONS platform=android android_arch=arm64v8 $OPTIONS tools=no target=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
|
||||
$SCONS platform=android android_arch=x86 $OPTIONS tools=no target=release_debug
|
||||
$SCONS platform=android android_arch=x86 $OPTIONS tools=no target=release
|
||||
|
||||
mkdir -p /root/out/tools
|
||||
|
||||
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.
|
||||
|
||||
$SCONS platform=android arch=arm32 $OPTIONS target=template_debug
|
||||
$SCONS platform=android arch=arm64 $OPTIONS target=template_debug
|
||||
$SCONS platform=android arch=x86_32 $OPTIONS target=template_debug
|
||||
$SCONS platform=android arch=x86_64 $OPTIONS target=template_debug
|
||||
$SCONS platform=android android_arch=x86_64 $OPTIONS tools=no target=release_debug
|
||||
$SCONS platform=android android_arch=x86_64 $OPTIONS tools=no target=release
|
||||
|
||||
pushd platform/android/java
|
||||
./gradlew generateGodotTemplates
|
||||
|
||||
if [ "$store_release" == "yes" ]; then
|
||||
# Copy source folder with compiled libs so we can optionally use it
|
||||
# in a separate script to upload the templates to MavenCentral.
|
||||
cp -r /root/godot /root/out/source/
|
||||
# Backup ~/.gradle too so we can reuse all the downloaded stuff.
|
||||
cp -r /root/.gradle /root/out/source/.gradle
|
||||
fi
|
||||
popd
|
||||
|
||||
mkdir -p /root/out/templates
|
||||
cp bin/android_source.zip /root/out/templates/
|
||||
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
|
||||
cp bin/android_source.zip /root/out/templates
|
||||
cp bin/android_debug.apk /root/out/templates/android_debug.apk
|
||||
cp bin/android_release.apk /root/out/templates/android_release.apk
|
||||
cp bin/godot-lib.release.aar /root/out/templates/godot-lib.release.aar
|
||||
fi
|
||||
|
||||
# Mono
|
||||
@@ -117,61 +49,34 @@ fi
|
||||
if [ "${MONO}" == "1" ]; then
|
||||
echo "Starting Mono build for Android..."
|
||||
|
||||
prepare_source
|
||||
|
||||
cp /root/mono-glue/*.cpp modules/mono/glue/
|
||||
cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/
|
||||
cp -r /root/mono-glue/GodotSharp/GodotSharpEditor/Generated modules/mono/glue/GodotSharp/GodotSharpEditor/
|
||||
|
||||
$SCONS platform=android arch=arm32 $OPTIONS $OPTIONS_MONO target=template_debug
|
||||
$SCONS platform=android arch=arm32 $OPTIONS $OPTIONS_MONO target=template_release
|
||||
$SCONS platform=android android_arch=armv7 $OPTIONS $OPTIONS_MONO mono_prefix=/root/mono-installs/android-armeabi-v7a-release tools=no target=release_debug
|
||||
$SCONS platform=android android_arch=armv7 $OPTIONS $OPTIONS_MONO mono_prefix=/root/mono-installs/android-armeabi-v7a-release tools=no target=release
|
||||
|
||||
$SCONS platform=android arch=arm64 $OPTIONS $OPTIONS_MONO target=template_debug
|
||||
$SCONS platform=android arch=arm64 $OPTIONS $OPTIONS_MONO target=template_release
|
||||
$SCONS platform=android android_arch=arm64v8 $OPTIONS $OPTIONS_MONO mono_prefix=/root/mono-installs/android-arm64-v8a-release tools=no target=release_debug
|
||||
$SCONS platform=android android_arch=arm64v8 $OPTIONS $OPTIONS_MONO mono_prefix=/root/mono-installs/android-arm64-v8a-release tools=no target=release
|
||||
|
||||
$SCONS platform=android arch=x86_32 $OPTIONS $OPTIONS_MONO target=template_debug
|
||||
$SCONS platform=android arch=x86_32 $OPTIONS $OPTIONS_MONO target=template_release
|
||||
$SCONS platform=android android_arch=x86 $OPTIONS $OPTIONS_MONO mono_prefix=/root/mono-installs/android-x86-release tools=no target=release_debug
|
||||
$SCONS platform=android android_arch=x86 $OPTIONS $OPTIONS_MONO mono_prefix=/root/mono-installs/android-x86-release tools=no target=release
|
||||
|
||||
$SCONS platform=android arch=x86_64 $OPTIONS $OPTIONS_MONO target=template_debug
|
||||
$SCONS platform=android arch=x86_64 $OPTIONS $OPTIONS_MONO target=template_release
|
||||
$SCONS platform=android android_arch=x86_64 $OPTIONS $OPTIONS_MONO mono_prefix=/root/mono-installs/android-x86_64-release tools=no target=release_debug
|
||||
$SCONS platform=android android_arch=x86_64 $OPTIONS $OPTIONS_MONO mono_prefix=/root/mono-installs/android-x86_64-release tools=no target=release
|
||||
|
||||
pushd platform/android/java
|
||||
./gradlew generateGodotMonoTemplates
|
||||
./gradlew generateGodotTemplates
|
||||
popd
|
||||
|
||||
mkdir -p /root/out/templates-mono
|
||||
cp bin/android_source.zip /root/out/templates-mono/
|
||||
cp bin/android_monoDebug.apk /root/out/templates-mono/android_debug.apk
|
||||
cp bin/android_monoRelease.apk /root/out/templates-mono/android_release.apk
|
||||
cp bin/godot-lib.template_release.aar /root/out/templates-mono/
|
||||
fi
|
||||
cp bin/android_source.zip /root/out/templates-mono
|
||||
cp bin/android_debug.apk /root/out/templates-mono/android_debug.apk
|
||||
cp bin/android_release.apk /root/out/templates-mono/android_release.apk
|
||||
cp bin/godot-lib.release.aar /root/out/templates-mono/godot-lib.release.aar
|
||||
|
||||
# .NET
|
||||
|
||||
if [ "${DOTNET}" == "1" ]; then
|
||||
echo "Starting .NET build for Android..."
|
||||
|
||||
prepare_source
|
||||
|
||||
$SCONS platform=android arch=arm32 $OPTIONS $OPTIONS_DOTNET target=template_debug
|
||||
$SCONS platform=android arch=arm32 $OPTIONS $OPTIONS_DOTNET target=template_release
|
||||
|
||||
$SCONS platform=android arch=arm64 $OPTIONS $OPTIONS_DOTNET target=template_debug
|
||||
$SCONS platform=android arch=arm64 $OPTIONS $OPTIONS_DOTNET target=template_release
|
||||
|
||||
$SCONS platform=android arch=x86_32 $OPTIONS $OPTIONS_DOTNET target=template_debug
|
||||
$SCONS platform=android arch=x86_32 $OPTIONS $OPTIONS_DOTNET target=template_release
|
||||
|
||||
$SCONS platform=android arch=x86_64 $OPTIONS $OPTIONS_DOTNET target=template_debug
|
||||
$SCONS platform=android arch=x86_64 $OPTIONS $OPTIONS_DOTNET target=template_release
|
||||
|
||||
pushd platform/android/java
|
||||
./gradlew generateGodotMonoTemplates
|
||||
popd
|
||||
|
||||
mkdir -p /root/out/templates-dotnet
|
||||
cp bin/android_source.zip /root/out/templates-dotnet/
|
||||
cp bin/android_monoDebug.apk /root/out/templates-dotnet/android_debug.apk
|
||||
cp bin/android_monoRelease.apk /root/out/templates-dotnet/android_release.apk
|
||||
cp bin/godot-lib.template_release.aar /root/out/templates-dotnet/
|
||||
mkdir -p /root/out/templates-mono/bcl
|
||||
cp -r /root/mono-installs/android-bcl/* /root/out/templates-mono/bcl/
|
||||
fi
|
||||
|
||||
echo "Android build successful"
|
||||
|
||||
@@ -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)
|
||||
@@ -1,55 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$#" -ne 2 ]; then
|
||||
echo "Usage: $0 <version-name> <latest-stable>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
VERSION_NAME="$1"
|
||||
LATEST_STABLE="$2"
|
||||
|
||||
BASEDIR="$(pwd)"
|
||||
|
||||
source ${BASEDIR}/config.sh
|
||||
|
||||
TMPDIR=$(mktemp -d)
|
||||
cleanup() {
|
||||
rm -rf "$TMPDIR"
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
OVR_PLATFORM_UTIL_DOWNLOAD_URL="https://www.oculus.com/download_app/?id=5159709737372459"
|
||||
OVR_PLATFORM_UTIL="$TMPDIR/ovr-platform-util"
|
||||
|
||||
APK_FILE="${BASEDIR}/out/android/tools/android_editor_horizonos.apk"
|
||||
NDS_FILE="${BASEDIR}/out/android/tools/android_editor_native_debug_symbols.zip"
|
||||
NDS_OUTPUT_DIR="$TMPDIR/nds"
|
||||
|
||||
STATUS=$(echo "$VERSION_NAME" | sed -e 's/^.*-\([a-z][a-z]*\)[0-9]*$/\1/')
|
||||
if [ "$STATUS" = "stable" -a "$LATEST_STABLE" = "1" ]; then
|
||||
HORIZON_STORE_CHANNEL="LIVE"
|
||||
elif [ "$STATUS" = "dev" ]; then
|
||||
HORIZON_STORE_CHANNEL="ALPHA"
|
||||
elif [ "$STATUS" = "beta" ]; then
|
||||
HORIZON_STORE_CHANNEL="BETA"
|
||||
elif [ "$STATUS" = "rc" ]; then
|
||||
HORIZON_STORE_CHANNEL="RC"
|
||||
else
|
||||
echo "Unable to determine Horizon store channel from version status: $STATUS" >/dev/stderr
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir -p "$NDS_OUTPUT_DIR"
|
||||
(cd "$NDS_OUTPUT_DIR" && unzip "$NDS_FILE")
|
||||
|
||||
echo "Downloading ovr-platform-util..."
|
||||
if ! curl -fL -o "$OVR_PLATFORM_UTIL" "$OVR_PLATFORM_UTIL_DOWNLOAD_URL"; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
chmod +x "$OVR_PLATFORM_UTIL"
|
||||
|
||||
echo "Uploading $VERSION_NAME to Horizon store on channel $HORIZON_STORE_CHANNEL..."
|
||||
if ! $OVR_PLATFORM_UTIL upload-quest-build --app-id "$GODOT_ANDROID_HORIZON_APP_ID" --app-secret "$GODOT_ANDROID_HORIZON_APP_SECRET" --apk "$APK_FILE" --channel "$HORIZON_STORE_CHANNEL" --debug-symbols-dir "$NDS_OUTPUT_DIR/arm64-v8a/" --debug-symbols-pattern '*.so'; then
|
||||
exit 1
|
||||
fi
|
||||
@@ -1,18 +0,0 @@
|
||||
#/bin/bash
|
||||
|
||||
basedir="$(pwd)"
|
||||
|
||||
if [ ! -d "${basedir}/deps/keystore" ]; then
|
||||
echo "Couldn't find ${basedir}/deps/keystore. Make sure to run this from the root folder of the Git repository."
|
||||
fi
|
||||
|
||||
source ${basedir}/deps/keystore/config.sh
|
||||
|
||||
# Release the Godot Android library to MavenCentral
|
||||
${PODMAN} run -it --rm \
|
||||
-v ${basedir}/out/android/source:/root/godot -v ${basedir}/deps/keystore:/root/keystore \
|
||||
localhost/godot-android:${IMAGE_VERSION} bash -c \
|
||||
"source /root/keystore/config.sh && \
|
||||
cp -r /root/godot/.gradle /root && \
|
||||
cd /root/godot/platform/android/java && \
|
||||
./gradlew publishAllPublicationToSonatypeRepository --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"
|
||||
@@ -1,71 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if [ "${DOTNET}" != "1" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
dnf install -y clang python-unversioned-command
|
||||
|
||||
git clone https://github.com/raulsntos/godot-dotnet
|
||||
cd godot-dotnet
|
||||
git checkout upgrade-assistant-plus-source-code-plugin-wip
|
||||
|
||||
echo "Building and generating .NET extension..."
|
||||
|
||||
# TODO: Get rid of this when we fix all these trimming warnings in godot-dotnet.
|
||||
cat << EOF >> .editorconfig
|
||||
# Disable trimming warnings because it spams the output too much.
|
||||
dotnet_diagnostics.IL2111.severity = none
|
||||
EOF
|
||||
|
||||
prerelease_label="${GODOT_VERSION#*-}"
|
||||
version_prefix="${GODOT_VERSION%-*}"
|
||||
|
||||
if [[ "${prerelease_label}" == "${GODOT_VERSION}" ]]; then
|
||||
prerelease_label=""
|
||||
fi
|
||||
|
||||
# TODO: Ensure we don't accidentally make stable releases. We can remove this when we're ready for a stable release.
|
||||
if [[ -z "$prerelease_label" ]]; then
|
||||
echo "YOU ARE NOT SUPPOSED TO MAKE A STABLE RELEASE WITH THIS"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
version_component_count=$(grep -o "\." <<< "$version_prefix" | wc -l)
|
||||
|
||||
if [ "$version_component_count" -eq 0 ]; then
|
||||
version_prefix="${version_prefix}.0.0"
|
||||
elif [ "$version_component_count" -eq 1 ]; then
|
||||
version_prefix="${version_prefix}.0"
|
||||
fi
|
||||
|
||||
if [[ -n "$prerelease_label" ]]; then
|
||||
if [[ "$prerelease_label" =~ ^dev ]]; then
|
||||
prerelease_label="${prerelease_label/dev/alpha}"
|
||||
fi
|
||||
|
||||
prerelease_label=$(echo "$prerelease_label" | sed -E 's/([^0-9])([0-9])/\1.\2/g')
|
||||
fi
|
||||
|
||||
echo "Building Godot .NET version ${version_prefix} (prerelease: '${prerelease_label}')"
|
||||
|
||||
dotnet --info
|
||||
|
||||
build_id="$(date +%Y%m%d).1"
|
||||
final_version_kind="release"
|
||||
if [[ -n "$prerelease_label" ]]; then
|
||||
final_version_kind="prerelease"
|
||||
fi
|
||||
|
||||
./build.sh --productBuild --ci --warnAsError false \
|
||||
/p:GenerateGodotBindings=true \
|
||||
/p:VersionPrefix=${version_prefix} \
|
||||
/p:OfficialBuildId=${build_id} \
|
||||
/p:FinalVersionKind=${final_version_kind} \
|
||||
/p:PreReleaseVersionLabel=${prerelease_label}
|
||||
|
||||
cp -r artifacts/packages/Release/Shipping/* /root/out/
|
||||
|
||||
echo ".NET bindings generated successfully"
|
||||
@@ -4,19 +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 SWIFT_FRONTEND=/root/.local/share/swiftly/toolchains/6.2.1/usr/bin/swift-frontend"
|
||||
export OPTIONS_MONO="module_mono_enabled=yes"
|
||||
export OPTIONS_DOTNET="module_dotnet_enabled=yes"
|
||||
export OPTIONS="production=yes use_lto=no"
|
||||
export OPTIONS_MONO="module_mono_enabled=yes mono_static=yes"
|
||||
export TERM=xterm
|
||||
|
||||
export IOS_SDK="26.1"
|
||||
export IOS_DEVICE="IOS_SDK_PATH=/root/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS${IOS_SDK}.sdk"
|
||||
export IOS_SIMULATOR="IOS_SDK_PATH=/root/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/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="14.4"
|
||||
export IOS_LIPO="/root/ioscross/arm64/bin/arm-apple-darwin11-lipo"
|
||||
|
||||
rm -rf godot
|
||||
mkdir godot
|
||||
@@ -28,25 +24,19 @@ tar xf /root/godot.tar.gz --strip-components=1
|
||||
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=iphone $OPTIONS arch=arm64 tools=no target=release_debug \
|
||||
IPHONESDK="/root/ioscross/arm64/SDK/iPhoneOS${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/arm64/" ios_triple="arm-apple-darwin11-"
|
||||
$SCONS platform=iphone $OPTIONS arch=arm64 tools=no target=release \
|
||||
IPHONESDK="/root/ioscross/arm64/SDK/iPhoneOS${IOS_SDK}.sdk" IPHONEPATH="/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
|
||||
|
||||
# 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=iphone $OPTIONS arch=x86_64 tools=no target=release_debug \
|
||||
IPHONESDK="/root/ioscross/x86_64/SDK/iPhoneOS${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/x86_64/" ios_triple="x86_64-apple-darwin11-"
|
||||
$SCONS platform=iphone $OPTIONS arch=x86_64 tools=no target=release \
|
||||
IPHONESDK="/root/ioscross/x86_64/SDK/iPhoneOS${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/x86_64/" 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
|
||||
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
|
||||
$IOS_LIPO -create bin/libgodot.iphone.opt.arm64.a bin/libgodot.iphone.opt.x86_64.a -output /root/out/templates/libgodot.iphone.opt.fat
|
||||
$IOS_LIPO -create bin/libgodot.iphone.opt.debug.arm64.a bin/libgodot.iphone.opt.debug.x86_64.a -output /root/out/templates/libgodot.iphone.opt.debug.fat
|
||||
fi
|
||||
|
||||
# Mono
|
||||
@@ -54,53 +44,36 @@ fi
|
||||
if [ "${MONO}" == "1" ]; then
|
||||
echo "Starting Mono build for iOS..."
|
||||
|
||||
cp /root/mono-glue/*.cpp modules/mono/glue/
|
||||
cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/
|
||||
cp -r /root/mono-glue/GodotSharp/GodotSharpEditor/Generated modules/mono/glue/GodotSharp/GodotSharpEditor/
|
||||
|
||||
# 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=iphone $OPTIONS $OPTIONS_MONO arch=arm64 mono_prefix=/root/mono-installs/ios-arm64-release tools=no target=release_debug \
|
||||
IPHONESDK="/root/ioscross/arm64/SDK/iPhoneOS${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/arm64/" ios_triple="arm-apple-darwin11-"
|
||||
$SCONS platform=iphone $OPTIONS $OPTIONS_MONO arch=arm64 mono_prefix=/root/mono-installs/ios-arm64-release tools=no target=release \
|
||||
IPHONESDK="/root/ioscross/arm64/SDK/iPhoneOS${IOS_SDK}.sdk" IPHONEPATH="/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
|
||||
|
||||
# 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=iphone $OPTIONS $OPTIONS_MONO arch=x86_64 mono_prefix=/root/mono-installs/ios-x86_64-release tools=no target=release_debug \
|
||||
IPHONESDK="/root/ioscross/x86_64/SDK/iPhoneOS${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/x86_64/" ios_triple="x86_64-apple-darwin11-"
|
||||
$SCONS platform=iphone $OPTIONS $OPTIONS_MONO arch=x86_64 mono_prefix=/root/mono-installs/ios-x86_64-release tools=no target=release \
|
||||
IPHONESDK="/root/ioscross/x86_64/SDK/iPhoneOS${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/x86_64/" 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
|
||||
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
|
||||
$IOS_LIPO -create bin/libgodot.iphone.opt.arm64.a bin/libgodot.iphone.opt.x86_64.a -output /root/out/templates-mono/libgodot.iphone.opt.fat
|
||||
$IOS_LIPO -create bin/libgodot.iphone.opt.debug.arm64.a bin/libgodot.iphone.opt.debug.x86_64.a -output /root/out/templates-mono/libgodot.iphone.opt.debug.fat
|
||||
|
||||
# .NET
|
||||
mkdir -p /root/out/templates-mono/iphone-mono-libs
|
||||
$IOS_LIPO -create bin/libmonosgen-2.0.iphone.arm64.a bin/libmonosgen-2.0.iphone.x86_64.a -output /root/out/templates-mono/iphone-mono-libs/libmonosgen-2.0.iphone.fat.a
|
||||
$IOS_LIPO -create bin/libmono-native.iphone.arm64.a bin/libmono-native.iphone.x86_64.a -output /root/out/templates-mono/iphone-mono-libs/libmono-native.iphone.fat.a
|
||||
$IOS_LIPO -create bin/libmono-profiler-log.iphone.arm64.a bin/libmono-profiler-log.iphone.x86_64.a -output /root/out/templates-mono/iphone-mono-libs/libmono-profiler-log.iphone.fat.a
|
||||
|
||||
if [ "${DOTNET}" == "1" ]; then
|
||||
echo "Starting .NET build for iOS..."
|
||||
# The Mono libraries for the interpreter are not available for simulator builds
|
||||
$IOS_LIPO -create bin/libmono-ee-interp.iphone.arm64.a -output /root/out/templates-mono/iphone-mono-libs/libmono-ee-interp.iphone.fat.a
|
||||
$IOS_LIPO -create bin/libmono-icall-table.iphone.arm64.a -output /root/out/templates-mono/iphone-mono-libs/libmono-icall-table.iphone.fat.a
|
||||
$IOS_LIPO -create bin/libmono-ilgen.iphone.arm64.a -output /root/out/templates-mono/iphone-mono-libs/libmono-ilgen.iphone.fat.a
|
||||
|
||||
# arm64 device
|
||||
$SCONS platform=ios $OPTIONS $OPTIONS_DOTNET arch=arm64 target=template_debug $IOS_DEVICE $APPLE_TARGET_ARM64
|
||||
$SCONS platform=ios $OPTIONS $OPTIONS_DOTNET 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_DOTNET arch=arm64 target=template_debug $IOS_SIMULATOR $APPLE_TARGET_ARM64
|
||||
#$SCONS platform=ios $OPTIONS $OPTIONS_DOTNET arch=arm64 target=template_release $IOS_SIMULATOR $APPLE_TARGET_ARM64
|
||||
|
||||
# x86_64 simulator
|
||||
$SCONS platform=ios $OPTIONS $OPTIONS_DOTNET arch=x86_64 target=template_debug $IOS_SIMULATOR $APPLE_TARGET_X86_64
|
||||
$SCONS platform=ios $OPTIONS $OPTIONS_DOTNET arch=x86_64 target=template_release $IOS_SIMULATOR $APPLE_TARGET_X86_64
|
||||
|
||||
mkdir -p /root/out/templates-dotnet
|
||||
cp bin/libgodot.ios.template_release.arm64.a /root/out/templates-dotnet/libgodot.ios.a
|
||||
cp bin/libgodot.ios.template_debug.arm64.a /root/out/templates-dotnet/libgodot.ios.debug.a
|
||||
cp bin/libgodot.ios.template_release.x86_64.simulator.a /root/out/templates-dotnet/libgodot.ios.simulator.a
|
||||
cp bin/libgodot.ios.template_debug.x86_64.simulator.a /root/out/templates-dotnet/libgodot.ios.debug.simulator.a
|
||||
mkdir -p /root/out/templates-mono/bcl
|
||||
cp -r /root/mono-installs/ios-bcl/* /root/out/templates-mono/bcl
|
||||
fi
|
||||
|
||||
echo "iOS build successful"
|
||||
|
||||
67
build-javascript/build.sh
Executable file
67
build-javascript/build.sh
Executable file
@@ -0,0 +1,67 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Config
|
||||
|
||||
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
|
||||
export OPTIONS="production=yes"
|
||||
export OPTIONS_MONO="module_mono_enabled=yes mono_static=yes mono_prefix=/root/mono-installs/wasm-runtime-release use_lto=no"
|
||||
export TERM=xterm
|
||||
|
||||
rm -rf godot
|
||||
mkdir godot
|
||||
cd godot
|
||||
tar xf /root/godot.tar.gz --strip-components=1
|
||||
|
||||
# Classical
|
||||
|
||||
if [ "${CLASSICAL}" == "1" ]; then
|
||||
echo "Starting classical build for JavaScript..."
|
||||
|
||||
source /root/emsdk_${EMSCRIPTEN_CLASSICAL}/emsdk_env.sh
|
||||
|
||||
$SCONS platform=javascript ${OPTIONS} target=release_debug tools=no
|
||||
$SCONS platform=javascript ${OPTIONS} target=release tools=no
|
||||
|
||||
$SCONS platform=javascript ${OPTIONS} target=release_debug tools=no threads_enabled=yes
|
||||
$SCONS platform=javascript ${OPTIONS} target=release tools=no threads_enabled=yes
|
||||
|
||||
$SCONS platform=javascript ${OPTIONS} target=release_debug tools=no gdnative_enabled=yes
|
||||
$SCONS platform=javascript ${OPTIONS} target=release tools=no gdnative_enabled=yes
|
||||
|
||||
mkdir -p /root/out/templates
|
||||
cp -rvp bin/*.zip /root/out/templates
|
||||
rm -f bin/*.zip
|
||||
|
||||
$SCONS platform=javascript ${OPTIONS} target=release_debug tools=yes threads_enabled=yes use_closure_compiler=yes
|
||||
|
||||
mkdir -p /root/out/tools
|
||||
cp -rvp bin/*.zip /root/out/tools
|
||||
rm -f bin/*.zip
|
||||
|
||||
fi
|
||||
|
||||
# Mono
|
||||
|
||||
if [ "${MONO}" == "1" ]; then
|
||||
echo "Starting Mono build for JavaScript..."
|
||||
|
||||
source /root/emsdk_${EMSCRIPTEN_MONO}/emsdk_env.sh
|
||||
|
||||
cp /root/mono-glue/*.cpp modules/mono/glue/
|
||||
cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/
|
||||
cp -r /root/mono-glue/GodotSharp/GodotSharpEditor/Generated modules/mono/glue/GodotSharp/GodotSharpEditor/
|
||||
|
||||
$SCONS platform=javascript ${OPTIONS} ${OPTIONS_MONO} target=release_debug tools=no
|
||||
$SCONS platform=javascript ${OPTIONS} ${OPTIONS_MONO} target=release tools=no
|
||||
|
||||
mkdir -p /root/out/templates-mono
|
||||
cp -rvp bin/*.zip /root/out/templates-mono
|
||||
rm -f bin/*.zip
|
||||
|
||||
mkdir -p /root/out/templates-mono/bcl
|
||||
cp -r /root/mono-installs/wasm-bcl/wasm /root/out/templates-mono/bcl/
|
||||
fi
|
||||
|
||||
echo "JavaScript build successful"
|
||||
@@ -4,12 +4,19 @@ 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 OPTIONS_MONO="module_mono_enabled=yes"
|
||||
export OPTIONS_DOTNET="module_dotnet_enabled=yes"
|
||||
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
|
||||
export OPTIONS="production=yes"
|
||||
export OPTIONS_MONO="module_mono_enabled=yes mono_static=yes"
|
||||
export TERM=xterm
|
||||
|
||||
# For i386 we're still using an old GCC 5 version from Ubuntu 16.04 as
|
||||
# upgrading the compiler seems to introduce weird issues.
|
||||
# Since that GCC version is fairly old, let's avoid LTO which wasn't so
|
||||
# mature at the time.
|
||||
if [ "$(getconf LONG_BIT)" == "32" ]; then
|
||||
export OPTIONS="$OPTIONS use_lto=no"
|
||||
fi
|
||||
|
||||
rm -rf godot
|
||||
mkdir godot
|
||||
cd godot
|
||||
@@ -20,56 +27,15 @@ tar xf /root/godot.tar.gz --strip-components=1
|
||||
if [ "${CLASSICAL}" == "1" ]; then
|
||||
echo "Starting classical build for Linux..."
|
||||
|
||||
export PATH="${GODOT_SDK_LINUX_X86_64}/bin:${BASE_PATH}"
|
||||
|
||||
$SCONS platform=linuxbsd arch=x86_64 $OPTIONS target=editor
|
||||
mkdir -p /root/out/x86_64/tools
|
||||
cp -rvp bin/* /root/out/x86_64/tools
|
||||
$SCONS platform=x11 $OPTIONS tools=yes target=release_debug
|
||||
mkdir -p /root/out/tools
|
||||
cp -rvp bin/* /root/out/tools
|
||||
rm -rf bin
|
||||
|
||||
$SCONS platform=linuxbsd arch=x86_64 $OPTIONS target=template_debug
|
||||
$SCONS platform=linuxbsd arch=x86_64 $OPTIONS target=template_release
|
||||
mkdir -p /root/out/x86_64/templates
|
||||
cp -rvp bin/* /root/out/x86_64/templates
|
||||
rm -rf bin
|
||||
|
||||
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
|
||||
cp -rvp bin/* /root/out/x86_32/tools
|
||||
rm -rf bin
|
||||
|
||||
$SCONS platform=linuxbsd arch=x86_32 $OPTIONS target=template_debug
|
||||
$SCONS platform=linuxbsd arch=x86_32 $OPTIONS target=template_release
|
||||
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
|
||||
$SCONS platform=x11 $OPTIONS tools=no target=release_debug
|
||||
$SCONS platform=x11 $OPTIONS tools=no target=release
|
||||
mkdir -p /root/out/templates
|
||||
cp -rvp bin/* /root/out/templates
|
||||
rm -rf bin
|
||||
fi
|
||||
|
||||
@@ -78,121 +44,24 @@ fi
|
||||
if [ "${MONO}" == "1" ]; then
|
||||
echo "Starting Mono build for Linux..."
|
||||
|
||||
cp /root/mono-glue/*.cpp modules/mono/glue/
|
||||
cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/
|
||||
cp -r /root/mono-glue/GodotSharp/GodotSharpEditor/Generated modules/mono/glue/GodotSharp/GodotSharpEditor/
|
||||
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/pkgconfig/
|
||||
|
||||
export PATH="${GODOT_SDK_LINUX_X86_64}/bin:${BASE_PATH}"
|
||||
# Workaround for MSBuild segfault on Ubuntu containers, we build the CIL on Fedora and copy here.
|
||||
mkdir -p bin
|
||||
cp -r /root/mono-glue/cil/GodotSharp bin/
|
||||
|
||||
$SCONS platform=linuxbsd arch=x86_64 $OPTIONS $OPTIONS_MONO target=editor
|
||||
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=linuxbsd
|
||||
mkdir -p /root/out/x86_64/tools-mono
|
||||
cp -rvp bin/* /root/out/x86_64/tools-mono
|
||||
$SCONS platform=x11 $OPTIONS $OPTIONS_MONO tools=yes target=release_debug copy_mono_root=yes build_cil=no
|
||||
mkdir -p /root/out/tools-mono
|
||||
cp -rvp bin/* /root/out/tools-mono
|
||||
rm -rf bin
|
||||
|
||||
$SCONS platform=linuxbsd arch=x86_64 $OPTIONS $OPTIONS_MONO target=template_debug
|
||||
$SCONS platform=linuxbsd arch=x86_64 $OPTIONS $OPTIONS_MONO target=template_release
|
||||
mkdir -p /root/out/x86_64/templates-mono
|
||||
cp -rvp bin/* /root/out/x86_64/templates-mono
|
||||
rm -rf bin
|
||||
|
||||
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
|
||||
mkdir -p /root/out/x86_32/tools-mono
|
||||
cp -rvp bin/* /root/out/x86_32/tools-mono
|
||||
rm -rf bin
|
||||
|
||||
$SCONS platform=linuxbsd arch=x86_32 $OPTIONS $OPTIONS_MONO target=template_debug
|
||||
$SCONS platform=linuxbsd arch=x86_32 $OPTIONS $OPTIONS_MONO target=template_release
|
||||
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
|
||||
|
||||
# .NET
|
||||
|
||||
if [ "${DOTNET}" == "1" ]; then
|
||||
echo "Starting .NET build for Linux..."
|
||||
|
||||
export PATH="${GODOT_SDK_LINUX_X86_64}/bin:${BASE_PATH}"
|
||||
|
||||
$SCONS platform=linuxbsd arch=x86_64 $OPTIONS $OPTIONS_DOTNET target=editor
|
||||
mkdir -p /root/out/x86_64/tools-dotnet
|
||||
cp -rvp bin/* /root/out/x86_64/tools-dotnet
|
||||
rm -rf bin
|
||||
|
||||
$SCONS platform=linuxbsd arch=x86_64 $OPTIONS $OPTIONS_DOTNET target=template_debug
|
||||
$SCONS platform=linuxbsd arch=x86_64 $OPTIONS $OPTIONS_DOTNET target=template_release
|
||||
mkdir -p /root/out/x86_64/templates-dotnet
|
||||
cp -rvp bin/* /root/out/x86_64/templates-dotnet
|
||||
rm -rf bin
|
||||
|
||||
export PATH="${GODOT_SDK_LINUX_X86_32}/bin:${BASE_PATH}"
|
||||
|
||||
$SCONS platform=linuxbsd arch=x86_32 $OPTIONS $OPTIONS_DOTNET target=editor
|
||||
mkdir -p /root/out/x86_32/tools-dotnet
|
||||
cp -rvp bin/* /root/out/x86_32/tools-dotnet
|
||||
rm -rf bin
|
||||
|
||||
$SCONS platform=linuxbsd arch=x86_32 $OPTIONS $OPTIONS_DOTNET target=template_debug
|
||||
$SCONS platform=linuxbsd arch=x86_32 $OPTIONS $OPTIONS_DOTNET target=template_release
|
||||
mkdir -p /root/out/x86_32/templates-dotnet
|
||||
cp -rvp bin/* /root/out/x86_32/templates-dotnet
|
||||
rm -rf bin
|
||||
|
||||
export PATH="${GODOT_SDK_LINUX_ARM64}/bin:${BASE_PATH}"
|
||||
|
||||
$SCONS platform=linuxbsd arch=arm64 $OPTIONS $OPTIONS_DOTNET target=editor
|
||||
mkdir -p /root/out/arm64/tools-dotnet
|
||||
cp -rvp bin/* /root/out/arm64/tools-dotnet
|
||||
rm -rf bin
|
||||
|
||||
$SCONS platform=linuxbsd arch=arm64 $OPTIONS $OPTIONS_DOTNET target=template_debug
|
||||
$SCONS platform=linuxbsd arch=arm64 $OPTIONS $OPTIONS_DOTNET target=template_release
|
||||
mkdir -p /root/out/arm64/templates-dotnet
|
||||
cp -rvp bin/* /root/out/arm64/templates-dotnet
|
||||
rm -rf bin
|
||||
|
||||
export PATH="${GODOT_SDK_LINUX_ARM32}/bin:${BASE_PATH}"
|
||||
|
||||
$SCONS platform=linuxbsd arch=arm32 $OPTIONS $OPTIONS_DOTNET target=editor
|
||||
mkdir -p /root/out/arm32/tools-dotnet
|
||||
cp -rvp bin/* /root/out/arm32/tools-dotnet
|
||||
rm -rf bin
|
||||
|
||||
$SCONS platform=linuxbsd arch=arm32 $OPTIONS $OPTIONS_DOTNET target=template_debug
|
||||
$SCONS platform=linuxbsd arch=arm32 $OPTIONS $OPTIONS_DOTNET target=template_release
|
||||
mkdir -p /root/out/arm32/templates-dotnet
|
||||
cp -rvp bin/* /root/out/arm32/templates-dotnet
|
||||
$SCONS platform=x11 $OPTIONS $OPTIONS_MONO tools=no target=release_debug
|
||||
$SCONS platform=x11 $OPTIONS $OPTIONS_MONO tools=no target=release
|
||||
mkdir -p /root/out/templates-mono
|
||||
cp -rvp bin/* /root/out/templates-mono
|
||||
rm -rf bin
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Config
|
||||
|
||||
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no redirect_build_objects=no"
|
||||
export OPTIONS="osxcross_sdk=darwin25.1 production=yes use_volk=no vulkan_sdk_path=/root/moltenvk angle_libs=/root/angle accesskit_sdk_path=/root/accesskit/accesskit-c SWIFT_FRONTEND=/root/.local/share/swiftly/toolchains/6.2.1/usr/bin/swift-frontend"
|
||||
export OPTIONS_MONO="module_mono_enabled=yes"
|
||||
export OPTIONS_DOTNET="module_dotnet_enabled=yes"
|
||||
export TERM=xterm
|
||||
|
||||
rm -rf godot
|
||||
mkdir godot
|
||||
cd godot
|
||||
tar xf /root/godot.tar.gz --strip-components=1
|
||||
|
||||
# Classical
|
||||
|
||||
if [ "${CLASSICAL}" == "1" ]; then
|
||||
echo "Starting classical build for macOS..."
|
||||
|
||||
$SCONS platform=macos $OPTIONS arch=x86_64 target=editor
|
||||
$SCONS platform=macos $OPTIONS arch=arm64 target=editor
|
||||
lipo -create bin/godot.macos.editor.x86_64 bin/godot.macos.editor.arm64 -output bin/godot.macos.editor.universal
|
||||
|
||||
mkdir -p /root/out/tools
|
||||
cp -rvp bin/* /root/out/tools
|
||||
rm -rf bin
|
||||
|
||||
$SCONS platform=macos $OPTIONS arch=x86_64 target=template_debug
|
||||
$SCONS platform=macos $OPTIONS arch=arm64 target=template_debug
|
||||
lipo -create bin/godot.macos.template_debug.x86_64 bin/godot.macos.template_debug.arm64 -output bin/godot.macos.template_debug.universal
|
||||
$SCONS platform=macos $OPTIONS arch=x86_64 target=template_release
|
||||
$SCONS platform=macos $OPTIONS arch=arm64 target=template_release
|
||||
lipo -create bin/godot.macos.template_release.x86_64 bin/godot.macos.template_release.arm64 -output bin/godot.macos.template_release.universal
|
||||
|
||||
mkdir -p /root/out/templates
|
||||
cp -rvp bin/* /root/out/templates
|
||||
rm -rf bin
|
||||
fi
|
||||
|
||||
# Mono
|
||||
|
||||
if [ "${MONO}" == "1" ]; then
|
||||
echo "Starting Mono build for macOS..."
|
||||
|
||||
cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/
|
||||
cp -r /root/mono-glue/GodotSharp/GodotSharpEditor/Generated modules/mono/glue/GodotSharp/GodotSharpEditor/
|
||||
|
||||
$SCONS platform=macos $OPTIONS $OPTIONS_MONO arch=x86_64 target=editor
|
||||
$SCONS platform=macos $OPTIONS $OPTIONS_MONO arch=arm64 target=editor
|
||||
lipo -create bin/godot.macos.editor.x86_64.mono bin/godot.macos.editor.arm64.mono -output bin/godot.macos.editor.universal.mono
|
||||
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=macos
|
||||
|
||||
mkdir -p /root/out/tools-mono
|
||||
cp -rvp bin/* /root/out/tools-mono
|
||||
rm -rf bin
|
||||
|
||||
$SCONS platform=macos $OPTIONS $OPTIONS_MONO arch=x86_64 target=template_debug
|
||||
$SCONS platform=macos $OPTIONS $OPTIONS_MONO arch=arm64 target=template_debug
|
||||
lipo -create bin/godot.macos.template_debug.x86_64.mono bin/godot.macos.template_debug.arm64.mono -output bin/godot.macos.template_debug.universal.mono
|
||||
$SCONS platform=macos $OPTIONS $OPTIONS_MONO arch=x86_64 target=template_release
|
||||
$SCONS platform=macos $OPTIONS $OPTIONS_MONO arch=arm64 target=template_release
|
||||
lipo -create bin/godot.macos.template_release.x86_64.mono bin/godot.macos.template_release.arm64.mono -output bin/godot.macos.template_release.universal.mono
|
||||
|
||||
mkdir -p /root/out/templates-mono
|
||||
cp -rvp bin/* /root/out/templates-mono
|
||||
rm -rf bin
|
||||
fi
|
||||
|
||||
# .NET
|
||||
|
||||
if [ "${DOTNET}" == "1" ]; then
|
||||
echo "Starting .NET build for macOS..."
|
||||
|
||||
$SCONS platform=macos $OPTIONS $OPTIONS_DOTNET arch=x86_64 target=editor
|
||||
$SCONS platform=macos $OPTIONS $OPTIONS_DOTNET arch=arm64 target=editor
|
||||
lipo -create bin/godot.macos.editor.x86_64.dotnet bin/godot.macos.editor.arm64.dotnet -output bin/godot.macos.editor.universal.dotnet
|
||||
|
||||
mkdir -p /root/out/tools-dotnet
|
||||
cp -rvp bin/* /root/out/tools-dotnet
|
||||
rm -rf bin
|
||||
|
||||
$SCONS platform=macos $OPTIONS $OPTIONS_DOTNET arch=x86_64 target=template_debug
|
||||
$SCONS platform=macos $OPTIONS $OPTIONS_DOTNET arch=arm64 target=template_debug
|
||||
lipo -create bin/godot.macos.template_debug.x86_64.dotnet bin/godot.macos.template_debug.arm64.dotnet -output bin/godot.macos.template_debug.universal.dotnet
|
||||
$SCONS platform=macos $OPTIONS $OPTIONS_DOTNET arch=x86_64 target=template_release
|
||||
$SCONS platform=macos $OPTIONS $OPTIONS_DOTNET arch=arm64 target=template_release
|
||||
lipo -create bin/godot.macos.template_release.x86_64.dotnet bin/godot.macos.template_release.arm64.dotnet -output bin/godot.macos.template_release.universal.dotnet
|
||||
|
||||
mkdir -p /root/out/templates-dotnet
|
||||
cp -rvp bin/* /root/out/templates-dotnet
|
||||
rm -rf bin
|
||||
fi
|
||||
|
||||
echo "macOS build successful"
|
||||
81
build-macosx/build.sh
Executable file
81
build-macosx/build.sh
Executable file
@@ -0,0 +1,81 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Config
|
||||
|
||||
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
|
||||
export OPTIONS="osxcross_sdk=darwin20.2 production=yes"
|
||||
export OPTIONS_MONO="module_mono_enabled=yes mono_static=yes mono_prefix=/root/dependencies/mono"
|
||||
export TERM=xterm
|
||||
export STRIP="x86_64-apple-darwin20.2-strip -u -r"
|
||||
|
||||
rm -rf godot
|
||||
mkdir godot
|
||||
cd godot
|
||||
tar xf /root/godot.tar.gz --strip-components=1
|
||||
|
||||
# Classical
|
||||
|
||||
if [ "${CLASSICAL}" == "1" ]; then
|
||||
echo "Starting classical build for macOS..."
|
||||
|
||||
$SCONS platform=osx $OPTIONS arch=x86_64 tools=yes target=release_debug
|
||||
$SCONS platform=osx $OPTIONS arch=arm64 tools=yes target=release_debug
|
||||
lipo -create bin/godot.osx.opt.tools.x86_64 bin/godot.osx.opt.tools.arm64 -output bin/godot.osx.opt.tools.universal
|
||||
$STRIP bin/godot.osx.opt.tools.universal
|
||||
|
||||
mkdir -p /root/out/tools
|
||||
cp -rvp bin/* /root/out/tools
|
||||
rm -rf bin
|
||||
|
||||
$SCONS platform=osx $OPTIONS arch=x86_64 tools=no target=release_debug
|
||||
$SCONS platform=osx $OPTIONS arch=arm64 tools=no target=release_debug
|
||||
lipo -create bin/godot.osx.opt.debug.x86_64 bin/godot.osx.opt.debug.arm64 -output bin/godot.osx.opt.debug.universal
|
||||
$STRIP bin/godot.osx.opt.debug.universal
|
||||
$SCONS platform=osx $OPTIONS arch=x86_64 tools=no target=release
|
||||
$SCONS platform=osx $OPTIONS arch=arm64 tools=no target=release
|
||||
lipo -create bin/godot.osx.opt.x86_64 bin/godot.osx.opt.arm64 -output bin/godot.osx.opt.universal
|
||||
$STRIP bin/godot.osx.opt.universal
|
||||
|
||||
mkdir -p /root/out/templates
|
||||
cp -rvp bin/* /root/out/templates
|
||||
rm -rf bin
|
||||
fi
|
||||
|
||||
# Mono
|
||||
|
||||
if [ "${MONO}" == "1" ]; then
|
||||
echo "Starting Mono build for macOS..."
|
||||
|
||||
cp /root/mono-glue/*.cpp modules/mono/glue/
|
||||
cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/
|
||||
cp -r /root/mono-glue/GodotSharp/GodotSharpEditor/Generated modules/mono/glue/GodotSharp/GodotSharpEditor/
|
||||
|
||||
$SCONS platform=osx $OPTIONS $OPTIONS_MONO arch=x86_64 tools=yes target=release_debug copy_mono_root=yes
|
||||
$STRIP bin/godot.osx.opt.tools.x86_64.mono
|
||||
#$SCONS platform=osx $OPTIONS $OPTIONS_MONO arch=arm64 tools=yes target=release_debug copy_mono_root=yes
|
||||
#lipo -create bin/godot.osx.opt.tools.x86_64.mono bin/godot.osx.opt.tools.arm64.mono -output bin/godot.osx.opt.tools.universal.mono
|
||||
#$STRIP bin/godot.osx.opt.tools.universal.mono
|
||||
|
||||
mkdir -p /root/out/tools-mono
|
||||
cp -rvp bin/* /root/out/tools-mono
|
||||
rm -rf bin
|
||||
|
||||
$SCONS platform=osx $OPTIONS $OPTIONS_MONO arch=x86_64 tools=no target=release_debug
|
||||
$STRIP bin/godot.osx.opt.debug.x86_64.mono
|
||||
#$SCONS platform=osx $OPTIONS $OPTIONS_MONO arch=arm64 tools=no target=release_debug
|
||||
#lipo -create bin/godot.osx.opt.debug.x86_64.mono bin/godot.osx.opt.debug.arm64.mono -output bin/godot.osx.opt.debug.universal.mono
|
||||
#$STRIP bin/godot.osx.opt.debug.universal.mono
|
||||
$SCONS platform=osx $OPTIONS $OPTIONS_MONO arch=x86_64 tools=no target=release
|
||||
$STRIP bin/godot.osx.opt.x86_64.mono
|
||||
#$SCONS platform=osx $OPTIONS $OPTIONS_MONO arch=arm64 tools=no target=release
|
||||
#lipo -create bin/godot.osx.opt.x86_64.mono bin/godot.osx.opt.arm64.mono -output bin/godot.osx.opt.universal.mono
|
||||
#$STRIP bin/godot.osx.opt.universal.mono
|
||||
|
||||
mkdir -p /root/out/templates-mono
|
||||
cp -rvp bin/* /root/out/templates-mono
|
||||
rm -rf bin
|
||||
fi
|
||||
|
||||
echo "macOS build successful"
|
||||
12
build-macosx/editor.entitlements
Normal file
12
build-macosx/editor.entitlements
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.device.audio-input</key>
|
||||
<true/>
|
||||
<key>com.apple.security.device.camera</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.disable-library-validation</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
18
build-macosx/editor_mono.entitlements
Normal file
18
build-macosx/editor_mono.entitlements
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.allow-jit</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.disable-library-validation</key>
|
||||
<true/>
|
||||
<key>com.apple.security.device.audio-input</key>
|
||||
<true/>
|
||||
<key>com.apple.security.device.camera</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -8,7 +8,6 @@ export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
|
||||
export OPTIONS="debug_symbols=no use_static_cpp=no"
|
||||
export TERM=xterm
|
||||
export DISPLAY=:0
|
||||
export PATH="${GODOT_SDK_LINUX_X86_64}/bin:${BASE_PATH}"
|
||||
|
||||
rm -rf godot
|
||||
mkdir godot
|
||||
@@ -20,12 +19,21 @@ tar xf ../godot.tar.gz --strip-components=1
|
||||
if [ "${MONO}" == "1" ]; then
|
||||
echo "Building and generating Mono glue..."
|
||||
|
||||
dotnet --info
|
||||
mono --version
|
||||
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/pkgconfig/
|
||||
|
||||
${SCONS} platform=linuxbsd ${OPTIONS} target=editor module_mono_enabled=yes
|
||||
${SCONS} platform=x11 bits=64 ${OPTIONS} target=release_debug tools=yes module_mono_enabled=yes mono_glue=no
|
||||
|
||||
rm -rf /root/mono-glue/*
|
||||
bin/godot.linuxbsd.editor.x86_64.mono --headless --generate-mono-glue /root/mono-glue
|
||||
xvfb-run bin/godot.x11.opt.tools.64.mono --audio-driver Dummy --generate-mono-glue /root/mono-glue || /bin/true
|
||||
|
||||
# Build and copy CIL that we'll need for Ubuntu 14.04 Linux builds
|
||||
# to workaround Mono MSBuild segfault in our containers.
|
||||
xvfb-run bin/godot.x11.opt.tools.64.mono --audio-driver Dummy --generate-mono-glue modules/mono/glue || /bin/true
|
||||
${SCONS} platform=x11 bits=64 ${OPTIONS} target=release_debug tools=yes module_mono_enabled=yes mono_glue=yes build_cil=yes
|
||||
|
||||
mkdir /root/mono-glue/cil
|
||||
cp -r bin/GodotSharp /root/mono-glue/cil/
|
||||
fi
|
||||
|
||||
echo "Mono glue generated successfully"
|
||||
|
||||
770
build-release.sh
770
build-release.sh
@@ -1,28 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
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 "${WINDOWS_SIGN_NAME}" ] && [ ! -z "${WINDOWS_SIGN_URL}" ] && [[ $(type -P "osslsigncode") ]]; then
|
||||
can_sign_windows=1
|
||||
can_sign=0
|
||||
if [ ! -z "${SIGN_KEYSTORE}" ] && [ ! -z "${SIGN_PASSWORD}" ]; then
|
||||
can_sign=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 binary signing as config.sh does not define the required data."
|
||||
fi
|
||||
|
||||
sign_windows() {
|
||||
if [ $can_sign_windows == 0 ]; then
|
||||
if [ $can_sign == 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 -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
|
||||
}
|
||||
|
||||
@@ -30,40 +26,47 @@ sign_macos() {
|
||||
if [ -z "${OSX_HOST}" ]; then
|
||||
return
|
||||
fi
|
||||
_macos_tmpdir=$(ssh "${OSX_HOST}" "mktemp -d")
|
||||
_osx_tmpdir=$(ssh "${OSX_HOST}" "mktemp -d")
|
||||
_reldir="$1"
|
||||
_binname="$2"
|
||||
_appname="$3"
|
||||
_is_mono="$3"
|
||||
|
||||
if [[ "${_appname}" == "Godot_mono.app" ]]; then
|
||||
if [[ "${_is_mono}" == "1" ]]; then
|
||||
_appname="Godot_mono.app"
|
||||
_entitlements=editor_mono.entitlements
|
||||
_sharpdir="${_appname}/Contents/Resources/GodotSharp"
|
||||
_extra_files="${_sharpdir}/Mono/lib/*.dylib ${_sharpdir}/Tools/aot-compilers/*/*"
|
||||
else
|
||||
_appname="Godot.app"
|
||||
_entitlements=editor.entitlements
|
||||
fi
|
||||
|
||||
scp "${_reldir}/${_binname}.zip" "${OSX_HOST}:${_macos_tmpdir}"
|
||||
scp "${basedir}/git/misc/dist/macos/editor.entitlements" "${OSX_HOST}:${_macos_tmpdir}"
|
||||
scp "${_reldir}/${_binname}.zip" "${OSX_HOST}:${_osx_tmpdir}"
|
||||
scp "${basedir}/build-macosx/${_entitlements}" "${OSX_HOST}:${_osx_tmpdir}"
|
||||
ssh "${OSX_HOST}" "
|
||||
cd ${_macos_tmpdir} && \
|
||||
cd ${_osx_tmpdir} && \
|
||||
unzip ${_binname}.zip && \
|
||||
codesign --force --timestamp \
|
||||
--options=runtime --entitlements editor.entitlements \
|
||||
-s ${OSX_KEY_ID} -v ${_appname} && \
|
||||
--options=runtime --entitlements ${_entitlements} \
|
||||
-s ${OSX_KEY_ID} -v ${_extra_files} ${_appname} && \
|
||||
zip -r ${_binname}_signed.zip ${_appname}"
|
||||
|
||||
_request_uuid=$(ssh "${OSX_HOST}" "xcrun notarytool submit ${_macos_tmpdir}/${_binname}_signed.zip --team-id \"${APPLE_TEAM}\" --apple-id \"${APPLE_ID}\" --password \"${APPLE_ID_PASSWORD}\" --no-progress --output-format json")
|
||||
_request_uuid=$(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
|
||||
_request_uuid=$(ssh "${OSX_HOST}" "xcrun altool --notarize-app --primary-bundle-id \"${OSX_BUNDLE_ID}\" --username \"${APPLE_ID}\" --password \"${APPLE_ID_PASSWORD}\" --file ${_osx_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
|
||||
echo "Notarization failed."
|
||||
_notarization_log=$(ssh "${OSX_HOST}" "xcrun notarytool log ${_request_uuid} --team-id \"${APPLE_TEAM}\" --apple-id \"${APPLE_ID}\" --password \"${APPLE_ID_PASSWORD}\"")
|
||||
_notarization_log=$(ssh "${OSX_HOST}" "xcrun altool --notarization-info ${_request_uuid} -u \"${APPLE_ID}\" -p \"${APPLE_ID_PASSWORD}\"")
|
||||
echo "${_notarization_log}"
|
||||
ssh "${OSX_HOST}" "rm -rf ${_macos_tmpdir}"
|
||||
ssh "${OSX_HOST}" "rm -rf ${_osx_tmpdir}"
|
||||
exit 1
|
||||
else
|
||||
ssh "${OSX_HOST}" "
|
||||
cd ${_macos_tmpdir} && \
|
||||
cd ${_osx_tmpdir} && \
|
||||
xcrun stapler staple ${_appname} && \
|
||||
zip -r ${_binname}_stapled.zip ${_appname}"
|
||||
scp "${OSX_HOST}:${_macos_tmpdir}/${_binname}_stapled.zip" "${_reldir}/${_binname}.zip"
|
||||
ssh "${OSX_HOST}" "rm -rf ${_macos_tmpdir}"
|
||||
scp "${OSX_HOST}:${_osx_tmpdir}/${_binname}_stapled.zip" "${_reldir}/${_binname}.zip"
|
||||
ssh "${OSX_HOST}" "rm -rf ${_osx_tmpdir}"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -71,40 +74,40 @@ sign_macos_template() {
|
||||
if [ -z "${OSX_HOST}" ]; then
|
||||
return
|
||||
fi
|
||||
_macos_tmpdir=$(ssh "${OSX_HOST}" "mktemp -d")
|
||||
_osx_tmpdir=$(ssh "${OSX_HOST}" "mktemp -d")
|
||||
_reldir="$1"
|
||||
_is_mono="$2"
|
||||
|
||||
scp "${_reldir}/macos.zip" "${OSX_HOST}:${_macos_tmpdir}"
|
||||
if [[ "${_is_mono}" == "1" ]]; then
|
||||
_extra_files="osx_template.app/Contents/Resources/data.mono.*/Mono/lib/*.dylib"
|
||||
fi
|
||||
|
||||
scp "${_reldir}/osx.zip" "${OSX_HOST}:${_osx_tmpdir}"
|
||||
ssh "${OSX_HOST}" "
|
||||
cd ${_macos_tmpdir} && \
|
||||
unzip macos.zip && \
|
||||
cd ${_osx_tmpdir} && \
|
||||
unzip osx.zip && \
|
||||
codesign --force -s - \
|
||||
--options=linker-signed \
|
||||
-v macos_template.app/Contents/MacOS/* && \
|
||||
zip -r macos_signed.zip macos_template.app"
|
||||
-v ${_extra_files} osx_template.app/Contents/MacOS/* && \
|
||||
zip -r osx_signed.zip osx_template.app"
|
||||
|
||||
scp "${OSX_HOST}:${_macos_tmpdir}/macos_signed.zip" "${_reldir}/macos.zip"
|
||||
ssh "${OSX_HOST}" "rm -rf ${_macos_tmpdir}"
|
||||
scp "${OSX_HOST}:${_osx_tmpdir}/osx_signed.zip" "${_reldir}/osx.zip"
|
||||
ssh "${OSX_HOST}" "rm -rf ${_osx_tmpdir}"
|
||||
}
|
||||
|
||||
godot_version=""
|
||||
templates_version=""
|
||||
do_cleanup=1
|
||||
make_tarball=1
|
||||
build_classical=1
|
||||
build_mono=1
|
||||
build_dotnet=0
|
||||
|
||||
while getopts "h?v:t:b:n-:" opt; do
|
||||
while getopts "h?v:t:b:" opt; do
|
||||
case "$opt" in
|
||||
h|\?)
|
||||
echo "Usage: $0 [OPTIONS...]"
|
||||
echo
|
||||
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|dotnet|none (default: all)"
|
||||
echo " --no-cleanup disable deleting pre-existing output folders (default: false)"
|
||||
echo " --no-tarball disable generating source tarball (default: false)"
|
||||
echo " -b all|classical|mono (default: all)"
|
||||
echo
|
||||
exit 1
|
||||
;;
|
||||
@@ -116,98 +119,47 @@ while getopts "h?v:t:b:n-:" opt; do
|
||||
;;
|
||||
b)
|
||||
if [ "$OPTARG" == "classical" ]; then
|
||||
build_classical=1
|
||||
build_mono=0
|
||||
build_dotnet=0
|
||||
elif [ "$OPTARG" == "mono" ]; then
|
||||
build_classical=0
|
||||
build_mono=1
|
||||
build_dotnet=0
|
||||
elif [ "$OPTARG" == "dotnet" ]; then
|
||||
build_classical=0
|
||||
build_mono=0
|
||||
build_dotnet=1
|
||||
elif [ "$OPTARG" == "none" ]; then
|
||||
build_classical=0
|
||||
build_mono=0
|
||||
build_dotnet=0
|
||||
fi
|
||||
;;
|
||||
-)
|
||||
case "${OPTARG}" in
|
||||
no-cleanup)
|
||||
do_cleanup=0
|
||||
;;
|
||||
no-tarball)
|
||||
make_tarball=0
|
||||
;;
|
||||
*)
|
||||
if [ "$OPTERR" == 1 ] && [ "${optspec:0:1}" != ":" ]; then
|
||||
echo "Unknown option --${OPTARG}."
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -z "${godot_version}" -o -z "${templates_version}" ]; then
|
||||
echo "Mandatory argument -v or -t missing."
|
||||
exit 1
|
||||
elif [[ "{$templates_version}" == *"-"* ]]; then
|
||||
echo "Templates version (-t) shouldn't contain '-'. It should use a dot to separate version from status."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export basedir=$(pwd)
|
||||
export webdir="${basedir}/web/${godot_version}"
|
||||
export reldir="${basedir}/releases/${godot_version}"
|
||||
export reldir_mono="${reldir}/mono"
|
||||
export reldir_dotnet="${reldir}/dotnet"
|
||||
export tmpdir="${basedir}/tmp"
|
||||
export templatesdir="${tmpdir}/templates"
|
||||
export templatesdir_mono="${tmpdir}/mono/templates"
|
||||
export templatesdir_dotnet="${tmpdir}/dotnet/templates"
|
||||
export webdir="${basedir}/web/${templates_version}"
|
||||
export steamdir="${basedir}/steam"
|
||||
|
||||
export godot_basename="Godot_v${godot_version}"
|
||||
|
||||
# Cleanup and setup
|
||||
|
||||
if [ "${do_cleanup}" == "1" ]; then
|
||||
rm -rf ${webdir}
|
||||
rm -rf ${reldir}
|
||||
rm -rf ${tmpdir}
|
||||
|
||||
rm -rf ${reldir}
|
||||
rm -rf ${tmpdir}
|
||||
rm -rf ${webdir}
|
||||
rm -rf ${steamdir}
|
||||
|
||||
mkdir -p ${reldir}
|
||||
if [ "${build_mono}" ]; then
|
||||
mkdir -p ${reldir_mono}
|
||||
fi
|
||||
if [ "${build_dotnet}" ]; then
|
||||
mkdir -p ${reldir_dotnet}
|
||||
fi
|
||||
mkdir -p ${templatesdir}
|
||||
mkdir -p ${templatesdir_mono}
|
||||
mkdir -p ${templatesdir_dotnet}
|
||||
mkdir -p ${webdir}
|
||||
if [ -d out/windows/steam ]; then
|
||||
mkdir -p ${steamdir}
|
||||
fi
|
||||
|
||||
fi
|
||||
mkdir -p ${webdir}
|
||||
mkdir -p ${reldir}
|
||||
mkdir -p ${reldir_mono}
|
||||
mkdir -p ${templatesdir}
|
||||
mkdir -p ${templatesdir_mono}
|
||||
|
||||
# Tarball
|
||||
|
||||
if [ "${make_tarball}" == "1" ]; then
|
||||
|
||||
zcat godot-${godot_version}.tar.gz | xz -c > ${reldir}/godot-${godot_version}.tar.xz
|
||||
pushd ${reldir}
|
||||
sha256sum godot-${godot_version}.tar.xz > godot-${godot_version}.tar.xz.sha256
|
||||
popd
|
||||
|
||||
fi
|
||||
zcat godot-${godot_version}.tar.gz | xz -c > ${reldir}/godot-${godot_version}.tar.xz
|
||||
pushd ${reldir}
|
||||
sha256sum godot-${godot_version}.tar.xz > godot-${godot_version}.tar.xz.sha256
|
||||
popd
|
||||
|
||||
# Classical
|
||||
|
||||
@@ -216,195 +168,165 @@ if [ "${build_classical}" == "1" ]; then
|
||||
## Linux (Classical) ##
|
||||
|
||||
# Editor
|
||||
binname="${godot_basename}_linux.x86_64"
|
||||
cp out/linux/x86_64/tools/godot.linuxbsd.editor.x86_64 ${binname}
|
||||
binname="${godot_basename}_x11.64"
|
||||
cp out/linux/x64/tools/godot.x11.opt.tools.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}
|
||||
binname="${godot_basename}_x11.32"
|
||||
cp out/linux/x86/tools/godot.x11.opt.tools.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
|
||||
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
|
||||
cp out/linux/x64/templates/godot.x11.opt.64 ${templatesdir}/linux_x11_64_release
|
||||
cp out/linux/x64/templates/godot.x11.opt.debug.64 ${templatesdir}/linux_x11_64_debug
|
||||
cp out/linux/x86/templates/godot.x11.opt.32 ${templatesdir}/linux_x11_32_release
|
||||
cp out/linux/x86/templates/godot.x11.opt.debug.32 ${templatesdir}/linux_x11_32_debug
|
||||
strip ${templatesdir}/linux_x11_*
|
||||
|
||||
## Windows (Classical) ##
|
||||
|
||||
# Editor
|
||||
binname="${godot_basename}_win64.exe"
|
||||
wrpname="${godot_basename}_win64_console.exe"
|
||||
cp out/windows/x86_64/tools/godot.windows.editor.x86_64.exe ${binname}
|
||||
cp out/windows/x64/tools/godot.windows.opt.tools.64.exe ${binname}
|
||||
strip ${binname}
|
||||
sign_windows ${binname}
|
||||
cp out/windows/x86_64/tools/godot.windows.editor.x86_64.console.exe ${wrpname}
|
||||
sign_windows ${wrpname}
|
||||
zip -q -9 "${reldir}/${binname}.zip" ${binname} ${wrpname}
|
||||
rm ${binname} ${wrpname}
|
||||
zip -q -9 "${reldir}/${binname}.zip" ${binname}
|
||||
rm ${binname}
|
||||
|
||||
binname="${godot_basename}_win32.exe"
|
||||
wrpname="${godot_basename}_win32_console.exe"
|
||||
cp out/windows/x86_32/tools/godot.windows.editor.x86_32.exe ${binname}
|
||||
cp out/windows/x86/tools/godot.windows.opt.tools.32.exe ${binname}
|
||||
strip ${binname}
|
||||
sign_windows ${binname}
|
||||
cp out/windows/x86_32/tools/godot.windows.editor.x86_32.console.exe ${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}
|
||||
zip -q -9 "${reldir}/${binname}.zip" ${binname}
|
||||
rm ${binname}
|
||||
|
||||
# Templates
|
||||
cp out/windows/x86_64/templates/godot.windows.template_release.x86_64.exe ${templatesdir}/windows_release_x86_64.exe
|
||||
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
|
||||
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
|
||||
cp out/windows/x64/templates/godot.windows.opt.64.exe ${templatesdir}/windows_64_release.exe
|
||||
cp out/windows/x64/templates/godot.windows.opt.debug.64.exe ${templatesdir}/windows_64_debug.exe
|
||||
cp out/windows/x86/templates/godot.windows.opt.32.exe ${templatesdir}/windows_32_release.exe
|
||||
cp out/windows/x86/templates/godot.windows.opt.debug.32.exe ${templatesdir}/windows_32_debug.exe
|
||||
strip ${templatesdir}/windows*.exe
|
||||
|
||||
## macOS (Classical) ##
|
||||
## OSX (Classical) ##
|
||||
|
||||
# Editor
|
||||
binname="${godot_basename}_macos.universal"
|
||||
binname="${godot_basename}_osx.universal"
|
||||
rm -rf Godot.app
|
||||
cp -r git/misc/dist/macos_tools.app Godot.app
|
||||
cp -r git/misc/dist/osx_tools.app Godot.app
|
||||
mkdir -p Godot.app/Contents/MacOS
|
||||
cp out/macos/tools/godot.macos.editor.universal Godot.app/Contents/MacOS/Godot
|
||||
cp out/macosx/tools/godot.osx.opt.tools.universal Godot.app/Contents/MacOS/Godot
|
||||
chmod +x Godot.app/Contents/MacOS/Godot
|
||||
zip -q -9 -r "${reldir}/${binname}.zip" Godot.app
|
||||
rm -rf Godot.app
|
||||
sign_macos ${reldir} ${binname} Godot.app
|
||||
sign_macos ${reldir} ${binname} 0
|
||||
|
||||
# Templates
|
||||
rm -rf macos_template.app
|
||||
cp -r git/misc/dist/macos_template.app .
|
||||
mkdir -p macos_template.app/Contents/MacOS
|
||||
rm -rf osx_template.app
|
||||
cp -r git/misc/dist/osx_template.app .
|
||||
mkdir -p osx_template.app/Contents/MacOS
|
||||
|
||||
cp out/macos/templates/godot.macos.template_release.universal macos_template.app/Contents/MacOS/godot_macos_release.universal
|
||||
cp out/macos/templates/godot.macos.template_debug.universal macos_template.app/Contents/MacOS/godot_macos_debug.universal
|
||||
chmod +x macos_template.app/Contents/MacOS/godot_macos*
|
||||
zip -q -9 -r "${templatesdir}/macos.zip" macos_template.app
|
||||
rm -rf macos_template.app
|
||||
sign_macos_template ${templatesdir}
|
||||
cp out/macosx/templates/godot.osx.opt.universal osx_template.app/Contents/MacOS/godot_osx_release.64
|
||||
cp out/macosx/templates/godot.osx.opt.debug.universal osx_template.app/Contents/MacOS/godot_osx_debug.64
|
||||
chmod +x osx_template.app/Contents/MacOS/godot_osx*
|
||||
zip -q -9 -r "${templatesdir}/osx.zip" osx_template.app
|
||||
rm -rf osx_template.app
|
||||
sign_macos_template ${templatesdir} 0
|
||||
|
||||
## Steam (Classical) ##
|
||||
## Server (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
|
||||
# Headless (editor)
|
||||
binname="${godot_basename}_linux_headless.64"
|
||||
cp out/server/x64/tools/godot_server.x11.opt.tools.64 ${binname}
|
||||
strip ${binname}
|
||||
zip -q -9 "${reldir}/${binname}.zip" ${binname}
|
||||
rm ${binname}
|
||||
|
||||
## Web (Classical) ##
|
||||
# Server (template)
|
||||
binname="${godot_basename}_linux_server.64"
|
||||
cp out/server/x64/templates/godot_server.x11.opt.64 ${binname}
|
||||
strip ${binname}
|
||||
zip -q -9 "${reldir}/${binname}.zip" ${binname}
|
||||
rm ${binname}
|
||||
|
||||
## Javascript (Classical) ##
|
||||
|
||||
# Editor
|
||||
unzip out/web/tools/godot.web.editor.wasm32.zip -d ${webdir}/
|
||||
unzip out/javascript/tools/godot.javascript.opt.tools.threads.zip -d ${webdir}/
|
||||
brotli --keep --force --quality=11 ${webdir}/*
|
||||
binname="${godot_basename}_web_editor.zip"
|
||||
cp out/web/tools/godot.web.editor.wasm32.zip ${reldir}/${binname}
|
||||
cp out/javascript/tools/godot.javascript.opt.tools.threads.zip ${reldir}/${binname}
|
||||
|
||||
# Templates
|
||||
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/javascript/templates/godot.javascript.opt.zip ${templatesdir}/webassembly_release.zip
|
||||
cp out/javascript/templates/godot.javascript.opt.debug.zip ${templatesdir}/webassembly_debug.zip
|
||||
|
||||
cp out/web/templates/godot.web.template_release.wasm32.nothreads.zip ${templatesdir}/web_nothreads_release.zip
|
||||
cp out/web/templates/godot.web.template_debug.wasm32.nothreads.zip ${templatesdir}/web_nothreads_debug.zip
|
||||
cp out/javascript/templates/godot.javascript.opt.threads.zip ${templatesdir}/webassembly_threads_release.zip
|
||||
cp out/javascript/templates/godot.javascript.opt.debug.threads.zip ${templatesdir}/webassembly_threads_debug.zip
|
||||
|
||||
cp out/web/templates/godot.web.template_release.wasm32.dlink.zip ${templatesdir}/web_dlink_release.zip
|
||||
cp out/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
|
||||
cp out/javascript/templates/godot.javascript.opt.gdnative.zip ${templatesdir}/webassembly_gdnative_release.zip
|
||||
cp out/javascript/templates/godot.javascript.opt.debug.gdnative.zip ${templatesdir}/webassembly_gdnative_debug.zip
|
||||
|
||||
## Android (Classical) ##
|
||||
|
||||
# Lib for direct download
|
||||
cp out/android/templates/godot-lib.template_release.aar ${reldir}/godot-lib.${templates_version}.template_release.aar
|
||||
|
||||
# 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}
|
||||
cp out/android/templates/godot-lib.release.aar ${reldir}/godot-lib.${templates_version}.release.aar
|
||||
|
||||
# Templates
|
||||
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
|
||||
cp -r git/misc/dist/apple_embedded_xcode ios_xcode
|
||||
cp out/ios/templates/libgodot.ios.simulator.a ios_xcode/libgodot.ios.release.xcframework/ios-arm64_x86_64-simulator/libgodot.a
|
||||
cp out/ios/templates/libgodot.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/moltenvk/MoltenVK/MoltenVK.xcframework ios_xcode/
|
||||
rm -rf ios_xcode/MoltenVK.xcframework/{macos,tvos}*
|
||||
cp -r git/misc/dist/ios_xcode ios_xcode
|
||||
cp out/ios/templates/libgodot.iphone.opt.fat ios_xcode/libgodot.iphone.release.fat.a
|
||||
cp out/ios/templates/libgodot.iphone.opt.debug.fat ios_xcode/libgodot.iphone.debug.fat.a
|
||||
chmod +x ios_xcode/libgodot.iphone.*
|
||||
cd ios_xcode
|
||||
zip -q -9 -r "${templatesdir}/ios.zip" *
|
||||
zip -q -9 -r "${templatesdir}/iphone.zip" *
|
||||
cd ..
|
||||
rm -rf ios_xcode
|
||||
|
||||
## visionOS (Classical) ##
|
||||
## UWP (Classical) ##
|
||||
|
||||
#rm -rf visionos_xcode
|
||||
#cp -r git/misc/dist/apple_embedded_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
|
||||
if [ ! -d "deps/angle" ]; then
|
||||
echo "Downloading ANGLE binaries from https://github.com/GodotBuilder/godot-builds/releases/tag/_tools"
|
||||
mkdir -p deps && cd deps
|
||||
curl -LO https://github.com/GodotBuilder/godot-builds/releases/download/_tools/angle.7z
|
||||
7z x angle.7z && rm -f angle.7z
|
||||
cd ..
|
||||
fi
|
||||
|
||||
rm -rf uwp_template_*
|
||||
for arch in ARM Win32 x64; do
|
||||
cp -r git/misc/dist/uwp_template uwp_template_${arch}
|
||||
cp deps/angle/winrt/10/src/Release_${arch}/libEGL.dll \
|
||||
deps/angle/winrt/10/src/Release_${arch}/libGLESv2.dll \
|
||||
uwp_template_${arch}/
|
||||
cp -r uwp_template_${arch} uwp_template_${arch}_debug
|
||||
done
|
||||
|
||||
cp out/uwp/arm/godot.uwp.opt.32.arm.exe uwp_template_ARM/godot.uwp.exe
|
||||
cp out/uwp/arm/godot.uwp.opt.debug.32.arm.exe uwp_template_ARM_debug/godot.uwp.exe
|
||||
cd uwp_template_ARM && zip -q -9 -r "${templatesdir}/uwp_arm_release.zip" * && cd ..
|
||||
cd uwp_template_ARM_debug && zip -q -9 -r "${templatesdir}/uwp_arm_debug.zip" * && cd ..
|
||||
rm -rf uwp_template_ARM*
|
||||
|
||||
cp out/uwp/x86/godot.uwp.opt.32.x86.exe uwp_template_Win32/godot.uwp.exe
|
||||
cp out/uwp/x86/godot.uwp.opt.debug.32.x86.exe uwp_template_Win32_debug/godot.uwp.exe
|
||||
cd uwp_template_Win32 && zip -q -9 -r "${templatesdir}/uwp_x86_release.zip" * && cd ..
|
||||
cd uwp_template_Win32_debug && zip -q -9 -r "${templatesdir}/uwp_x86_debug.zip" * && cd ..
|
||||
rm -rf uwp_template_Win32*
|
||||
|
||||
cp out/uwp/x64/godot.uwp.opt.64.x64.exe uwp_template_x64/godot.uwp.exe
|
||||
cp out/uwp/x64/godot.uwp.opt.debug.64.x64.exe uwp_template_x64_debug/godot.uwp.exe
|
||||
cd uwp_template_x64 && zip -q -9 -r "${templatesdir}/uwp_x64_release.zip" * && cd ..
|
||||
cd uwp_template_x64_debug && zip -q -9 -r "${templatesdir}/uwp_x64_debug.zip" * && cd ..
|
||||
rm -rf uwp_template_x64*
|
||||
|
||||
## Templates TPZ (Classical) ##
|
||||
|
||||
@@ -430,172 +352,161 @@ if [ "${build_mono}" == "1" ]; then
|
||||
## Linux (Mono) ##
|
||||
|
||||
# Editor
|
||||
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
|
||||
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
|
||||
binbasename="${godot_basename}_mono_x11"
|
||||
mkdir -p ${binbasename}_64
|
||||
cp out/linux/x64/tools-mono/godot.x11.opt.tools.64.mono ${binbasename}_64/${binbasename}.64
|
||||
strip ${binbasename}_64/${binbasename}.64
|
||||
cp -rp out/linux/x64/tools-mono/GodotSharp ${binbasename}_64/
|
||||
cp -rp out/aot-compilers ${binbasename}_64/GodotSharp/Tools/
|
||||
zip -r -q -9 "${reldir_mono}/${binbasename}_64.zip" ${binbasename}_64
|
||||
rm -rf ${binbasename}_64
|
||||
|
||||
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
|
||||
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
|
||||
binbasename="${godot_basename}_mono_x11"
|
||||
mkdir -p ${binbasename}_32
|
||||
cp out/linux/x86/tools-mono/godot.x11.opt.tools.32.mono ${binbasename}_32/${binbasename}.32
|
||||
strip ${binbasename}_32/${binbasename}.32
|
||||
cp -rp out/linux/x86/tools-mono/GodotSharp/ ${binbasename}_32/
|
||||
cp -rp out/aot-compilers ${binbasename}_32/GodotSharp/Tools/
|
||||
zip -r -q -9 "${reldir_mono}/${binbasename}_32.zip" ${binbasename}_32
|
||||
rm -rf ${binbasename}_32
|
||||
|
||||
# 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
|
||||
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
|
||||
cp -rp out/linux/x64/templates-mono/data.mono.x11.64.* ${templatesdir_mono}/
|
||||
cp out/linux/x64/templates-mono/godot.x11.opt.debug.64.mono ${templatesdir_mono}/linux_x11_64_debug
|
||||
cp out/linux/x64/templates-mono/godot.x11.opt.64.mono ${templatesdir_mono}/linux_x11_64_release
|
||||
cp -rp out/linux/x86/templates-mono/data.mono.x11.32.* ${templatesdir_mono}/
|
||||
cp out/linux/x86/templates-mono/godot.x11.opt.debug.32.mono ${templatesdir_mono}/linux_x11_32_debug
|
||||
cp out/linux/x86/templates-mono/godot.x11.opt.32.mono ${templatesdir_mono}/linux_x11_32_release
|
||||
strip ${templatesdir_mono}/linux_x11*
|
||||
|
||||
mkdir -p ${templatesdir_mono}/bcl
|
||||
cp -r out/linux/x64/tools-mono/GodotSharp/Mono/lib/mono/4.5/ ${templatesdir_mono}/bcl/net_4_x
|
||||
|
||||
## Windows (Mono) ##
|
||||
|
||||
# Editor
|
||||
binname="${godot_basename}_mono_win64"
|
||||
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
|
||||
cp out/windows/x64/tools-mono/godot.windows.opt.tools.64.mono.exe ${binname}/${binname}.exe
|
||||
strip ${binname}/${binname}.exe
|
||||
sign_windows ${binname}/${binname}.exe
|
||||
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
|
||||
sign_windows ${binname}/${wrpname}.exe
|
||||
cp -rp out/windows/x64/tools-mono/GodotSharp ${binname}/
|
||||
cp -rp out/aot-compilers ${binname}/GodotSharp/Tools/
|
||||
zip -r -q -9 "${reldir_mono}/${binname}.zip" ${binname}
|
||||
rm -rf ${binname}
|
||||
|
||||
binname="${godot_basename}_mono_win32"
|
||||
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
|
||||
cp out/windows/x86/tools-mono/godot.windows.opt.tools.32.mono.exe ${binname}/${binname}.exe
|
||||
strip ${binname}/${binname}.exe
|
||||
sign_windows ${binname}/${binname}.exe
|
||||
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
|
||||
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
|
||||
cp -rp out/windows/x86/tools-mono/GodotSharp ${binname}/
|
||||
cp -rp out/aot-compilers ${binname}/GodotSharp/Tools/
|
||||
zip -r -q -9 "${reldir_mono}/${binname}.zip" ${binname}
|
||||
rm -rf ${binname}
|
||||
|
||||
# Templates
|
||||
cp out/windows/x86_64/templates-mono/godot.windows.template_debug.x86_64.mono.exe ${templatesdir_mono}/windows_debug_x86_64.exe
|
||||
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
|
||||
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
|
||||
cp -rp out/windows/x64/templates-mono/data.mono.windows.64.* ${templatesdir_mono}/
|
||||
cp out/windows/x64/templates-mono/godot.windows.opt.debug.64.mono.exe ${templatesdir_mono}/windows_64_debug.exe
|
||||
cp out/windows/x64/templates-mono/godot.windows.opt.64.mono.exe ${templatesdir_mono}/windows_64_release.exe
|
||||
cp -rp out/windows/x86/templates-mono/data.mono.windows.32.* ${templatesdir_mono}/
|
||||
cp out/windows/x86/templates-mono/godot.windows.opt.debug.32.mono.exe ${templatesdir_mono}/windows_32_debug.exe
|
||||
cp out/windows/x86/templates-mono/godot.windows.opt.32.mono.exe ${templatesdir_mono}/windows_32_release.exe
|
||||
strip ${templatesdir_mono}/windows*.exe
|
||||
|
||||
## macOS (Mono) ##
|
||||
mkdir -p ${templatesdir_mono}/bcl
|
||||
cp -r out/windows/x64/tools-mono/GodotSharp/Mono/lib/mono/4.5/ ${templatesdir_mono}/bcl/net_4_x_win
|
||||
|
||||
## OSX (Mono) ##
|
||||
|
||||
# Editor
|
||||
binname="${godot_basename}_mono_macos.universal"
|
||||
binname="${godot_basename}_mono_osx.64"
|
||||
rm -rf Godot_mono.app
|
||||
cp -r git/misc/dist/macos_tools.app Godot_mono.app
|
||||
cp -r git/misc/dist/osx_tools.app Godot_mono.app
|
||||
mkdir -p Godot_mono.app/Contents/{MacOS,Resources}
|
||||
cp out/macos/tools-mono/godot.macos.editor.universal.mono Godot_mono.app/Contents/MacOS/Godot
|
||||
cp -rp out/macos/tools-mono/GodotSharp Godot_mono.app/Contents/Resources/GodotSharp
|
||||
cp out/macosx/tools-mono/godot.osx.opt.tools.x86_64.mono Godot_mono.app/Contents/MacOS/Godot
|
||||
cp -rp out/macosx/tools-mono/GodotSharp Godot_mono.app/Contents/Resources/GodotSharp
|
||||
cp -rp out/aot-compilers Godot_mono.app/Contents/Resources/GodotSharp/Tools/
|
||||
chmod +x Godot_mono.app/Contents/MacOS/Godot
|
||||
zip -q -9 -r "${reldir_mono}/${binname}.zip" Godot_mono.app
|
||||
rm -rf Godot_mono.app
|
||||
sign_macos ${reldir_mono} ${binname} Godot_mono.app
|
||||
sign_macos ${reldir_mono} ${binname} 1
|
||||
|
||||
# Templates
|
||||
rm -rf macos_template.app
|
||||
cp -r git/misc/dist/macos_template.app .
|
||||
mkdir -p macos_template.app/Contents/{MacOS,Resources}
|
||||
cp out/macos/templates-mono/godot.macos.template_debug.universal.mono macos_template.app/Contents/MacOS/godot_macos_debug.universal
|
||||
cp out/macos/templates-mono/godot.macos.template_release.universal.mono macos_template.app/Contents/MacOS/godot_macos_release.universal
|
||||
chmod +x macos_template.app/Contents/MacOS/godot_macos*
|
||||
zip -q -9 -r "${templatesdir_mono}/macos.zip" macos_template.app
|
||||
rm -rf macos_template.app
|
||||
sign_macos_template ${templatesdir_mono}
|
||||
rm -rf osx_template.app
|
||||
cp -r git/misc/dist/osx_template.app .
|
||||
mkdir -p osx_template.app/Contents/{MacOS,Resources}
|
||||
cp out/macosx/templates-mono/godot.osx.opt.debug.x86_64.mono osx_template.app/Contents/MacOS/godot_osx_debug.64
|
||||
cp out/macosx/templates-mono/godot.osx.opt.x86_64.mono osx_template.app/Contents/MacOS/godot_osx_release.64
|
||||
cp -rp out/macosx/templates-mono/data.mono.osx.64.* osx_template.app/Contents/Resources/
|
||||
chmod +x osx_template.app/Contents/MacOS/godot_osx*
|
||||
zip -q -9 -r "${templatesdir_mono}/osx.zip" osx_template.app
|
||||
rm -rf osx_template.app
|
||||
sign_macos_template ${templatesdir_mono} 1
|
||||
|
||||
## Server (Mono) ##
|
||||
|
||||
# Headless (editor)
|
||||
binbasename="${godot_basename}_mono_linux_headless"
|
||||
mkdir -p ${binbasename}_64
|
||||
cp out/server/x64/tools-mono/godot_server.x11.opt.tools.64.mono ${binbasename}_64/${binbasename}.64
|
||||
strip ${binbasename}_64/${binbasename}.64
|
||||
cp -rp out/server/x64/tools-mono/GodotSharp ${binbasename}_64/
|
||||
cp -rp out/aot-compilers ${binbasename}_64/GodotSharp/Tools/
|
||||
zip -r -q -9 "${reldir_mono}/${binbasename}_64.zip" ${binbasename}_64
|
||||
rm -rf ${binbasename}_64
|
||||
|
||||
# Server (template)
|
||||
binbasename="${godot_basename}_mono_linux_server"
|
||||
mkdir -p ${binbasename}_64
|
||||
cp out/server/x64/templates-mono/godot_server.x11.opt.64.mono ${binbasename}_64/${binbasename}.64
|
||||
strip ${binbasename}_64/${binbasename}.64
|
||||
cp -rp out/server/x64/templates-mono/data.mono.server.64.release ${binbasename}_64/data_${binbasename}_64
|
||||
zip -r -q -9 "${reldir_mono}/${binbasename}_64.zip" ${binbasename}_64
|
||||
rm -rf ${binbasename}_64
|
||||
|
||||
## Javascript (Mono) ##
|
||||
|
||||
# Templates
|
||||
cp out/javascript/templates-mono/godot.javascript.opt.debug.mono.zip ${templatesdir_mono}/webassembly_debug.zip
|
||||
cp out/javascript/templates-mono/godot.javascript.opt.mono.zip ${templatesdir_mono}/webassembly_release.zip
|
||||
|
||||
mkdir -p ${templatesdir_mono}/bcl
|
||||
cp -r out/javascript/templates-mono/bcl/wasm ${templatesdir_mono}/bcl/
|
||||
|
||||
## Android (Mono) ##
|
||||
|
||||
# Lib for direct download
|
||||
cp out/android/templates-mono/godot-lib.template_release.aar ${reldir_mono}/godot-lib.${templates_version}.mono.template_release.aar
|
||||
cp out/android/templates-mono/godot-lib.release.aar ${reldir_mono}/godot-lib.${templates_version}.mono.release.aar
|
||||
|
||||
# Templates
|
||||
cp out/android/templates-mono/*.apk ${templatesdir_mono}/
|
||||
cp out/android/templates-mono/android_source.zip ${templatesdir_mono}/
|
||||
|
||||
mkdir -p ${templatesdir_mono}/bcl
|
||||
cp -r out/android/templates-mono/bcl/godot_android_ext ${templatesdir_mono}/bcl/
|
||||
cp -r out/android/templates-mono/bcl/monodroid ${templatesdir_mono}/bcl/
|
||||
|
||||
## iOS (Mono) ##
|
||||
|
||||
rm -rf ios_xcode
|
||||
cp -r git/misc/dist/apple_embedded_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}*
|
||||
cp -r git/misc/dist/ios_xcode ios_xcode
|
||||
cp out/ios/templates-mono/libgodot.iphone.opt.fat ios_xcode/libgodot.iphone.release.fat.a
|
||||
cp out/ios/templates-mono/libgodot.iphone.opt.debug.fat ios_xcode/libgodot.iphone.debug.fat.a
|
||||
chmod +x ios_xcode/libgodot.iphone.*
|
||||
cd ios_xcode
|
||||
zip -q -9 -r "${templatesdir_mono}/ios.zip" *
|
||||
zip -q -9 -r "${templatesdir_mono}/iphone.zip" *
|
||||
cd ..
|
||||
rm -rf ios_xcode
|
||||
|
||||
## visionOS (Mono) ##
|
||||
mkdir -p ${templatesdir_mono}/bcl
|
||||
cp -r out/ios/templates-mono/bcl/monotouch* ${templatesdir_mono}/bcl/
|
||||
|
||||
#rm -rf visionos_xcode
|
||||
#cp -r git/misc/dist/apple_embedded_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
|
||||
cp -r out/ios/templates-mono/iphone-mono-libs ${templatesdir_mono}/
|
||||
|
||||
# No .NET support for those platforms yet.
|
||||
## UWP (Mono) ##
|
||||
|
||||
if false; then
|
||||
|
||||
## Web (Mono) ##
|
||||
|
||||
# Templates
|
||||
cp out/web/templates-mono/godot.web.template_debug.wasm32.mono.zip ${templatesdir_mono}/web_debug.zip
|
||||
cp out/web/templates-mono/godot.web.template_release.wasm32.mono.zip ${templatesdir_mono}/web_release.zip
|
||||
|
||||
fi
|
||||
# Not supported yet.
|
||||
|
||||
## Templates TPZ (Mono) ##
|
||||
|
||||
@@ -614,153 +525,4 @@ if [ "${build_mono}" == "1" ]; then
|
||||
|
||||
fi
|
||||
|
||||
# .NET
|
||||
|
||||
if [ "${build_dotnet}" == "1" ]; then
|
||||
|
||||
## Linux (.NET) ##
|
||||
|
||||
for arch in x86_64 x86_32 arm64 arm32; do
|
||||
# Editor
|
||||
binname="${godot_basename}_dotnet_linux.${arch}"
|
||||
cp out/linux/${arch}/tools-dotnet/godot.linuxbsd.editor.${arch}.dotnet ${binname}
|
||||
zip -r -q -9 "${reldir_dotnet}/${binname}.zip" ${binname}
|
||||
rm ${binname}
|
||||
|
||||
# Templates
|
||||
cp out/linux/${arch}/templates-dotnet/godot.linuxbsd.template_debug.${arch}.dotnet ${templatesdir_dotnet}/linux_debug.${arch}
|
||||
cp out/linux/${arch}/templates-dotnet/godot.linuxbsd.template_release.${arch}.dotnet ${templatesdir_dotnet}/linux_release.${arch}
|
||||
done
|
||||
|
||||
# ICU data
|
||||
if [ -f ${basedir}/git/thirdparty/icu4c/icudt_godot.dat ]; then
|
||||
cp ${basedir}/git/thirdparty/icu4c/icudt_godot.dat ${templatesdir_dotnet}/icudt_godot.dat
|
||||
else
|
||||
echo "icudt_godot.dat" not found.
|
||||
fi
|
||||
|
||||
## Windows (.NET) ##
|
||||
|
||||
declare -A win_arch_map=(
|
||||
["x86_64"]="win64"
|
||||
["x86_32"]="win32"
|
||||
["arm64"]="arm64"
|
||||
)
|
||||
|
||||
for arch in x86_64 x86_32 arm64; do
|
||||
# Editor
|
||||
winarch=${win_arch_map[${arch}]}
|
||||
binname="${godot_basename}_dotnet_${winarch}.exe"
|
||||
wrpname="${godot_basename}_dotnet_${winarch}_console.exe"
|
||||
[[ "${arch}" == "arm64" ]] && is_llvm=".llvm"
|
||||
cp out/windows/${arch}/tools-dotnet/godot.windows.editor.${arch}${is_llvm}.dotnet.exe ${binname}
|
||||
sign_windows ${binname}
|
||||
cp out/windows/${arch}/tools-dotnet/godot.windows.editor.${arch}${is_llvm}.dotnet.console.exe ${wrpname}
|
||||
sign_windows ${wrpname}
|
||||
zip -r -q -9 "${reldir_dotnet}/${binname}.zip" ${binname} ${wrpname}
|
||||
rm ${binname} ${wrpname}
|
||||
|
||||
# Templates
|
||||
cp out/windows/${arch}/templates-dotnet/godot.windows.template_debug.${arch}${is_llvm}.dotnet.exe ${templatesdir_dotnet}/windows_debug_${arch}.exe
|
||||
cp out/windows/${arch}/templates-dotnet/godot.windows.template_release.${arch}${is_llvm}.dotnet.exe ${templatesdir_dotnet}/windows_release_${arch}.exe
|
||||
cp out/windows/${arch}/templates-dotnet/godot.windows.template_debug.${arch}${is_llvm}.dotnet.console.exe ${templatesdir_dotnet}/windows_debug_${arch}_console.exe
|
||||
cp out/windows/${arch}/templates-dotnet/godot.windows.template_release.${arch}${is_llvm}.dotnet.console.exe ${templatesdir_dotnet}/windows_release_${arch}_console.exe
|
||||
done
|
||||
|
||||
## macOS (.NET) ##
|
||||
|
||||
# Editor
|
||||
binname="${godot_basename}_dotnet_macos.universal"
|
||||
rm -rf Godot_dotnet.app
|
||||
cp -r git/misc/dist/macos_tools.app Godot_dotnet.app
|
||||
mkdir -p Godot_dotnet.app/Contents/MacOS
|
||||
cp out/macos/tools-dotnet/godot.macos.editor.universal.dotnet Godot_dotnet.app/Contents/MacOS/Godot
|
||||
chmod +x Godot_dotnet.app/Contents/MacOS/Godot
|
||||
zip -q -9 -r "${reldir_dotnet}/${binname}.zip" Godot_dotnet.app
|
||||
rm -rf Godot_dotnet.app
|
||||
sign_macos ${reldir_dotnet} ${binname} Godot_dotnet.app
|
||||
|
||||
# Templates
|
||||
rm -rf macos_template.app
|
||||
cp -r git/misc/dist/macos_template.app .
|
||||
mkdir -p macos_template.app/Contents/MacOS
|
||||
cp out/macos/templates-dotnet/godot.macos.template_debug.universal.dotnet macos_template.app/Contents/MacOS/godot_macos_debug.universal
|
||||
cp out/macos/templates-dotnet/godot.macos.template_release.universal.dotnet macos_template.app/Contents/MacOS/godot_macos_release.universal
|
||||
chmod +x macos_template.app/Contents/MacOS/godot_macos*
|
||||
zip -q -9 -r "${templatesdir_dotnet}/macos.zip" macos_template.app
|
||||
rm -rf macos_template.app
|
||||
sign_macos_template ${templatesdir_dotnet}
|
||||
|
||||
## Android (.NET) ##
|
||||
|
||||
# Lib for direct download
|
||||
cp out/android/templates-dotnet/godot-lib.template_release.aar ${reldir_dotnet}/godot-lib.${templates_version}.dotnet.template_release.aar
|
||||
|
||||
# Templates
|
||||
cp out/android/templates-dotnet/*.apk ${templatesdir_dotnet}/
|
||||
cp out/android/templates-dotnet/android_source.zip ${templatesdir_dotnet}/
|
||||
|
||||
## iOS (.NET) ##
|
||||
|
||||
rm -rf ios_xcode
|
||||
cp -r git/misc/dist/apple_embedded_xcode ios_xcode
|
||||
cp out/ios/templates-dotnet/libgodot.ios.simulator.a ios_xcode/libgodot.ios.release.xcframework/ios-arm64_x86_64-simulator/libgodot.a
|
||||
cp out/ios/templates-dotnet/libgodot.ios.debug.simulator.a ios_xcode/libgodot.ios.debug.xcframework/ios-arm64_x86_64-simulator/libgodot.a
|
||||
cp out/ios/templates-dotnet/libgodot.ios.a ios_xcode/libgodot.ios.release.xcframework/ios-arm64/libgodot.a
|
||||
cp out/ios/templates-dotnet/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_dotnet}/ios.zip" *
|
||||
cd ..
|
||||
rm -rf ios_xcode
|
||||
|
||||
## visionOS (.NET) ##
|
||||
|
||||
#rm -rf visionos_xcode
|
||||
#cp -r git/misc/dist/apple_embedded_xcode visionos_xcode
|
||||
#cp out/visionos/templates-dotnet/libgodot.visionos.a visionos_xcode/libgodot.visionos.release.xcframework/xros-arm64/libgodot.a
|
||||
#cp out/visionos/templates-dotnet/libgodot.visionos.debug.a visionos_xcode/libgodot.visionos.debug.xcframework/xros-arm64/libgodot.a
|
||||
#cd visionos_xcode
|
||||
#zip -q -9 -r "${templatesdir_dotnet}/visionos.zip" *
|
||||
#cd ..
|
||||
#rm -rf visionos_xcode
|
||||
|
||||
# No .NET support for those platforms yet.
|
||||
|
||||
if false; then
|
||||
|
||||
## Web (.NET) ##
|
||||
|
||||
# Templates
|
||||
cp out/web/templates-dotnet/godot.web.template_debug.wasm32.dotnet.zip ${templatesdir_dotnet}/web_debug.zip
|
||||
cp out/web/templates-dotnet/godot.web.template_release.wasm32.dotnet.zip ${templatesdir_dotnet}/web_release.zip
|
||||
|
||||
fi
|
||||
|
||||
## Templates TPZ (.NET) ##
|
||||
|
||||
echo "${templates_version}.dotnet" > ${templatesdir_dotnet}/version.txt
|
||||
pushd ${templatesdir_dotnet}/..
|
||||
zip -q -9 -r -D "${reldir_dotnet}/${godot_basename}_dotnet_export_templates.tpz" templates/*
|
||||
popd
|
||||
|
||||
## .NET bindings ##
|
||||
|
||||
dotnetname="godot-dotnet-${templates_version}"
|
||||
mkdir ${dotnetname}
|
||||
cp out/dotnet/* ${dotnetname}/
|
||||
zip -q -9 -r "${reldir_dotnet}/${dotnetname}.zip" ${dotnetname}
|
||||
rm -rf ${dotnetname}
|
||||
|
||||
## SHA-512 sums (.NET) ##
|
||||
|
||||
pushd ${reldir_dotnet}
|
||||
sha512sum [Gg]* >> SHA512-SUMS.txt
|
||||
mkdir -p ${basedir}/sha512sums/${godot_version}/dotnet
|
||||
cp SHA512-SUMS.txt ${basedir}/sha512sums/${godot_version}/dotnet/
|
||||
popd
|
||||
|
||||
fi
|
||||
|
||||
echo "All editor binaries and templates prepared successfully for release"
|
||||
|
||||
61
build-server/build.sh
Executable file
61
build-server/build.sh
Executable file
@@ -0,0 +1,61 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Config
|
||||
|
||||
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
|
||||
export OPTIONS="production=yes"
|
||||
export OPTIONS_MONO="module_mono_enabled=yes mono_static=yes"
|
||||
export TERM=xterm
|
||||
export CC="gcc-9"
|
||||
export CXX="g++-9"
|
||||
|
||||
rm -rf godot
|
||||
mkdir godot
|
||||
cd godot
|
||||
tar xf /root/godot.tar.gz --strip-components=1
|
||||
|
||||
# Classical
|
||||
|
||||
if [ "${CLASSICAL}" == "1" ]; then
|
||||
echo "Starting classical build for Server..."
|
||||
|
||||
$SCONS platform=server CC=$CC CXX=$CXX $OPTIONS tools=yes target=release_debug
|
||||
mkdir -p /root/out/tools
|
||||
cp -rvp bin/* /root/out/tools
|
||||
rm -rf bin
|
||||
|
||||
#$SCONS platform=server CC=$CC CXX=$CXX $OPTIONS tools=no target=release_debug
|
||||
$SCONS platform=server CC=$CC CXX=$CXX $OPTIONS tools=no target=release
|
||||
mkdir -p /root/out/templates
|
||||
cp -rvp bin/* /root/out/templates
|
||||
rm -rf bin
|
||||
fi
|
||||
|
||||
# Mono
|
||||
|
||||
if [ "${MONO}" == "1" ]; then
|
||||
echo "Starting Mono build for Server..."
|
||||
|
||||
cp /root/mono-glue/*.cpp modules/mono/glue/
|
||||
cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/
|
||||
cp -r /root/mono-glue/GodotSharp/GodotSharpEditor/Generated modules/mono/glue/GodotSharp/GodotSharpEditor/
|
||||
|
||||
# Workaround for MSBuild segfault on Ubuntu containers, we build the CIL on Fedora and copy here.
|
||||
mkdir -p bin
|
||||
cp -r /root/mono-glue/cil/GodotSharp bin/
|
||||
|
||||
$SCONS platform=server CC=$CC CXX=$CXX $OPTIONS $OPTIONS_MONO tools=yes target=release_debug copy_mono_root=yes build_cil=no
|
||||
mkdir -p /root/out/tools-mono
|
||||
cp -rvp bin/* /root/out/tools-mono
|
||||
rm -rf bin
|
||||
|
||||
#$SCONS platform=server CC=$CC CXX=$CXX $OPTIONS $OPTIONS_MONO tools=no target=release_debug
|
||||
$SCONS platform=server CC=$CC CXX=$CXX $OPTIONS $OPTIONS_MONO tools=no target=release
|
||||
mkdir -p /root/out/templates-mono
|
||||
cp -rvp bin/* /root/out/templates-mono
|
||||
rm -rf bin
|
||||
fi
|
||||
|
||||
echo "Server build successful"
|
||||
3
build-uwp/build.bat
Executable file
3
build-uwp/build.bat
Executable file
@@ -0,0 +1,3 @@
|
||||
call z:\root\build\env-%1.bat
|
||||
|
||||
%SCONS% platform=uwp %OPTIONS% tools=no target=%2 LINK="\"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX64\%1\link.exe\""
|
||||
43
build-uwp/build.sh
Executable file
43
build-uwp/build.sh
Executable file
@@ -0,0 +1,43 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Config
|
||||
|
||||
export SCONS="call scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
|
||||
export OPTIONS="production=yes"
|
||||
export BUILD_ARCHES="x86 x64 arm"
|
||||
export ANGLE_SRC_PATH='c:\angle'
|
||||
|
||||
rm -rf godot
|
||||
mkdir godot
|
||||
cd godot
|
||||
tar xf /root/godot.tar.gz --strip-components=1
|
||||
|
||||
# Classical
|
||||
|
||||
if [ "${CLASSICAL}" == "1" ]; then
|
||||
echo "Starting classical build for UWP..."
|
||||
|
||||
for arch in ${BUILD_ARCHES}; do
|
||||
for release in release release_debug; do
|
||||
wine cmd /c /root/build/build.bat $arch $release
|
||||
|
||||
sync
|
||||
wineserver -kw
|
||||
|
||||
mkdir -p /root/out/$arch
|
||||
mv bin/* /root/out/$arch
|
||||
done
|
||||
done
|
||||
fi
|
||||
|
||||
# Mono
|
||||
|
||||
if [ "${MONO}" == "1" ]; then
|
||||
echo "No Mono support for UWP yet."
|
||||
#cp /root/mono-glue/*.cpp modules/mono/glue/
|
||||
#cp -r /root/mono-glue/Managed/Generated modules/mono/glue/Managed/
|
||||
fi
|
||||
|
||||
echo "UWP build successful"
|
||||
36
build-uwp/env-arm.bat
Executable file
36
build-uwp/env-arm.bat
Executable file
@@ -0,0 +1,36 @@
|
||||
set ALLUSERSPROFILE=C:\ProgramData
|
||||
set CommandPromptType=Native
|
||||
set CommonProgramFiles=C:\Program Files\Common Files
|
||||
set CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
|
||||
set CommonProgramW6432=C:\Program Files\Common Files
|
||||
set DevEnvDir=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\
|
||||
set ExtensionSdkDir=C:\Program Files (x86)\Microsoft SDKs\Windows Kits\10\ExtensionSDKs
|
||||
set Framework40Version=v4.0
|
||||
set FrameworkDir=C:\Windows\Microsoft.NET\Framework64\
|
||||
set FrameworkDir64=C:\Windows\Microsoft.NET\Framework64\
|
||||
set FrameworkVersion=v4.0.30319
|
||||
set FrameworkVersion64=v4.0.30319
|
||||
set VCIDEInstallDir=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\
|
||||
set VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\
|
||||
set VCToolsInstallDir=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\
|
||||
set VCToolsRedistDir=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Redist\MSVC\14.16.27012\
|
||||
set VCToolsVersion=14.16.27023
|
||||
set VisualStudioVersion=15.0
|
||||
set VS150COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\
|
||||
set VSCMD_ARG_app_plat=UWP
|
||||
set Platform=arm
|
||||
set VSCMD_ARG_HOST_ARCH=x86
|
||||
set VSCMD_ARG_TGT_ARCH=arm
|
||||
set VSCMD_ARG_winsdk=10.0.16299.0
|
||||
set VSCMD_VER=15.0
|
||||
set VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\
|
||||
set Path=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\arm;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\VCPackages;C:\Program Files (x86)\Microsoft Visual Studio\2017\Build Tools\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\bin\Roslyn;C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\arm;C:\Program Files (x86)\Windows Kits\10\bin\arm;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\\MSBuild\15.0\bin;C:\Windows\Microsoft.NET\Framework\ v4.0.30319;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\;C:\Program Files\Python37\Scripts\;C:\Program Files\Python37\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\ProgramData\chocolatey\bin;C:\Program Files\OpenSSH-Win64;C:\Program Files\Git\cmd;C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps;C:\Users\user\AppData\Local\Microsoft\WindowsApps;
|
||||
set INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include;C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt;C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared;C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um;C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt;C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\cppwinrt
|
||||
set LIB=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\lib\arm\store\;C:\Program Files (x86)\Windows Kits\10\lib\10.0.16299.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\lib\10.0.16299.0\um\arm;
|
||||
set LIBPATH=C:\Program Files (x86)\Microsoft SDKs\Windows Kits\10\ExtensionSDKs\Microsoft.VCLibs\14.0\References\CommonConfiguration\neutral;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\lib\arm\store\references;C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.16299.0;C:\Program Files (x86)\Windows Kits\10\References\10.0.16299.0;C:\Windows\Microsoft.NET\Framework\v4.0.30319;
|
||||
set WindowsLibPath=C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.16299.0;C:\Program Files (x86)\Windows Kits\10\References\10.0.16299.0
|
||||
set WindowsSdkBinPath=C:\Program Files (x86)\Windows Kits\10\bin\
|
||||
set WindowsSdkDir=C:\Program Files (x86)\Windows Kits\10\
|
||||
set WindowsSDKLibVersion=10.0.16299.0\
|
||||
set WindowsSdkVerBinPath=C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\
|
||||
set WindowsSDKVersion=10.0.16299.0\
|
||||
35
build-uwp/env-x64.bat
Executable file
35
build-uwp/env-x64.bat
Executable file
@@ -0,0 +1,35 @@
|
||||
set ALLUSERSPROFILE=C:\ProgramData
|
||||
set CommandPromptType=Native
|
||||
set CommonProgramFiles=C:\Program Files\Common Files
|
||||
set CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
|
||||
set CommonProgramW6432=C:\Program Files\Common Files
|
||||
set DevEnvDir=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\
|
||||
set ExtensionSdkDir=C:\Program Files (x86)\Microsoft SDKs\Windows Kits\10\ExtensionSDKs
|
||||
set Framework40Version=v4.0
|
||||
set FrameworkDir=C:\Windows\Microsoft.NET\Framework64\
|
||||
set FrameworkDir64=C:\Windows\Microsoft.NET\Framework64\
|
||||
set FrameworkVersion=v4.0.30319
|
||||
set FrameworkVersion64=v4.0.30319
|
||||
set VCIDEInstallDir=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\
|
||||
set VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\
|
||||
set VCToolsInstallDir=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\
|
||||
set VCToolsRedistDir=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Redist\MSVC\14.16.27012\
|
||||
set VCToolsVersion=14.16.27023
|
||||
set VisualStudioVersion=15.0
|
||||
set VS150COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\
|
||||
set VSCMD_ARG_app_plat=UWP
|
||||
set VSCMD_ARG_HOST_ARCH=x86
|
||||
set VSCMD_ARG_TGT_ARCH=x64
|
||||
set VSCMD_ARG_winsdk=10.0.16299.0
|
||||
set VSCMD_VER=15.0
|
||||
set VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\
|
||||
set Path=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\VCPackages;C:\Program Files (x86)\Microsoft Visual Studio\2017\Build Tools\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\bin\Roslyn;C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x64;C:\Program Files (x86)\Windows Kits\10\bin\x64;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\\MSBuild\15.0\bin;C:\Windows\Microsoft.NET\Framework\ v4.0.30319;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\;C:\Program Files\Python37\Scripts\;C:\Program Files\Python37\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\ProgramData\chocolatey\bin;C:\Program Files\OpenSSH-Win64;C:\Program Files\Git\cmd;C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps;C:\Users\user\AppData\Local\Microsoft\WindowsApps;
|
||||
set INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include;C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt;C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared;C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um;C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt;C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\cppwinrt
|
||||
set LIB=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\lib\x64\store\;C:\Program Files (x86)\Windows Kits\10\lib\10.0.16299.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\lib\10.0.16299.0\um\x64;
|
||||
set LIBPATH=C:\Program Files (x86)\Microsoft SDKs\Windows Kits\10\ExtensionSDKs\Microsoft.VCLibs\14.0\References\CommonConfiguration\neutral;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\lib\x64\store\references;C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.16299.0;C:\Program Files (x86)\Windows Kits\10\References\10.0.16299.0;C:\Windows\Microsoft.NET\Framework\v4.0.30319;
|
||||
set WindowsLibPath=C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.16299.0;C:\Program Files (x86)\Windows Kits\10\References\10.0.16299.0
|
||||
set WindowsSdkBinPath=C:\Program Files (x86)\Windows Kits\10\bin\
|
||||
set WindowsSdkDir=C:\Program Files (x86)\Windows Kits\10\
|
||||
set WindowsSDKLibVersion=10.0.16299.0\
|
||||
set WindowsSdkVerBinPath=C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\
|
||||
set WindowsSDKVersion=10.0.16299.0\
|
||||
36
build-uwp/env-x86.bat
Executable file
36
build-uwp/env-x86.bat
Executable file
@@ -0,0 +1,36 @@
|
||||
set ALLUSERSPROFILE=C:\ProgramData
|
||||
set CommandPromptType=Native
|
||||
set CommonProgramFiles=C:\Program Files\Common Files
|
||||
set CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
|
||||
set CommonProgramW6432=C:\Program Files\Common Files
|
||||
set DevEnvDir=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\
|
||||
set ExtensionSdkDir=C:\Program Files (x86)\Microsoft SDKs\Windows Kits\10\ExtensionSDKs
|
||||
set Framework40Version=v4.0
|
||||
set FrameworkDir=C:\Windows\Microsoft.NET\Framework64\
|
||||
set FrameworkDir64=C:\Windows\Microsoft.NET\Framework64\
|
||||
set FrameworkVersion=v4.0.30319
|
||||
set FrameworkVersion64=v4.0.30319
|
||||
set VCIDEInstallDir=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\
|
||||
set VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\
|
||||
set VCToolsInstallDir=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\
|
||||
set VCToolsRedistDir=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Redist\MSVC\14.16.27012\
|
||||
set VCToolsVersion=14.16.27023
|
||||
set VisualStudioVersion=15.0
|
||||
set VS150COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\
|
||||
set VSCMD_ARG_app_plat=UWP
|
||||
set VSCMD_ARG_HOST_ARCH=x86
|
||||
set VSCMD_ARG_TGT_ARCH=x86
|
||||
set VSCMD_ARG_winsdk=10.0.16299.0
|
||||
set VSCMD_VER=15.0
|
||||
set VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\
|
||||
set Path=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\VCPackages;C:\Program Files (x86)\Microsoft Visual Studio\2017\Build Tools\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\bin\Roslyn;C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x86;C:\Program Files (x86)\Windows Kits\10\bin\x86;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\\MSBuild\15.0\bin;C:\Windows\Microsoft.NET\Framework\ v4.0.30319;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\;C:\Program Files\Python37\Scripts\;C:\Program Files\Python37\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\ProgramData\chocolatey\bin;C:\Program Files\OpenSSH-Win64;C:\Program Files\Git\cmd;C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps;C:\Users\user\AppData\Local\Microsoft\WindowsApps;
|
||||
set INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include;C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt;C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared;C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um;C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt;C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\cppwinrt
|
||||
set LIB=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\lib\x86\store\;C:\Program Files (x86)\Windows Kits\10\lib\10.0.16299.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\lib\10.0.16299.0\um\x86;
|
||||
set LIBPATH=C:\Program Files (x86)\Microsoft SDKs\Windows Kits\10\ExtensionSDKs\Microsoft.VCLibs\14.0\References\CommonConfiguration\neutral;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\lib\x86\store\references;C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.16299.0;C:\Program Files (x86)\Windows Kits\10\References\10.0.16299.0;C:\Windows\Microsoft.NET\Framework\v4.0.30319;
|
||||
set WindowsLibPath=C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.16299.0;C:\Program Files (x86)\Windows Kits\10\References\10.0.16299.0
|
||||
set WindowsSdkBinPath=C:\Program Files (x86)\Windows Kits\10\bin\
|
||||
set WindowsSdkDir=C:\Program Files (x86)\Windows Kits\10\
|
||||
set WindowsSDKLibVersion=10.0.16299.0\
|
||||
set WindowsSdkVerBinPath=C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\
|
||||
set WindowsSDKVersion=10.0.16299.0\
|
||||
|
||||
@@ -1,82 +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 SWIFT_FRONTEND=/root/.local/share/swiftly/toolchains/6.2.0/usr/bin/swift-frontend"
|
||||
export OPTIONS_MONO="module_mono_enabled=yes"
|
||||
export OPTIONS_DOTNET="module_dotnet_enabled=yes"
|
||||
export TERM=xterm
|
||||
|
||||
export VISIONOS_SDK="26.0"
|
||||
export VISIONOS_DEVICE="VISIONOS_SDK_PATH=/root/Xcode.app/Contents/Developer/Platforms/XROS.platform/Developer/SDKs/XROS${VISIONOS_SDK}.sdk"
|
||||
export VISIONOS_SIMULATOR="VISIONOS_SDK_PATH=/root/Xcode.app/Contents/Developer/Platforms/XRSimulator.platform/Developer/SDKs/XRSimulator${VISIONOS_SDK}.sdk"
|
||||
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
|
||||
|
||||
# .NET
|
||||
|
||||
if [ "${DOTNET}" == "1" ]; then
|
||||
echo "Starting .NET build for visionOS..."
|
||||
|
||||
# arm64 device
|
||||
$SCONS platform=visionos $OPTIONS $OPTIONS_DOTNET arch=arm64 target=template_debug $VISIONOS_DEVICE $APPLE_TARGET_ARM64
|
||||
$SCONS platform=visionos $OPTIONS $OPTIONS_DOTNET arch=arm64 target=template_release $VISIONOS_DEVICE $APPLE_TARGET_ARM64
|
||||
|
||||
# arm64 simulator (disabled for now, see build-ios)
|
||||
#$SCONS platform=visionos $OPTIONS $OPTIONS_DOTNET arch=arm64 target=template_debug $VISIONOS_SIMULATOR $APPLE_TARGET_ARM64
|
||||
#$SCONS platform=visionos $OPTIONS $OPTIONS_DOTNET arch=arm64 target=template_release $VISIONOS_SIMULATOR $APPLE_TARGET_ARM64
|
||||
|
||||
mkdir -p /root/out/templates-dotnet
|
||||
cp bin/libgodot.visionos.template_release.arm64.a /root/out/templates-dotnet/libgodot.visionos.a
|
||||
cp bin/libgodot.visionos.template_debug.arm64.a /root/out/templates-dotnet/libgodot.visionos.debug.a
|
||||
fi
|
||||
|
||||
echo "visionOS build successful"
|
||||
@@ -1,120 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Config
|
||||
|
||||
# To speed up builds with single-threaded full LTO linking,
|
||||
# we run all builds in parallel each from their own folder.
|
||||
export NUM_JOBS=5
|
||||
declare -a JOBS=(
|
||||
"target=template_debug"
|
||||
"target=template_release"
|
||||
"target=template_debug dlink_enabled=yes"
|
||||
"target=template_release dlink_enabled=yes"
|
||||
)
|
||||
declare -a JOBS_NOTHREADS=(
|
||||
"target=template_debug threads=no"
|
||||
"target=template_release threads=no"
|
||||
"target=template_debug dlink_enabled=yes threads=no"
|
||||
"target=template_release dlink_enabled=yes threads=no"
|
||||
)
|
||||
|
||||
export SCONS="scons -j$(expr ${NUM_CORES} / ${NUM_JOBS}) verbose=yes warnings=no progress=no redirect_build_objects=no"
|
||||
export OPTIONS="production=yes"
|
||||
export OPTIONS_MONO="module_mono_enabled=yes -j${NUM_CORES}"
|
||||
export OPTIONS_MONO="module_dotnet_enabled=yes -j${NUM_CORES}"
|
||||
export TERM=xterm
|
||||
|
||||
source /root/emsdk/emsdk_env.sh
|
||||
|
||||
rm -rf godot
|
||||
mkdir godot
|
||||
cd godot
|
||||
tar xf /root/godot.tar.gz --strip-components=1
|
||||
|
||||
# Classical
|
||||
|
||||
if [ "${CLASSICAL}" == "1" ]; then
|
||||
echo "Starting classical build for Web..."
|
||||
|
||||
for i in {0..3}; do
|
||||
cp -r /root/godot /root/godot$i
|
||||
cd /root/godot$i
|
||||
echo "$SCONS platform=web ${OPTIONS} ${JOBS[$i]}"
|
||||
$SCONS platform=web ${OPTIONS} ${JOBS[$i]} &
|
||||
pids[$i]=$!
|
||||
done
|
||||
|
||||
cd /root/godot
|
||||
echo "$SCONS platform=web ${OPTIONS} target=editor use_closure_compiler=yes"
|
||||
$SCONS platform=web ${OPTIONS} target=editor use_closure_compiler=yes &
|
||||
pid_editor=$!
|
||||
|
||||
for pid in ${pids[*]}; do
|
||||
wait $pid
|
||||
done
|
||||
wait $pid_editor
|
||||
|
||||
for i in {0..3}; do
|
||||
cp -r /root/godot /root/godot-nothreads$i
|
||||
cd /root/godot-nothreads$i
|
||||
echo "$SCONS platform=web ${OPTIONS} ${JOBS_NOTHREADS[$i]}"
|
||||
$SCONS platform=web ${OPTIONS} ${JOBS_NOTHREADS[$i]} &
|
||||
pids_nothreads[$i]=$!
|
||||
done
|
||||
|
||||
for pid in ${pids_nothreads[*]}; do
|
||||
wait $pid
|
||||
done
|
||||
|
||||
mkdir -p /root/out/tools
|
||||
cp -rvp /root/godot/bin/*.editor*.zip /root/out/tools
|
||||
|
||||
mkdir -p /root/out/templates
|
||||
for i in {0..3}; do
|
||||
cp -rvp /root/godot$i/bin/*.zip /root/out/templates
|
||||
cp -rvp /root/godot-nothreads$i/bin/*.zip /root/out/templates
|
||||
done
|
||||
fi
|
||||
|
||||
# Mono
|
||||
|
||||
# No Web support with .NET 6 yet.
|
||||
#if [ "${MONO}" == "1" ]; then
|
||||
if false; then
|
||||
echo "Starting Mono build for Web..."
|
||||
|
||||
cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/
|
||||
|
||||
$SCONS platform=web ${OPTIONS} ${OPTIONS_MONO} target=template_debug
|
||||
$SCONS platform=web ${OPTIONS} ${OPTIONS_MONO} target=template_release
|
||||
|
||||
mkdir -p /root/out/templates-mono
|
||||
cp -rvp bin/*.zip /root/out/templates-mono
|
||||
rm -f bin/*.zip
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
# .NET
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# No Web support with .NET yet.
|
||||
#if [ "${DOTNET}" == "1" ]; then
|
||||
if false; then
|
||||
echo "Starting .NET build for Web..."
|
||||
|
||||
$SCONS platform=web ${OPTIONS} ${OPTIONS_DOTNET} target=template_debug
|
||||
$SCONS platform=web ${OPTIONS} ${OPTIONS_DOTNET} target=template_release
|
||||
|
||||
mkdir -p /root/out/templates-dotnet
|
||||
cp -rvp bin/*.zip /root/out/templates-dotnet
|
||||
rm -f bin/*.zip
|
||||
fi
|
||||
|
||||
echo "Web build successful"
|
||||
@@ -4,12 +4,12 @@ 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 OPTIONS_MONO="module_mono_enabled=yes"
|
||||
export OPTIONS_DOTNET="module_dotnet_enabled=yes"
|
||||
export OPTIONS_LLVM="use_llvm=yes mingw_prefix=/root/llvm-mingw"
|
||||
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
|
||||
export OPTIONS="production=yes"
|
||||
export OPTIONS_MONO="module_mono_enabled=yes mono_static=yes"
|
||||
export TERM=xterm
|
||||
export MONO32_PREFIX=/root/dependencies/mono-32
|
||||
export MONO64_PREFIX=/root/dependencies/mono-64
|
||||
|
||||
rm -rf godot
|
||||
mkdir godot
|
||||
@@ -21,49 +21,27 @@ tar xf /root/godot.tar.gz --strip-components=1
|
||||
if [ "${CLASSICAL}" == "1" ]; then
|
||||
echo "Starting classical build for Windows..."
|
||||
|
||||
$SCONS platform=windows arch=x86_64 $OPTIONS target=editor
|
||||
mkdir -p /root/out/x86_64/tools
|
||||
cp -rvp bin/* /root/out/x86_64/tools
|
||||
$SCONS platform=windows bits=64 $OPTIONS tools=yes target=release_debug
|
||||
mkdir -p /root/out/x64/tools
|
||||
cp -rvp bin/* /root/out/x64/tools
|
||||
rm -rf bin
|
||||
|
||||
$SCONS platform=windows arch=x86_64 $OPTIONS target=template_debug
|
||||
$SCONS platform=windows arch=x86_64 $OPTIONS target=template_release
|
||||
mkdir -p /root/out/x86_64/templates
|
||||
cp -rvp bin/* /root/out/x86_64/templates
|
||||
$SCONS platform=windows bits=64 $OPTIONS tools=no target=release_debug
|
||||
$SCONS platform=windows bits=64 $OPTIONS tools=no target=release
|
||||
mkdir -p /root/out/x64/templates
|
||||
cp -rvp bin/* /root/out/x64/templates
|
||||
rm -rf bin
|
||||
|
||||
$SCONS platform=windows arch=x86_32 $OPTIONS target=editor
|
||||
mkdir -p /root/out/x86_32/tools
|
||||
cp -rvp bin/* /root/out/x86_32/tools
|
||||
$SCONS platform=windows bits=32 $OPTIONS tools=yes target=release_debug
|
||||
mkdir -p /root/out/x86/tools
|
||||
cp -rvp bin/* /root/out/x86/tools
|
||||
rm -rf bin
|
||||
|
||||
$SCONS platform=windows arch=x86_32 $OPTIONS target=template_debug
|
||||
$SCONS platform=windows arch=x86_32 $OPTIONS target=template_release
|
||||
mkdir -p /root/out/x86_32/templates
|
||||
cp -rvp bin/* /root/out/x86_32/templates
|
||||
$SCONS platform=windows bits=32 $OPTIONS tools=no target=release_debug
|
||||
$SCONS platform=windows bits=32 $OPTIONS tools=no target=release
|
||||
mkdir -p /root/out/x86/templates
|
||||
cp -rvp bin/* /root/out/x86/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
|
||||
@@ -71,82 +49,30 @@ fi
|
||||
if [ "${MONO}" == "1" ]; then
|
||||
echo "Starting Mono build for Windows..."
|
||||
|
||||
cp /root/mono-glue/*.cpp modules/mono/glue/
|
||||
cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/
|
||||
cp -r /root/mono-glue/GodotSharp/GodotSharpEditor/Generated modules/mono/glue/GodotSharp/GodotSharpEditor/
|
||||
|
||||
$SCONS platform=windows arch=x86_64 $OPTIONS $OPTIONS_MONO target=editor
|
||||
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=windows
|
||||
mkdir -p /root/out/x86_64/tools-mono
|
||||
cp -rvp bin/* /root/out/x86_64/tools-mono
|
||||
$SCONS platform=windows bits=64 $OPTIONS $OPTIONS_MONO mono_prefix=$MONO64_PREFIX tools=yes target=release_debug copy_mono_root=yes
|
||||
mkdir -p /root/out/x64/tools-mono
|
||||
cp -rvp bin/* /root/out/x64/tools-mono
|
||||
rm -rf bin
|
||||
|
||||
$SCONS platform=windows arch=x86_64 $OPTIONS $OPTIONS_MONO target=template_debug
|
||||
$SCONS platform=windows arch=x86_64 $OPTIONS $OPTIONS_MONO target=template_release
|
||||
mkdir -p /root/out/x86_64/templates-mono
|
||||
cp -rvp bin/* /root/out/x86_64/templates-mono
|
||||
$SCONS platform=windows bits=64 $OPTIONS $OPTIONS_MONO mono_prefix=$MONO64_PREFIX tools=no target=release_debug
|
||||
$SCONS platform=windows bits=64 $OPTIONS $OPTIONS_MONO mono_prefix=$MONO64_PREFIX tools=no target=release
|
||||
mkdir -p /root/out/x64/templates-mono
|
||||
cp -rvp bin/* /root/out/x64/templates-mono
|
||||
rm -rf bin
|
||||
|
||||
$SCONS platform=windows arch=x86_32 $OPTIONS $OPTIONS_MONO target=editor
|
||||
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=windows
|
||||
mkdir -p /root/out/x86_32/tools-mono
|
||||
cp -rvp bin/* /root/out/x86_32/tools-mono
|
||||
$SCONS platform=windows bits=32 $OPTIONS $OPTIONS_MONO mono_prefix=$MONO32_PREFIX tools=yes target=release_debug copy_mono_root=yes
|
||||
mkdir -p /root/out/x86/tools-mono
|
||||
cp -rvp bin/* /root/out/x86/tools-mono
|
||||
rm -rf bin
|
||||
|
||||
$SCONS platform=windows arch=x86_32 $OPTIONS $OPTIONS_MONO target=template_debug
|
||||
$SCONS platform=windows arch=x86_32 $OPTIONS $OPTIONS_MONO target=template_release
|
||||
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
|
||||
|
||||
# .NET
|
||||
|
||||
if [ "${DOTNET}" == "1" ]; then
|
||||
echo "Starting .NET build for Windows..."
|
||||
|
||||
$SCONS platform=windows arch=x86_64 $OPTIONS $OPTIONS_DOTNET target=editor
|
||||
mkdir -p /root/out/x86_64/tools-dotnet
|
||||
cp -rvp bin/* /root/out/x86_64/tools-dotnet
|
||||
rm -rf bin
|
||||
|
||||
$SCONS platform=windows arch=x86_64 $OPTIONS $OPTIONS_DOTNET target=template_debug
|
||||
$SCONS platform=windows arch=x86_64 $OPTIONS $OPTIONS_DOTNET target=template_release
|
||||
mkdir -p /root/out/x86_64/templates-dotnet
|
||||
cp -rvp bin/* /root/out/x86_64/templates-dotnet
|
||||
rm -rf bin
|
||||
|
||||
$SCONS platform=windows arch=x86_32 $OPTIONS $OPTIONS_DOTNET target=editor
|
||||
mkdir -p /root/out/x86_32/tools-dotnet
|
||||
cp -rvp bin/* /root/out/x86_32/tools-dotnet
|
||||
rm -rf bin
|
||||
|
||||
$SCONS platform=windows arch=x86_32 $OPTIONS $OPTIONS_DOTNET target=template_debug
|
||||
$SCONS platform=windows arch=x86_32 $OPTIONS $OPTIONS_DOTNET target=template_release
|
||||
mkdir -p /root/out/x86_32/templates-dotnet
|
||||
cp -rvp bin/* /root/out/x86_32/templates-dotnet
|
||||
rm -rf bin
|
||||
|
||||
$SCONS platform=windows arch=arm64 $OPTIONS $OPTIONS_DOTNET $OPTIONS_LLVM target=editor
|
||||
mkdir -p /root/out/arm64/tools-dotnet
|
||||
cp -rvp bin/* /root/out/arm64/tools-dotnet
|
||||
rm -rf bin
|
||||
|
||||
$SCONS platform=windows arch=arm64 $OPTIONS $OPTIONS_DOTNET $OPTIONS_LLVM target=template_debug
|
||||
$SCONS platform=windows arch=arm64 $OPTIONS $OPTIONS_DOTNET $OPTIONS_LLVM target=template_release
|
||||
mkdir -p /root/out/arm64/templates-dotnet
|
||||
cp -rvp bin/* /root/out/arm64/templates-dotnet
|
||||
$SCONS platform=windows bits=32 $OPTIONS $OPTIONS_MONO mono_prefix=$MONO32_PREFIX tools=no target=release_debug
|
||||
$SCONS platform=windows bits=32 $OPTIONS $OPTIONS_MONO mono_prefix=$MONO32_PREFIX tools=no target=release
|
||||
mkdir -p /root/out/x86/templates-mono
|
||||
cp -rvp bin/* /root/out/x86/templates-mono
|
||||
rm -rf bin
|
||||
fi
|
||||
|
||||
|
||||
175
build.sh
175
build.sh
@@ -4,14 +4,6 @@ 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.
|
||||
@@ -36,8 +28,6 @@ godot_version=""
|
||||
git_treeish="master"
|
||||
build_classical=1
|
||||
build_mono=1
|
||||
build_dotnet=0
|
||||
build_steam=0
|
||||
force_download=0
|
||||
skip_download=1
|
||||
skip_git_checkout=0
|
||||
@@ -52,7 +42,7 @@ while getopts "h?r:u:p:v:g:b:fsc" opt; do
|
||||
echo " -p password"
|
||||
echo " -v godot version (e.g. 3.1-alpha5) [mandatory]"
|
||||
echo " -g git treeish (e.g. master)"
|
||||
echo " -b all|classical|mono|dotnet (default: all)"
|
||||
echo " -b all|classical|mono (default: all)"
|
||||
echo " -f force redownload of all images"
|
||||
echo " -s skip downloading"
|
||||
echo " -c skip checkout"
|
||||
@@ -76,17 +66,9 @@ while getopts "h?r:u:p:v:g:b:fsc" opt; do
|
||||
;;
|
||||
b)
|
||||
if [ "$OPTARG" == "classical" ]; then
|
||||
build_classical=1
|
||||
build_mono=0
|
||||
build_dotnet=0
|
||||
elif [ "$OPTARG" == "mono" ]; then
|
||||
build_classical=0
|
||||
build_mono=1
|
||||
build_dotnet=0
|
||||
elif [ "$OPTARG" == "dotnet" ]; then
|
||||
build_classical=0
|
||||
build_mono=0
|
||||
build_dotnet=1
|
||||
fi
|
||||
;;
|
||||
f)
|
||||
@@ -101,7 +83,21 @@ while getopts "h?r:u:p:v:g:b:fsc" opt; do
|
||||
esac
|
||||
done
|
||||
|
||||
export podman=${PODMAN}
|
||||
export podman=none
|
||||
if which podman > /dev/null; then
|
||||
export podman=podman
|
||||
elif which docker > /dev/null; then
|
||||
export podman=docker
|
||||
fi
|
||||
|
||||
if [ "${podman}" == "none" ]; then
|
||||
echo "Either podman or docker needs to be installed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $UID != 0 ]; then
|
||||
echo "WARNING: Running as non-root may cause problems for the uwp build"
|
||||
fi
|
||||
|
||||
if [ -z "${godot_version}" ]; then
|
||||
echo "-v <version> is mandatory!"
|
||||
@@ -118,10 +114,6 @@ 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
|
||||
@@ -130,7 +122,7 @@ fi
|
||||
|
||||
if [ $skip_download == 0 ]; then
|
||||
echo "Fetching images"
|
||||
for image in windows linux web; do
|
||||
for image in mono-glue windows ubuntu-64 ubuntu-32 javascript; do
|
||||
if [ ${force_download} == 1 ] || ! ${podman} image exists godot/$image; then
|
||||
if ! ${podman} pull ${registry}/godot/${image}; then
|
||||
echo "ERROR: image $image does not exist and can't be downloaded"
|
||||
@@ -142,7 +134,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 uwp; 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"
|
||||
@@ -153,83 +145,6 @@ if [ $skip_download == 0 ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# macOS needs MoltenVK
|
||||
if [ ! -d "deps/moltenvk" ]; then
|
||||
echo "Missing MoltenVK for macOS, downloading it."
|
||||
mkdir -p deps/moltenvk
|
||||
pushd deps/moltenvk
|
||||
curl -L -o moltenvk.tar https://github.com/godotengine/moltenvk-osxcross/releases/download/vulkan-sdk-1.3.283.0-2/MoltenVK-all.tar
|
||||
tar xf moltenvk.tar && rm -f moltenvk.tar
|
||||
mv MoltenVK/MoltenVK/include/ MoltenVK/
|
||||
mv MoltenVK/MoltenVK/static/MoltenVK.xcframework/ MoltenVK/
|
||||
popd
|
||||
fi
|
||||
|
||||
# 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.18.0/accesskit-c-0.18.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%2F7578/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-13-release.zip
|
||||
curl -L -o windows_x86_32.zip $base_url-x86_32-gcc-13-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
|
||||
base_url=https://github.com/godotengine/godot-nir-static/releases/download/25.3.1-1/godot-nir-static
|
||||
curl -L -o mesa_arm64.zip $base_url-arm64-llvm-release.zip
|
||||
curl -L -o mesa_x86_64.zip $base_url-x86_64-gcc-release.zip
|
||||
curl -L -o mesa_x86_32.zip $base_url-x86_32-gcc-release.zip
|
||||
unzip -o mesa_arm64.zip && rm -f mesa_arm64.zip
|
||||
unzip -o mesa_x86_64.zip && rm -f mesa_x86_64.zip
|
||||
unzip -o mesa_x86_32.zip && rm -f mesa_x86_32.zip
|
||||
popd
|
||||
fi
|
||||
|
||||
if [ ! -d "deps/swappy" ]; then
|
||||
echo "Missing Swappy libraries, downloading them."
|
||||
mkdir -p deps/swappy
|
||||
pushd deps/swappy
|
||||
curl -L -O https://github.com/godotengine/godot-swappy/releases/download/from-source-2025-01-31/godot-swappy.7z
|
||||
7z x godot-swappy.7z && rm godot-swappy.7z
|
||||
popd
|
||||
fi
|
||||
|
||||
# Keystore for Android editor signing
|
||||
# Optional - the config.sh will be copied but if it's not filled in,
|
||||
# it will do an unsigned build.
|
||||
if [ ! -d "deps/keystore" ]; then
|
||||
mkdir -p deps/keystore
|
||||
cp config.sh deps/keystore/
|
||||
if [ ! -z "$GODOT_ANDROID_SIGN_KEYSTORE" ]; then
|
||||
cp "$GODOT_ANDROID_SIGN_KEYSTORE" deps/keystore/
|
||||
sed -i deps/keystore/config.sh -e "s@$GODOT_ANDROID_SIGN_KEYSTORE@/root/keystore/$GODOT_ANDROID_SIGN_KEYSTORE@"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "${skip_git_checkout}" == 0 ]; then
|
||||
git clone https://github.com/godotengine/godot git || /bin/true
|
||||
pushd git
|
||||
@@ -257,42 +172,48 @@ EOF
|
||||
popd
|
||||
fi
|
||||
|
||||
export podman_run="${podman} run -it --rm --env BUILD_NAME=${BUILD_NAME} --env GODOT_VERSION_STATUS=${GODOT_VERSION_STATUS} --env NUM_CORES=${NUM_CORES} --env CLASSICAL=${build_classical} --env MONO=${build_mono} --env DOTNET=${build_dotnet} -v ${basedir}/godot-${godot_version}.tar.gz:/root/godot.tar.gz -v ${basedir}/mono-glue:/root/mono-glue -w /root/"
|
||||
export img_version=$IMAGE_VERSION
|
||||
export basedir="$(pwd)"
|
||||
mkdir -p ${basedir}/out
|
||||
mkdir -p ${basedir}/out/logs
|
||||
|
||||
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 img_version=3.x-mono-6.12.0.122
|
||||
|
||||
# Get AOT compilers from their containers.
|
||||
mkdir -p ${basedir}/out/aot-compilers
|
||||
${podman} run -it --rm -w /root -v ${basedir}/out/aot-compilers:/root/out localhost/godot-ios:${img_version} bash -c "cp -r /root/aot-compilers/* /root/out"
|
||||
chmod +x ${basedir}/out/aot-compilers/*/*
|
||||
|
||||
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/dotnet
|
||||
${podman_run} -v ${basedir}/build-dotnet:/root/build -v ${basedir}/out/dotnet:/root/out --env GODOT_VERSION=${godot_version} localhost/godot-linux:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/dotnet
|
||||
${podman_run} -v ${basedir}/build-mono-glue:/root/build localhost/godot-mono-glue:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/mono-glue
|
||||
|
||||
mkdir -p ${basedir}/out/windows
|
||||
${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 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
|
||||
mkdir -p ${basedir}/out/linux/x64
|
||||
${podman_run} -v ${basedir}/build-linux:/root/build -v ${basedir}/out/linux/x64:/root/out localhost/godot-ubuntu-64:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/linux64
|
||||
|
||||
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/linux/x86
|
||||
${podman_run} -v ${basedir}/build-linux:/root/build -v ${basedir}/out/linux/x86:/root/out localhost/godot-ubuntu-32:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/linux32
|
||||
|
||||
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
|
||||
mkdir -p ${basedir}/out/javascript
|
||||
${podman_run} -v ${basedir}/build-javascript:/root/build -v ${basedir}/out/javascript:/root/out localhost/godot-javascript:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/javascript
|
||||
|
||||
mkdir -p ${basedir}/out/macosx
|
||||
${podman_run} -v ${basedir}/build-macosx:/root/build -v ${basedir}/out/macosx:/root/out localhost/godot-osx:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/macosx
|
||||
|
||||
mkdir -p ${basedir}/out/android
|
||||
${podman_run} -v ${basedir}/build-android:/root/build -v ${basedir}/out/android:/root/out -v ${basedir}/deps/swappy:/root/swappy -v ${basedir}/deps/keystore:/root/keystore localhost/godot-android:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/android
|
||||
${podman_run} -v ${basedir}/build-android:/root/build -v ${basedir}/out/android:/root/out 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
|
||||
${podman_run} -v ${basedir}/build-ios:/root/build -v ${basedir}/out/ios:/root/out localhost/godot-ios:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/ios
|
||||
|
||||
#mkdir -p ${basedir}/out/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
|
||||
mkdir -p ${basedir}/out/server/x64
|
||||
${podman_run} -v ${basedir}/build-server:/root/build -v ${basedir}/out/server/x64:/root/out localhost/godot-ubuntu-64:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/server
|
||||
|
||||
mkdir -p ${basedir}/out/uwp
|
||||
${podman_run} --ulimit nofile=32768:32768 -v ${basedir}/build-uwp:/root/build -v ${basedir}/out/uwp:/root/out ${registry}/godot-private/uwp:latest bash build/build.sh 2>&1 | tee ${basedir}/out/logs/uwp
|
||||
|
||||
uid=$(id -un)
|
||||
gid=$(id -gn)
|
||||
if [ ! -z "$SUDO_UID" ]; then
|
||||
uid="${SUDO_UID}"
|
||||
gid="${SUDO_GID}"
|
||||
chown -R "${SUDO_UID}":"${SUDO_GID}" ${basedir}/git ${basedir}/out ${basedir}/mono-glue ${basedir}/godot*.tar.gz
|
||||
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/*`)."
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
rm -rf releases steam tmp web
|
||||
4
clean.sh
4
clean.sh
@@ -1,4 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
rm -rf godot*.tar.gz mono-glue out releases steam tmp web
|
||||
git status
|
||||
98
config.sh.in
98
config.sh.in
@@ -3,104 +3,42 @@
|
||||
# Configuration file for user-specific details.
|
||||
# This file is gitignore'd and will be sourced by build scripts.
|
||||
|
||||
# Note: For passwords or GPG keys, make sure that special characters such
|
||||
# as $ won't be expanded, by using single quotes to enclose the string,
|
||||
# or escaping with \$.
|
||||
|
||||
# These scripts are designed and tested against podman. They may also work
|
||||
# with docker, but it's not guaranteed. You can set this variable to the
|
||||
# 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
|
||||
# contributors.
|
||||
# You can build your own registry with scripts at
|
||||
# https://github.com/godotengine/build-containers
|
||||
export REGISTRY='registry.prehensile-tales.com'
|
||||
|
||||
# Version string of the images to use in build.sh.
|
||||
export IMAGE_VERSION='4.x-f36'
|
||||
export REGISTRY="registry.prehensile-tales.com"
|
||||
|
||||
# Default build name used to distinguish between official and custom builds.
|
||||
export BUILD_NAME='custom_build'
|
||||
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'
|
||||
export OSX_HOST=''
|
||||
# eg "user@10.1.0.10"
|
||||
export OSX_HOST=""
|
||||
# ID of the Apple certificate used to sign
|
||||
export OSX_KEY_ID=''
|
||||
export OSX_KEY_ID=""
|
||||
# Bundle id for the signed app
|
||||
export OSX_BUNDLE_ID=''
|
||||
# Username/password for Apple's signing APIs (used for notarytool)
|
||||
export APPLE_TEAM=''
|
||||
export APPLE_ID=''
|
||||
export APPLE_ID_PASSWORD=''
|
||||
export OSX_BUNDLE_ID=""
|
||||
# Username/password for Apple's signing APIs (used for atltool)
|
||||
export APPLE_ID=""
|
||||
export APPLE_ID_PASSWORD=""
|
||||
|
||||
# NuGet source for publishing .NET packages
|
||||
export NUGET_SOURCE='nuget.org'
|
||||
# API key for publishing NuGet packages to nuget.org
|
||||
export NUGET_API_KEY=''
|
||||
|
||||
# MavenCentral (sonatype) credentials
|
||||
export OSSRH_GROUP_ID=''
|
||||
export OSSRH_USERNAME=''
|
||||
export OSSRH_PASSWORD=''
|
||||
# Sonatype assigned ID used to upload the generated artifacts
|
||||
export SONATYPE_STAGING_PROFILE_ID=''
|
||||
# Used to sign the artifacts after they're built
|
||||
# ID of the GPG key pair, the last eight characters of its fingerprint
|
||||
export SIGNING_KEY_ID=''
|
||||
# Passphrase of the key pair
|
||||
export SIGNING_PASSWORD=''
|
||||
# Base64 encoded private GPG key
|
||||
export SIGNING_KEY=''
|
||||
|
||||
# Android signing configs
|
||||
# Path to the Android keystore file used to sign the release build
|
||||
export GODOT_ANDROID_SIGN_KEYSTORE=''
|
||||
# Key alias used for signing the release build
|
||||
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=''
|
||||
# Horizon Store app ID and secret.
|
||||
export GODOT_ANDROID_HORIZON_APP_ID=''
|
||||
export GODOT_ANDROID_HORIZON_APP_SECRET=''
|
||||
|
||||
BIN
osslsigncode
Executable file
BIN
osslsigncode
Executable file
Binary file not shown.
@@ -1,245 +0,0 @@
|
||||
#!/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 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 on the Play Store as no valid Play Store JSON key was found."
|
||||
fi
|
||||
|
||||
if [ ! -z "${GODOT_ANDROID_HORIZON_APP_ID}" ] && [ ! -z "${GODOT_ANDROID_HORIZON_APP_SECRET}" ]; then
|
||||
echo "Publishing Android Editor to Horizon Store..."
|
||||
./build-android/upload-horizon.sh ${godot_version} ${latest_stable}
|
||||
else
|
||||
echo "Disabling Android Editor publishing on the Horizon Store as config.sh does not define the required data (GODOT_ANDROID_HORIZON_APP_ID, GODOT_ANDROID_HORIZON_SECRET)."
|
||||
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."
|
||||
Reference in New Issue
Block a user