mirror of
https://github.com/godotengine/godot-build-scripts.git
synced 2026-01-01 09:48:47 +03:00
Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ce8bb7e3a1 | ||
|
|
c05f818f80 | ||
|
|
6e3758c48b | ||
|
|
949462d076 | ||
|
|
28b32ec09c | ||
|
|
70d191922c | ||
|
|
c26d764616 | ||
|
|
1cbfc61289 | ||
|
|
512d8d197f | ||
|
|
1f44579b25 | ||
|
|
4834ab1eab | ||
|
|
9f297b5ef0 | ||
|
|
0d2fbefd04 | ||
|
|
952f0985e0 | ||
|
|
682393f0b4 | ||
|
|
ee615c7c01 | ||
|
|
cc367acf4d | ||
|
|
09c443fa08 | ||
|
|
5cdccb9443 | ||
|
|
e37b348272 | ||
|
|
77161dac92 | ||
|
|
4f89dc38b1 | ||
|
|
93ac9c068e |
5
.gitignore
vendored
5
.gitignore
vendored
@@ -3,7 +3,6 @@ config.sh
|
||||
*.jks
|
||||
*.pfx
|
||||
*.pkcs12
|
||||
/*.json
|
||||
|
||||
# Generated by build scripts
|
||||
angle/
|
||||
@@ -17,9 +16,5 @@ angle.7z
|
||||
out/
|
||||
releases/
|
||||
sha512sums/
|
||||
steam/
|
||||
tmp/
|
||||
web/
|
||||
|
||||
# macOS
|
||||
.DS_Store
|
||||
|
||||
@@ -4,32 +4,118 @@ 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"
|
||||
export OPTIONS=""
|
||||
export OPTIONS="production=yes"
|
||||
export OPTIONS_MONO="module_mono_enabled=yes mono_static=no"
|
||||
export TERM=xterm
|
||||
|
||||
rm -rf godot
|
||||
mkdir godot
|
||||
cd godot
|
||||
tar xf /root/godot.tar.gz --strip-components=1
|
||||
|
||||
echo "Starting classical build for Android..."
|
||||
$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 android_arch=arm64v8 $OPTIONS tools=no target=release_debug
|
||||
$SCONS platform=android android_arch=arm64v8 $OPTIONS tools=no target=release
|
||||
$SCONS platform=android android_arch=x86 $OPTIONS tools=no target=release_debug
|
||||
$SCONS platform=android android_arch=x86 $OPTIONS tools=no target=release
|
||||
$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
|
||||
# Environment variables and keystore needed for signing store editor build,
|
||||
# as well as signing and publishing to MavenCentral.
|
||||
source /root/keystore/config.sh
|
||||
|
||||
pushd platform/android/java
|
||||
./gradlew build
|
||||
popd
|
||||
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
|
||||
|
||||
mkdir -p /root/out/templates
|
||||
cp bin/android_debug.apk /root/out/templates/
|
||||
cp bin/android_release.apk /root/out/templates/
|
||||
# Classical
|
||||
|
||||
if [ "${CLASSICAL}" == "1" ]; then
|
||||
echo "Starting classical build for Android..."
|
||||
|
||||
$SCONS platform=android android_arch=armv7 $OPTIONS tools=yes target=release_debug store_release=$store_release
|
||||
$SCONS platform=android android_arch=arm64v8 $OPTIONS tools=yes target=release_debug store_release=$store_release
|
||||
$SCONS platform=android android_arch=x86 $OPTIONS tools=yes target=release_debug store_release=$store_release
|
||||
$SCONS platform=android android_arch=x86_64 $OPTIONS tools=yes target=release_debug store_release=$store_release
|
||||
|
||||
pushd platform/android/java
|
||||
./gradlew generateGodotEditor
|
||||
popd
|
||||
|
||||
mkdir -p /root/out/tools
|
||||
# Copy the generated Android editor binaries (apk & aab).
|
||||
if [ "$store_release" == "yes" ]; then
|
||||
cp bin/android_editor_builds/android_editor-release.apk /root/out/tools/android_editor.apk
|
||||
cp bin/android_editor_builds/android_editor-release.aab /root/out/tools/android_editor.aab
|
||||
else
|
||||
cp bin/android_editor_builds/android_editor-debug.apk /root/out/tools/android_editor.apk
|
||||
cp bin/android_editor_builds/android_editor-debug.aab /root/out/tools/android_editor.aab
|
||||
fi
|
||||
|
||||
# Restart from a clean tarball, as we'll copy all the contents
|
||||
# outside the container for the MavenCentral upload.
|
||||
rm -rf /root/godot/*
|
||||
tar xf /root/godot.tar.gz --strip-components=1
|
||||
|
||||
$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 android_arch=arm64v8 $OPTIONS tools=no target=release_debug
|
||||
$SCONS platform=android android_arch=arm64v8 $OPTIONS tools=no target=release
|
||||
|
||||
$SCONS platform=android android_arch=x86 $OPTIONS tools=no target=release_debug
|
||||
$SCONS platform=android android_arch=x86 $OPTIONS tools=no target=release
|
||||
|
||||
$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.release.aar /root/out/templates/
|
||||
fi
|
||||
|
||||
# Mono
|
||||
|
||||
if [ "${MONO}" == "1" ]; then
|
||||
echo "Starting Mono build for Android..."
|
||||
|
||||
cp /root/mono-glue/*.cpp modules/mono/glue/
|
||||
cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/
|
||||
|
||||
$SCONS platform=android android_arch=armv7 $OPTIONS $OPTIONS_MONO mono_prefix=/root/mono-installs/android-armv7-release tools=no target=release_debug
|
||||
$SCONS platform=android android_arch=armv7 $OPTIONS $OPTIONS_MONO mono_prefix=/root/mono-installs/android-armv7-release tools=no target=release
|
||||
|
||||
$SCONS platform=android android_arch=arm64v8 $OPTIONS $OPTIONS_MONO mono_prefix=/root/mono-installs/android-arm64v8-release tools=no target=release_debug
|
||||
$SCONS platform=android android_arch=arm64v8 $OPTIONS $OPTIONS_MONO mono_prefix=/root/mono-installs/android-arm64v8-release tools=no target=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 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 generateGodotTemplates
|
||||
popd
|
||||
|
||||
mkdir -p /root/out/templates-mono
|
||||
cp bin/android_source.zip /root/out/templates-mono/
|
||||
cp bin/android_debug.apk /root/out/templates-mono/
|
||||
cp bin/android_release.apk /root/out/templates-mono/
|
||||
cp bin/godot-lib.release.aar /root/out/templates-mono/
|
||||
|
||||
mkdir -p /root/out/templates-mono/bcl
|
||||
cp -r /root/mono-installs/android-bcl/* /root/out/templates-mono/bcl/
|
||||
fi
|
||||
|
||||
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)
|
||||
2
build-android/upload-mavencentral.sh
Executable file → Normal file
2
build-android/upload-mavencentral.sh
Executable file → Normal file
@@ -15,4 +15,4 @@ ${PODMAN} run -it --rm \
|
||||
"source /root/keystore/config.sh && \
|
||||
cp -r /root/godot/.gradle /root && \
|
||||
cd /root/godot/platform/android/java && \
|
||||
./gradlew publishAllPublicationToSonatypeRepository --max-workers 1 closeAndReleaseSonatypeStagingRepository"
|
||||
./gradlew publishTemplateReleasePublicationToSonatypeRepository --max-workers 1 closeAndReleaseSonatypeStagingRepository"
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo "Usage: $0 <version-name>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
VERSION_NAME="$1"
|
||||
|
||||
BASEDIR="$(pwd)"
|
||||
|
||||
source ${BASEDIR}/config.sh
|
||||
|
||||
VENV_DIR="${BASEDIR}/venv"
|
||||
PYTHON_SCRIPT="${BASEDIR}/build-android/playstore_upload_script.py"
|
||||
AAB_FILE="${BASEDIR}/out/android/tools/android_editor.aab"
|
||||
NDS_FILE="${BASEDIR}/out/android/tools/android_editor_native_debug_symbols.zip"
|
||||
JSON_KEY_FILE="${BASEDIR}/${GODOT_ANDROID_UPLOAD_JSON_KEY}"
|
||||
|
||||
echo "Creating virtual environment"
|
||||
rm -rf "$VENV_DIR"
|
||||
python3 -m venv "$VENV_DIR"
|
||||
source "$VENV_DIR/bin/activate"
|
||||
|
||||
echo "Installing google-api-python-client"
|
||||
pip install --upgrade google-api-python-client
|
||||
|
||||
echo "Uploading editor to Google Play Store..."
|
||||
python3 "$PYTHON_SCRIPT" "$AAB_FILE" "$NDS_FILE" "$JSON_KEY_FILE" "$VERSION_NAME"
|
||||
@@ -5,21 +5,112 @@ set -e
|
||||
# Config
|
||||
|
||||
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
|
||||
export IOS_SDK="18.5"
|
||||
export IOS_OPTIONS_ARM64="SDKVERSION=${IOS_SDK} ios_triple=arm-apple-darwin11- IPHONEPATH=/root/ioscross/arm64/ IPHONESDK=/root/ioscross/arm64/SDK/iPhoneOS${IOS_SDK}.sdk/"
|
||||
# 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 lto=none"
|
||||
export OPTIONS_MONO="module_mono_enabled=yes mono_static=yes"
|
||||
export TERM=xterm
|
||||
|
||||
export IOS_SDK="18.2"
|
||||
export IOS_LIPO="/root/ioscross/arm64/bin/arm-apple-darwin11-lipo"
|
||||
|
||||
rm -rf godot
|
||||
mkdir godot
|
||||
cd godot
|
||||
tar xf /root/godot.tar.gz --strip-components=1
|
||||
|
||||
echo "Starting classical build for iOS..."
|
||||
# Classical
|
||||
|
||||
# arm64 device
|
||||
$SCONS platform=iphone $IOS_OPTIONS_ARM64 arch=arm64 tools=no target=release_debug
|
||||
$SCONS platform=iphone $IOS_OPTIONS_ARM64 arch=arm64 tools=no target=release
|
||||
if [ "${CLASSICAL}" == "1" ]; then
|
||||
echo "Starting classical build for iOS..."
|
||||
|
||||
mkdir -p /root/out/templates
|
||||
cp bin/godot.iphone.*.arm64 /root/out/templates/
|
||||
# arm64 device
|
||||
$SCONS platform=iphone $OPTIONS arch=arm64 tools=no ios_simulator=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 ios_simulator=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=iphone $OPTIONS arch=arm64 tools=no ios_simulator=yes target=release_debug \
|
||||
# IPHONESDK="/root/ioscross/arm64_sim/SDK/iPhoneSimulator${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/arm64_sim/" ios_triple="arm-apple-darwin11-"
|
||||
#$SCONS platform=iphone $OPTIONS arch=arm64 tools=no ios_simulator=no target=release \
|
||||
# IPHONESDK="/root/ioscross/arm64_sim/SDK/iPhoneSimulator${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/arm64_sim/" ios_triple="arm-apple-darwin11-"
|
||||
|
||||
# x86_64 simulator
|
||||
$SCONS platform=iphone $OPTIONS arch=x86_64 tools=no ios_simulator=yes target=release_debug \
|
||||
IPHONESDK="/root/ioscross/x86_64_sim/SDK/iPhoneSimulator${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/x86_64_sim/" ios_triple="x86_64-apple-darwin11-"
|
||||
$SCONS platform=iphone $OPTIONS arch=x86_64 tools=no ios_simulator=yes target=release \
|
||||
IPHONESDK="/root/ioscross/x86_64_sim/SDK/iPhoneSimulator${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/x86_64_sim/" ios_triple="x86_64-apple-darwin11-"
|
||||
|
||||
mkdir -p /root/out/templates
|
||||
cp bin/libgodot.iphone.opt.arm64.a /root/out/templates/libgodot.iphone.a
|
||||
cp bin/libgodot.iphone.opt.debug.arm64.a /root/out/templates/libgodot.iphone.debug.a
|
||||
#$IOS_LIPO -create bin/libgodot.iphone.opt.arm64.simulator.a bin/libgodot.iphone.opt.x86_64.simulator.a -output /root/out/templates/libgodot.iphone.simulator.a
|
||||
#$IOS_LIPO -create bin/libgodot.iphone.opt.debug.arm64.simulator.a bin/libgodot.iphone.opt.debug.x86_64.simulator.a -output /root/out/templates/libgodot.iphone.debug.simulator.a
|
||||
cp bin/libgodot.iphone.opt.x86_64.simulator.a /root/out/templates/libgodot.iphone.simulator.a
|
||||
cp bin/libgodot.iphone.opt.debug.x86_64.simulator.a /root/out/templates/libgodot.iphone.debug.simulator.a
|
||||
fi
|
||||
|
||||
# Mono
|
||||
|
||||
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=iphone $OPTIONS $OPTIONS_MONO arch=arm64 ios_simulator=no 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 ios_simulator=no 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=iphone $OPTIONS $OPTIONS_MONO arch=arm64 ios_simulator=yes mono_prefix=/root/mono-installs/ios-arm64-sim-release tools=no target=release_debug \
|
||||
# IPHONESDK="/root/ioscross/arm64_sim/SDK/iPhoneSimulator${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/arm64_sim/" ios_triple="arm-apple-darwin11-"
|
||||
#$SCONS platform=iphone $OPTIONS $OPTIONS_MONO arch=arm64 ios_simulator=yes mono_prefix=/root/mono-installs/ios-arm64-sim-release tools=no target=release \
|
||||
# IPHONESDK="/root/ioscross/arm64_sim/SDK/iPhoneSimulator${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/arm64_sim/" ios_triple="arm-apple-darwin11-"
|
||||
|
||||
# x86_64 simulator
|
||||
$SCONS platform=iphone $OPTIONS $OPTIONS_MONO arch=x86_64 ios_simulator=yes mono_prefix=/root/mono-installs/ios-x86_64-release tools=no target=release_debug \
|
||||
IPHONESDK="/root/ioscross/x86_64_sim/SDK/iPhoneSimulator${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/x86_64_sim/" ios_triple="x86_64-apple-darwin11-"
|
||||
$SCONS platform=iphone $OPTIONS $OPTIONS_MONO arch=x86_64 ios_simulator=yes mono_prefix=/root/mono-installs/ios-x86_64-release tools=no target=release \
|
||||
IPHONESDK="/root/ioscross/x86_64_sim/SDK/iPhoneSimulator${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/x86_64_sim/" ios_triple="x86_64-apple-darwin11-"
|
||||
|
||||
mkdir -p /root/out/templates-mono
|
||||
|
||||
cp bin/libgodot.iphone.opt.arm64.a /root/out/templates-mono/libgodot.iphone.a
|
||||
cp bin/libgodot.iphone.opt.debug.arm64.a /root/out/templates-mono/libgodot.iphone.debug.a
|
||||
#$IOS_LIPO -create bin/libgodot.iphone.opt.arm64.simulator.a bin/libgodot.iphone.opt.x86_64.simulator.a -output /root/out/templates-mono/libgodot.iphone.simulator.a
|
||||
#$IOS_LIPO -create bin/libgodot.iphone.opt.debug.arm64.simulator.a bin/libgodot.iphone.opt.debug.x86_64.simulator.a -output /root/out/templates-mono/libgodot.iphone.debug.simulator.a
|
||||
cp bin/libgodot.iphone.opt.x86_64.simulator.a /root/out/templates-mono/libgodot.iphone.simulator.a
|
||||
cp bin/libgodot.iphone.opt.debug.x86_64.simulator.a /root/out/templates-mono/libgodot.iphone.debug.simulator.a
|
||||
|
||||
cp -r misc/dist/iphone-mono-libs /root/out/templates-mono/iphone-mono-libs
|
||||
|
||||
cp bin/libmonosgen-2.0.iphone.arm64.a /root/out/templates-mono/iphone-mono-libs/libmonosgen-2.0.xcframework/ios-arm64/libmonosgen.a
|
||||
cp bin/libmono-native.iphone.arm64.a /root/out/templates-mono/iphone-mono-libs/libmono-native.xcframework/ios-arm64/libmono-native.a
|
||||
cp bin/libmono-profiler-log.iphone.arm64.a /root/out/templates-mono/iphone-mono-libs/libmono-profiler-log.xcframework/ios-arm64/libmono-profiler-log.a
|
||||
|
||||
#$IOS_LIPO -create bin/libmonosgen-2.0.iphone.arm64.simulator.a bin/libmonosgen-2.0.iphone.x86_64.simulator.a -output /root/out/templates-mono/iphone-mono-libs/libmonosgen-2.0.xcframework/ios-arm64_x86_64-simulator/libmonosgen.a
|
||||
#$IOS_LIPO -create bin/libmono-native.iphone.arm64.simulator.a bin/libmono-native.iphone.x86_64.simulator.a -output /root/out/templates-mono/iphone-mono-libs/libmono-native.xcframework/ios-arm64_x86_64-simulator/libmono-native.a
|
||||
#$IOS_LIPO -create bin/libmono-profiler-log.iphone.arm64.simulator.a bin/libmono-profiler-log.iphone.x86_64.simulator.a -output /root/out/templates-mono/iphone-mono-libs/libmono-profiler-log.xcframework/ios-arm64_x86_64-simulator/libmono-profiler-log.a
|
||||
cp bin/libmonosgen-2.0.iphone.x86_64.simulator.a /root/out/templates-mono/iphone-mono-libs/libmonosgen-2.0.xcframework/ios-arm64_x86_64-simulator/libmonosgen.a
|
||||
cp bin/libmono-native.iphone.x86_64.simulator.a /root/out/templates-mono/iphone-mono-libs/libmono-native.xcframework/ios-arm64_x86_64-simulator/libmono-native.a
|
||||
cp bin/libmono-profiler-log.iphone.x86_64.simulator.a /root/out/templates-mono/iphone-mono-libs/libmono-profiler-log.xcframework/ios-arm64_x86_64-simulator/libmono-profiler-log.a
|
||||
|
||||
# The Mono libraries for the interpreter are not available for simulator builds
|
||||
cp bin/libmono-ee-interp.iphone.arm64.a /root/out/templates-mono/iphone-mono-libs/libmono-ee-interp.xcframework/ios-arm64/libmono-ee-interp.a
|
||||
cp bin/libmono-icall-table.iphone.arm64.a /root/out/templates-mono/iphone-mono-libs/libmono-icall-table.xcframework/ios-arm64/libmono-icall-table.a
|
||||
cp bin/libmono-ilgen.iphone.arm64.a /root/out/templates-mono/iphone-mono-libs/libmono-ilgen.xcframework/ios-arm64/libmono-ilgen.a
|
||||
|
||||
mkdir -p /root/out/templates-mono/bcl
|
||||
cp -r /root/mono-installs/ios-bcl/* /root/out/templates-mono/bcl
|
||||
fi
|
||||
|
||||
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 lto=none"
|
||||
export TERM=xterm
|
||||
|
||||
rm -rf godot
|
||||
mkdir godot
|
||||
cd godot
|
||||
tar xf /root/godot.tar.gz --strip-components=1
|
||||
|
||||
# Classical
|
||||
|
||||
if [ "${CLASSICAL}" == "1" ]; then
|
||||
echo "Starting classical build for JavaScript..."
|
||||
|
||||
source /root/emsdk_${EMSCRIPTEN_CLASSICAL}/emsdk_env.sh
|
||||
|
||||
$SCONS platform=javascript ${OPTIONS} target=release_debug tools=no
|
||||
$SCONS platform=javascript ${OPTIONS} target=release tools=no
|
||||
|
||||
$SCONS platform=javascript ${OPTIONS} target=release_debug tools=no threads_enabled=yes
|
||||
$SCONS platform=javascript ${OPTIONS} target=release tools=no threads_enabled=yes
|
||||
|
||||
$SCONS platform=javascript ${OPTIONS} target=release_debug tools=no gdnative_enabled=yes
|
||||
$SCONS platform=javascript ${OPTIONS} target=release tools=no gdnative_enabled=yes
|
||||
|
||||
mkdir -p /root/out/templates
|
||||
cp -rvp bin/*.zip /root/out/templates
|
||||
rm -f bin/*.zip
|
||||
|
||||
$SCONS platform=javascript ${OPTIONS} target=release_debug tools=yes threads_enabled=yes use_closure_compiler=yes
|
||||
|
||||
mkdir -p /root/out/tools
|
||||
cp -rvp bin/*.zip /root/out/tools
|
||||
rm -f bin/*.zip
|
||||
|
||||
fi
|
||||
|
||||
# Mono
|
||||
|
||||
if [ "${MONO}" == "1" ]; then
|
||||
echo "Starting Mono build for JavaScript..."
|
||||
|
||||
source /root/emsdk_${EMSCRIPTEN_MONO}/emsdk_env.sh
|
||||
|
||||
cp /root/mono-glue/*.cpp modules/mono/glue/
|
||||
cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/
|
||||
cp -r /root/mono-glue/GodotSharp/GodotSharpEditor/Generated modules/mono/glue/GodotSharp/GodotSharpEditor/
|
||||
|
||||
$SCONS platform=javascript ${OPTIONS} ${OPTIONS_MONO} target=release_debug tools=no
|
||||
$SCONS platform=javascript ${OPTIONS} ${OPTIONS_MONO} target=release tools=no
|
||||
|
||||
mkdir -p /root/out/templates-mono
|
||||
cp -rvp bin/*.zip /root/out/templates-mono
|
||||
rm -f bin/*.zip
|
||||
|
||||
mkdir -p /root/out/templates-mono/bcl
|
||||
cp -r /root/mono-installs/wasm-bcl/wasm /root/out/templates-mono/bcl/
|
||||
fi
|
||||
|
||||
echo "JavaScript build successful"
|
||||
@@ -5,53 +5,111 @@ set -e
|
||||
# Config
|
||||
|
||||
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
|
||||
export OPTIONS="use_static_cpp=yes"
|
||||
export STRIP="strip"
|
||||
export OPTIONS="production=yes LINKFLAGS=-s"
|
||||
export OPTIONS_MONO="module_mono_enabled=yes mono_static=yes"
|
||||
export MONO_PREFIX_X86_64="/root/mono-installs/desktop-linux-x86_64-release"
|
||||
export MONO_PREFIX_X86="/root/mono-installs/desktop-linux-x86-release"
|
||||
export TERM=xterm
|
||||
|
||||
rm -rf godot
|
||||
mkdir godot
|
||||
cd godot
|
||||
tar xf /root/godot.tar.gz --strip-components=1
|
||||
|
||||
echo "Starting classical build for Linux..."
|
||||
# Classical
|
||||
|
||||
export PATH="${GODOT_SDK_LINUX_X86_64}/bin:${BASE_PATH}"
|
||||
if [ "${CLASSICAL}" == "1" ]; then
|
||||
echo "Starting classical build for Linux..."
|
||||
|
||||
$SCONS platform=x11 bits=64 $OPTIONS tools=yes target=release_debug
|
||||
$STRIP bin/godot.x11.*
|
||||
mkdir -p /root/out/x86_64/tools
|
||||
cp -rvp bin/* /root/out/x86_64/tools
|
||||
rm -rf bin
|
||||
export PATH="${GODOT_SDK_LINUX_X86_64}/bin:${BASE_PATH}"
|
||||
|
||||
$SCONS platform=x11 bits=64 $OPTIONS tools=no target=release_debug
|
||||
$SCONS platform=x11 bits=64 $OPTIONS tools=no target=release
|
||||
$STRIP bin/godot.x11.*
|
||||
mkdir -p /root/out/x86_64/templates
|
||||
cp -rvp bin/* /root/out/x86_64/templates
|
||||
rm -rf bin
|
||||
$SCONS platform=x11 $OPTIONS tools=yes target=release_debug
|
||||
mkdir -p /root/out/x64/tools
|
||||
cp -rvp bin/* /root/out/x64/tools
|
||||
rm -rf bin
|
||||
|
||||
export PATH="${GODOT_SDK_LINUX_X86_32}/bin:${BASE_PATH}"
|
||||
$SCONS platform=x11 $OPTIONS tools=no target=release_debug
|
||||
$SCONS platform=x11 $OPTIONS tools=no target=release
|
||||
mkdir -p /root/out/x64/templates
|
||||
cp -rvp bin/* /root/out/x64/templates
|
||||
rm -rf bin
|
||||
|
||||
$SCONS platform=x11 bits=32 $OPTIONS tools=yes target=release_debug
|
||||
$STRIP bin/godot.x11.*
|
||||
mkdir -p /root/out/x86_32/tools
|
||||
cp -rvp bin/* /root/out/x86_32/tools
|
||||
rm -rf bin
|
||||
export PATH="${GODOT_SDK_LINUX_X86_32}/bin:${BASE_PATH}"
|
||||
|
||||
$SCONS platform=x11 bits=32 $OPTIONS tools=no target=release_debug
|
||||
$SCONS platform=x11 bits=32 $OPTIONS tools=no target=release
|
||||
$STRIP bin/godot.x11.*
|
||||
mkdir -p /root/out/x86_32/templates
|
||||
cp -rvp bin/* /root/out/x86_32/templates
|
||||
rm -rf bin
|
||||
$SCONS platform=x11 bits=32 $OPTIONS tools=yes target=release_debug
|
||||
mkdir -p /root/out/x86/tools
|
||||
cp -rvp bin/* /root/out/x86/tools
|
||||
rm -rf bin
|
||||
|
||||
export PATH="${GODOT_SDK_LINUX_X86_64}/bin:${BASE_PATH}"
|
||||
$SCONS platform=x11 bits=32 $OPTIONS tools=no target=release_debug
|
||||
$SCONS platform=x11 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=server bits=64 $OPTIONS tools=yes target=release_debug
|
||||
mkdir -p /root/out/x86_64/server
|
||||
cp -rvp bin/* /root/out/x86_64/server
|
||||
rm -rf bin
|
||||
export PATH="${GODOT_SDK_LINUX_ARM64}/bin:${BASE_PATH}"
|
||||
|
||||
export PATH="${BASE_PATH}"
|
||||
$SCONS platform=x11 arch=arm64 $OPTIONS tools=yes target=release_debug
|
||||
mkdir -p /root/out/arm64/tools
|
||||
cp -rvp bin/* /root/out/arm64/tools
|
||||
rm -rf bin
|
||||
|
||||
$SCONS platform=x11 arch=arm64 $OPTIONS tools=no target=release_debug
|
||||
$SCONS platform=x11 arch=arm64 $OPTIONS tools=no target=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=x11 arch=arm $OPTIONS tools=yes target=release_debug
|
||||
mkdir -p /root/out/arm/tools
|
||||
cp -rvp bin/* /root/out/arm/tools
|
||||
rm -rf bin
|
||||
|
||||
$SCONS platform=x11 arch=arm $OPTIONS tools=no target=release_debug
|
||||
$SCONS platform=x11 arch=arm $OPTIONS tools=no target=release
|
||||
mkdir -p /root/out/arm/templates
|
||||
cp -rvp bin/* /root/out/arm/templates
|
||||
rm -rf bin
|
||||
fi
|
||||
|
||||
# Mono
|
||||
|
||||
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 PATH="${GODOT_SDK_LINUX_X86_64}/bin:${BASE_PATH}"
|
||||
export OPTIONS_MONO_PREFIX="${OPTIONS} ${OPTIONS_MONO} mono_prefix=${MONO_PREFIX_X86_64}"
|
||||
|
||||
$SCONS platform=x11 $OPTIONS_MONO_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=x11 $OPTIONS_MONO_PREFIX tools=no target=release_debug
|
||||
$SCONS platform=x11 $OPTIONS_MONO_PREFIX tools=no target=release
|
||||
mkdir -p /root/out/x64/templates-mono
|
||||
cp -rvp bin/* /root/out/x64/templates-mono
|
||||
rm -rf bin
|
||||
|
||||
export PATH="${GODOT_SDK_LINUX_X86_32}/bin:${BASE_PATH}"
|
||||
export OPTIONS_MONO_PREFIX="${OPTIONS} ${OPTIONS_MONO} mono_prefix=${MONO_PREFIX_X86}"
|
||||
|
||||
$SCONS platform=x11 bits=32 $OPTIONS_MONO_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=x11 bits=32 $OPTIONS_MONO_PREFIX tools=no target=release_debug
|
||||
$SCONS platform=x11 bits=32 $OPTIONS_MONO_PREFIX tools=no target=release
|
||||
mkdir -p /root/out/x86/templates-mono
|
||||
cp -rvp bin/* /root/out/x86/templates-mono
|
||||
rm -rf bin
|
||||
fi
|
||||
|
||||
echo "Linux build successful"
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Config
|
||||
|
||||
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
|
||||
export OPTIONS="osxcross_sdk=darwin24.5"
|
||||
export STRIP="x86_64-apple-darwin24.5-strip"
|
||||
|
||||
rm -rf godot
|
||||
mkdir godot
|
||||
cd godot
|
||||
tar xf /root/godot.tar.gz --strip-components=1
|
||||
|
||||
echo "Starting classical build for macOS..."
|
||||
|
||||
$SCONS platform=osx $OPTIONS bits=64 tools=yes target=release_debug
|
||||
$STRIP bin/godot.osx.*
|
||||
mkdir -p /root/out/tools
|
||||
cp -rvp bin/* /root/out/tools
|
||||
rm -rf bin
|
||||
|
||||
$SCONS platform=osx $OPTIONS bits=64 tools=no target=release_debug
|
||||
$SCONS platform=osx $OPTIONS bits=64 tools=no target=release
|
||||
$STRIP bin/godot.osx.*
|
||||
mkdir -p /root/out/templates
|
||||
cp -rvp bin/* /root/out/templates
|
||||
rm -rf bin
|
||||
|
||||
echo "macOS build successful"
|
||||
99
build-macosx/build.sh
Executable file
99
build-macosx/build.sh
Executable file
@@ -0,0 +1,99 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Config
|
||||
|
||||
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
|
||||
export OPTIONS="osxcross_sdk=darwin24.2 production=yes"
|
||||
export OPTIONS_MONO="module_mono_enabled=yes mono_static=yes"
|
||||
export MONO_PREFIX_X86_64="/root/mono-installs/desktop-osx-x86_64-release"
|
||||
export MONO_PREFIX_ARM64="/root/mono-installs/desktop-osx-arm64-release"
|
||||
export STRIP="x86_64-apple-darwin24.2-strip -u -r"
|
||||
export TERM=xterm
|
||||
|
||||
rm -rf godot
|
||||
mkdir godot
|
||||
cd godot
|
||||
tar xf /root/godot.tar.gz --strip-components=1
|
||||
|
||||
# Classical
|
||||
|
||||
if [ "${CLASSICAL}" == "1" ]; then
|
||||
echo "Starting classical build for macOS..."
|
||||
|
||||
$SCONS platform=osx $OPTIONS arch=x86_64 tools=yes target=release_debug
|
||||
$SCONS platform=osx $OPTIONS arch=arm64 tools=yes target=release_debug
|
||||
lipo -create bin/godot.osx.opt.tools.x86_64 bin/godot.osx.opt.tools.arm64 -output bin/godot.osx.opt.tools.universal
|
||||
$STRIP bin/godot.osx.opt.tools.universal
|
||||
|
||||
mkdir -p /root/out/tools
|
||||
cp -rvp bin/* /root/out/tools
|
||||
rm -rf bin
|
||||
|
||||
$SCONS platform=osx $OPTIONS arch=x86_64 tools=no target=release_debug
|
||||
$SCONS platform=osx $OPTIONS arch=arm64 tools=no target=release_debug
|
||||
lipo -create bin/godot.osx.opt.debug.x86_64 bin/godot.osx.opt.debug.arm64 -output bin/godot.osx.opt.debug.universal
|
||||
$STRIP bin/godot.osx.opt.debug.universal
|
||||
$SCONS platform=osx $OPTIONS arch=x86_64 tools=no target=release
|
||||
$SCONS platform=osx $OPTIONS arch=arm64 tools=no target=release
|
||||
lipo -create bin/godot.osx.opt.x86_64 bin/godot.osx.opt.arm64 -output bin/godot.osx.opt.universal
|
||||
$STRIP bin/godot.osx.opt.universal
|
||||
|
||||
mkdir -p /root/out/templates
|
||||
cp -rvp bin/* /root/out/templates
|
||||
rm -rf bin
|
||||
fi
|
||||
|
||||
# Mono
|
||||
|
||||
if [ "${MONO}" == "1" ]; then
|
||||
echo "Starting Mono build for macOS..."
|
||||
|
||||
cp /root/mono-glue/*.cpp modules/mono/glue/
|
||||
cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/
|
||||
cp -r /root/mono-glue/GodotSharp/GodotSharpEditor/Generated modules/mono/glue/GodotSharp/GodotSharpEditor/
|
||||
|
||||
# Note: A bit of dylib wrangling involved as x86_64 and arm64 builds both generate GodotSharp
|
||||
# so the second build overrides the first, but we need to lipo the libs to make them universal.
|
||||
# We also need to ensure that /etc/mono/config has the proper filenames (keep arm64 as the last
|
||||
# build so that we rely on its config, which has libmono-native.dylib instead of
|
||||
# libmono-native-compat.dylib).
|
||||
mkdir -p tmp-lib/{x86_64,arm64}
|
||||
|
||||
$SCONS platform=osx $OPTIONS $OPTIONS_MONO mono_prefix=$MONO_PREFIX_X86_64 arch=x86_64 tools=yes target=release_debug copy_mono_root=yes
|
||||
cp bin/GodotSharp/Mono/lib/*.dylib tmp-lib/x86_64/
|
||||
$SCONS platform=osx $OPTIONS $OPTIONS_MONO mono_prefix=$MONO_PREFIX_ARM64 arch=arm64 tools=yes target=release_debug copy_mono_root=yes
|
||||
cp bin/GodotSharp/Mono/lib/*.dylib tmp-lib/arm64/
|
||||
lipo -create bin/godot.osx.opt.tools.x86_64.mono bin/godot.osx.opt.tools.arm64.mono -output bin/godot.osx.opt.tools.universal.mono
|
||||
$STRIP bin/godot.osx.opt.tools.universal.mono
|
||||
|
||||
# Make universal versions of the dylibs we use.
|
||||
lipo -create tmp-lib/x86_64/libmono-native.dylib tmp-lib/arm64/libmono-native.dylib -output tmp-lib/libmono-native.dylib
|
||||
lipo -create tmp-lib/x86_64/libMonoPosixHelper.dylib tmp-lib/arm64/libMonoPosixHelper.dylib -output tmp-lib/libMonoPosixHelper.dylib
|
||||
lipo -create tmp-lib/x86_64/libmono-btls-shared.dylib tmp-lib/arm64/libmono-btls-shared.dylib -output tmp-lib/libmono-btls-shared.dylib
|
||||
|
||||
cp -f tmp-lib/*.dylib bin/GodotSharp/Mono/lib/
|
||||
|
||||
mkdir -p /root/out/tools-mono
|
||||
cp -rvp bin/* /root/out/tools-mono
|
||||
rm -rf bin
|
||||
|
||||
$SCONS platform=osx $OPTIONS $OPTIONS_MONO mono_prefix=$MONO_PREFIX_X86_64 arch=x86_64 tools=no target=release_debug
|
||||
$SCONS platform=osx $OPTIONS $OPTIONS_MONO mono_prefix=$MONO_PREFIX_ARM64 arch=arm64 tools=no target=release_debug
|
||||
lipo -create bin/godot.osx.opt.debug.x86_64.mono bin/godot.osx.opt.debug.arm64.mono -output bin/godot.osx.opt.debug.universal.mono
|
||||
$STRIP bin/godot.osx.opt.debug.universal.mono
|
||||
$SCONS platform=osx $OPTIONS $OPTIONS_MONO mono_prefix=$MONO_PREFIX_X86_64 arch=x86_64 tools=no target=release
|
||||
$SCONS platform=osx $OPTIONS $OPTIONS_MONO mono_prefix=$MONO_PREFIX_ARM64 arch=arm64 tools=no target=release
|
||||
lipo -create bin/godot.osx.opt.x86_64.mono bin/godot.osx.opt.arm64.mono -output bin/godot.osx.opt.universal.mono
|
||||
$STRIP bin/godot.osx.opt.universal.mono
|
||||
|
||||
cp -f tmp-lib/*.dylib bin/data.mono.osx.64.release/Mono/lib/
|
||||
cp -f tmp-lib/*.dylib bin/data.mono.osx.64.release_debug/Mono/lib/
|
||||
|
||||
mkdir -p /root/out/templates-mono
|
||||
cp -rvp bin/* /root/out/templates-mono
|
||||
rm -rf bin
|
||||
fi
|
||||
|
||||
echo "macOS build successful"
|
||||
31
build-mono-glue/build.sh
Executable file
31
build-mono-glue/build.sh
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Config
|
||||
|
||||
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
|
||||
|
||||
rm -rf godot
|
||||
mkdir godot
|
||||
cd godot
|
||||
tar xf ../godot.tar.gz --strip-components=1
|
||||
|
||||
# Mono
|
||||
|
||||
if [ "${MONO}" == "1" ]; then
|
||||
echo "Building and generating Mono glue..."
|
||||
|
||||
mono --version
|
||||
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/pkgconfig/
|
||||
|
||||
${SCONS} platform=x11 ${OPTIONS} target=release_debug tools=yes module_mono_enabled=yes mono_glue=no
|
||||
|
||||
rm -rf /root/mono-glue/*
|
||||
xvfb-run bin/godot.x11.opt.tools.64.mono --audio-driver Dummy --generate-mono-glue /root/mono-glue || /bin/true
|
||||
fi
|
||||
|
||||
echo "Mono glue generated successfully"
|
||||
480
build-release.sh
480
build-release.sh
@@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
export basedir=$(pwd)
|
||||
|
||||
# Log output to a file automatically.
|
||||
exec > >(tee -a "out/logs/build-release") 2>&1
|
||||
@@ -30,35 +29,44 @@ 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="Godot.app"
|
||||
_is_mono="$3"
|
||||
|
||||
scp "${_reldir}/${_binname}.zip" "${OSX_HOST}:${_macos_tmpdir}"
|
||||
if [[ "${_is_mono}" == "1" ]]; then
|
||||
_appname="Godot_mono.app"
|
||||
_sharpdir="${_appname}/Contents/Resources/GodotSharp"
|
||||
_extra_files="${_sharpdir}/Mono/lib/*.dylib ${_sharpdir}/Tools/aot-compilers/*/*"
|
||||
else
|
||||
_appname="Godot.app"
|
||||
fi
|
||||
|
||||
scp "${_reldir}/${_binname}.zip" "${OSX_HOST}:${_osx_tmpdir}"
|
||||
scp "${basedir}/git/misc/dist/osx/editor.entitlements" "${OSX_HOST}:${_osx_tmpdir}"
|
||||
ssh "${OSX_HOST}" "
|
||||
cd ${_macos_tmpdir} && \
|
||||
cd ${_osx_tmpdir} && \
|
||||
unzip ${_binname}.zip && \
|
||||
codesign --force --timestamp \
|
||||
--options=runtime \
|
||||
-s ${OSX_KEY_ID} -v ${_appname} && \
|
||||
--options=runtime --entitlements editor.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=$(ssh "${OSX_HOST}" "xcrun notarytool submit ${_osx_tmpdir}/${_binname}_signed.zip --team-id \"${APPLE_TEAM}\" --apple-id \"${APPLE_ID}\" --password \"${APPLE_ID_PASSWORD}\" --no-progress --output-format json")
|
||||
_request_uuid=$(echo ${_request_uuid} | sed -e 's/.*"id":"\([^"]*\)".*/\1/')
|
||||
if ! ssh "${OSX_HOST}" "xcrun notarytool wait ${_request_uuid} --team-id \"${APPLE_TEAM}\" --apple-id \"${APPLE_ID}\" --password \"${APPLE_ID_PASSWORD}\" | grep -q status:\ Accepted"; then
|
||||
echo "Notarization failed."
|
||||
_notarization_log=$(ssh "${OSX_HOST}" "xcrun notarytool log ${_request_uuid} --team-id \"${APPLE_TEAM}\" --apple-id \"${APPLE_ID}\" --password \"${APPLE_ID_PASSWORD}\"")
|
||||
echo "${_notarization_log}"
|
||||
ssh "${OSX_HOST}" "rm -rf ${_macos_tmpdir}"
|
||||
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
|
||||
}
|
||||
|
||||
@@ -66,38 +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}/osx.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} && \
|
||||
cd ${_osx_tmpdir} && \
|
||||
unzip osx.zip && \
|
||||
codesign --force -s - \
|
||||
--options=linker-signed \
|
||||
-v osx_template.app/Contents/MacOS/* && \
|
||||
-v ${_extra_files} osx_template.app/Contents/MacOS/* && \
|
||||
zip -r osx_signed.zip osx_template.app"
|
||||
|
||||
scp "${OSX_HOST}:${_macos_tmpdir}/osx_signed.zip" "${_reldir}/osx.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
|
||||
|
||||
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: classical|none (default: classical)"
|
||||
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
|
||||
;;
|
||||
@@ -109,27 +119,11 @@ while getopts "h?v:t:b:n-:" opt; do
|
||||
;;
|
||||
b)
|
||||
if [ "$OPTARG" == "classical" ]; then
|
||||
build_classical=1
|
||||
elif [ "$OPTARG" == "none" ]; then
|
||||
build_mono=0
|
||||
elif [ "$OPTARG" == "mono" ]; then
|
||||
build_classical=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
|
||||
|
||||
@@ -141,34 +135,34 @@ elif [[ "{$templates_version}" == *"-"* ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export basedir=$(pwd)
|
||||
export webdir="${basedir}/web/${templates_version}"
|
||||
export reldir="${basedir}/releases/${godot_version}"
|
||||
export reldir_mono="${reldir}/mono"
|
||||
export tmpdir="${basedir}/tmp"
|
||||
export templatesdir="${tmpdir}/templates"
|
||||
export templatesdir_mono="${tmpdir}/mono/templates"
|
||||
|
||||
export 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}
|
||||
|
||||
mkdir -p ${reldir}
|
||||
mkdir -p ${templatesdir}
|
||||
|
||||
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
|
||||
|
||||
@@ -178,94 +172,197 @@ if [ "${build_classical}" == "1" ]; then
|
||||
|
||||
# Editor
|
||||
binname="${godot_basename}_x11.64"
|
||||
cp out/linux/x86_64/tools/godot.x11.opt.tools.64 ${binname}
|
||||
cp out/linux/x64/tools/godot.x11.opt.tools.64 ${binname}
|
||||
zip -q -9 "${reldir}/${binname}.zip" ${binname}
|
||||
rm ${binname}
|
||||
|
||||
binname="${godot_basename}_x11.32"
|
||||
cp out/linux/x86_32/tools/godot.x11.opt.tools.32 ${binname}
|
||||
cp out/linux/x86/tools/godot.x11.opt.tools.32 ${binname}
|
||||
zip -q -9 "${reldir}/${binname}.zip" ${binname}
|
||||
rm ${binname}
|
||||
|
||||
binname="${godot_basename}_linux.arm64"
|
||||
cp out/linux/arm64/tools/godot.x11.opt.tools.arm64 ${binname}
|
||||
zip -q -9 "${reldir}/${binname}.zip" ${binname}
|
||||
rm ${binname}
|
||||
|
||||
binname="${godot_basename}_linux.arm32"
|
||||
cp out/linux/arm/tools/godot.x11.opt.tools.arm ${binname}
|
||||
zip -q -9 "${reldir}/${binname}.zip" ${binname}
|
||||
rm ${binname}
|
||||
|
||||
# Templates
|
||||
cp out/linux/x86_64/templates/godot.x11.opt.64 ${templatesdir}/linux_x11_64_release
|
||||
cp out/linux/x86_64/templates/godot.x11.opt.debug.64 ${templatesdir}/linux_x11_64_debug
|
||||
cp out/linux/x86_32/templates/godot.x11.opt.32 ${templatesdir}/linux_x11_32_release
|
||||
cp out/linux/x86_32/templates/godot.x11.opt.debug.32 ${templatesdir}/linux_x11_32_debug
|
||||
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
|
||||
cp out/linux/arm64/templates/godot.x11.opt.arm64 ${templatesdir}/linux_x11_arm64_release
|
||||
cp out/linux/arm64/templates/godot.x11.opt.debug.arm64 ${templatesdir}/linux_x11_arm64_debug
|
||||
cp out/linux/arm/templates/godot.x11.opt.arm ${templatesdir}/linux_x11_arm32_release
|
||||
cp out/linux/arm/templates/godot.x11.opt.debug.arm ${templatesdir}/linux_x11_arm32_debug
|
||||
|
||||
## Windows (Classical) ##
|
||||
|
||||
# Editor
|
||||
binname="${godot_basename}_win64.exe"
|
||||
cp out/windows/x86_64/tools/godot.windows.opt.tools.64.exe ${binname}
|
||||
batname="${godot_basename}_win64_console.cmd"
|
||||
cp out/windows/x64/tools/godot.windows.opt.tools.64.exe ${binname}
|
||||
strip ${binname}
|
||||
sign_windows ${binname}
|
||||
zip -q -9 "${reldir}/${binname}.zip" ${binname}
|
||||
rm ${binname}
|
||||
echo "@echo off" > ${batname}
|
||||
echo ${binname} >> ${batname}
|
||||
echo "pause > nul" >> ${batname}
|
||||
zip -q -9 "${reldir}/${binname}.zip" ${binname} ${batname}
|
||||
rm ${binname} ${batname}
|
||||
|
||||
binname="${godot_basename}_win32.exe"
|
||||
cp out/windows/x86_32/tools/godot.windows.opt.tools.32.exe ${binname}
|
||||
batname="${godot_basename}_win32_console.cmd"
|
||||
cp out/windows/x86/tools/godot.windows.opt.tools.32.exe ${binname}
|
||||
strip ${binname}
|
||||
sign_windows ${binname}
|
||||
zip -q -9 "${reldir}/${binname}.zip" ${binname}
|
||||
rm ${binname}
|
||||
echo "@echo off" > ${batname}
|
||||
echo ${binname} >> ${batname}
|
||||
echo "pause > nul" >> ${batname}
|
||||
zip -q -9 "${reldir}/${binname}.zip" ${binname} ${batname}
|
||||
rm ${binname} ${batname}
|
||||
|
||||
# Templates
|
||||
cp out/windows/x86_64/templates/godot.windows.opt.64.exe ${templatesdir}/windows_64_release.exe
|
||||
cp out/windows/x86_64/templates/godot.windows.opt.debug.64.exe ${templatesdir}/windows_64_debug.exe
|
||||
cp out/windows/x86_32/templates/godot.windows.opt.32.exe ${templatesdir}/windows_32_release.exe
|
||||
cp out/windows/x86_32/templates/godot.windows.opt.debug.32.exe ${templatesdir}/windows_32_debug.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}_osx.64"
|
||||
binname="${godot_basename}_osx.universal"
|
||||
rm -rf Godot.app
|
||||
cp -r git/misc/dist/osx_tools.app Godot.app
|
||||
mkdir -p Godot.app/Contents/MacOS
|
||||
cp out/macos/tools/godot.osx.opt.tools.64 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}
|
||||
sign_macos ${reldir} ${binname} 0
|
||||
|
||||
# Templates
|
||||
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.osx.opt.64 osx_template.app/Contents/MacOS/godot_osx_release.64
|
||||
cp out/macos/templates/godot.osx.opt.debug.64 osx_template.app/Contents/MacOS/godot_osx_debug.64
|
||||
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}
|
||||
sign_macos_template ${templatesdir} 0
|
||||
|
||||
## Web (Classical) ##
|
||||
## Server (Classical) ##
|
||||
|
||||
cp git/misc/dist/html/default.html godot.html
|
||||
cp out/web/templates/godot.javascript.opt.asm.js godot.asm.js
|
||||
cp out/web/templates/godot.javascript.opt.js godot.js
|
||||
cp out/web/templates/godot.javascript.opt.html.mem godot.mem
|
||||
zip -q -9 ${templatesdir}/javascript_release.zip godot.{html,asm.js,js,mem}
|
||||
cp out/web/templates/godot.javascript.opt.debug.asm.js godot.asm.js
|
||||
cp out/web/templates/godot.javascript.opt.debug.js godot.js
|
||||
cp out/web/templates/godot.javascript.opt.debug.html.mem godot.mem
|
||||
zip -q -9 ${templatesdir}/javascript_debug.zip godot.{html,asm.js,js,mem}
|
||||
rm -f godot.{html,asm.js,js,mem}
|
||||
# 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}
|
||||
|
||||
# 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/javascript/tools/godot.javascript.opt.tools.threads.zip -d ${webdir}/
|
||||
brotli --keep --force --quality=11 ${webdir}/*
|
||||
binname="${godot_basename}_web_editor.zip"
|
||||
cp out/javascript/tools/godot.javascript.opt.tools.threads.zip ${reldir}/${binname}
|
||||
|
||||
# Templates
|
||||
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/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/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.release.aar ${reldir}/godot-lib.${templates_version}.release.aar
|
||||
|
||||
# Editor
|
||||
binname="${godot_basename}_android_editor.apk"
|
||||
cp out/android/tools/android_editor.apk ${reldir}/${binname}
|
||||
binname="${godot_basename}_android_editor.aab"
|
||||
cp out/android/tools/android_editor.aab ${reldir}/${binname}
|
||||
|
||||
# Templates
|
||||
cp out/android/templates/*.apk ${templatesdir}/
|
||||
cp out/android/templates/android_source.zip ${templatesdir}/
|
||||
|
||||
## iOS (Classical) ##
|
||||
|
||||
rm -rf ios_xcode
|
||||
cp -r git/misc/dist/ios_xcode ios_xcode
|
||||
cp out/ios/templates/godot.iphone.opt.arm64 ios_xcode/godot_opt.iphone
|
||||
cp out/ios/templates/godot.iphone.opt.debug.arm64 ios_xcode/godot_debug.iphone
|
||||
chmod +x ios_xcode/godot*.iphone
|
||||
zip -q -9 -r "${templatesdir}/GodotiOSXCode.zip" ios_xcode
|
||||
cp out/ios/templates/libgodot.iphone.simulator.a ios_xcode/libgodot.iphone.release.xcframework/ios-arm64_x86_64-simulator/libgodot.a
|
||||
cp out/ios/templates/libgodot.iphone.debug.simulator.a ios_xcode/libgodot.iphone.debug.xcframework/ios-arm64_x86_64-simulator/libgodot.a
|
||||
cp out/ios/templates/libgodot.iphone.a ios_xcode/libgodot.iphone.release.xcframework/ios-arm64/libgodot.a
|
||||
cp out/ios/templates/libgodot.iphone.debug.a ios_xcode/libgodot.iphone.debug.xcframework/ios-arm64/libgodot.a
|
||||
cd ios_xcode
|
||||
zip -q -9 -r "${templatesdir}/iphone.zip" *
|
||||
cd ..
|
||||
rm -rf ios_xcode
|
||||
|
||||
## UWP (Classical) ##
|
||||
|
||||
if [ -d "out/uwp" ]; then
|
||||
# UWP is now optional as it's tricky to get a reproducible build container for it.
|
||||
|
||||
if [ ! -d "deps/angle-uwp" ]; then
|
||||
echo "Downloading ANGLE binaries from https://github.com/godotengine/godot-build-scripts/releases/tag/_deps/"
|
||||
mkdir -p deps && cd deps
|
||||
curl -L -o angle-uwp.7z https://github.com/godotengine/godot-build-scripts/releases/download/_deps/angle-uwp-2.1.13.7z
|
||||
7z x angle-uwp.7z && rm -f angle-uwp.7z
|
||||
cd ..
|
||||
fi
|
||||
|
||||
rm -rf uwp_template_*
|
||||
for arch in ARM Win32 x64; do
|
||||
cp -r git/misc/dist/uwp_template uwp_template_${arch}
|
||||
cp deps/angle-uwp/${arch}/libEGL.dll \
|
||||
deps/angle-uwp/${arch}/libGLESv2.dll \
|
||||
uwp_template_${arch}/
|
||||
cp -r uwp_template_${arch} uwp_template_${arch}_debug
|
||||
done
|
||||
|
||||
cp out/uwp/arm/godot.uwp.opt.32.arm.exe uwp_template_ARM/godot.uwp.exe
|
||||
cp out/uwp/arm/godot.uwp.opt.debug.32.arm.exe uwp_template_ARM_debug/godot.uwp.exe
|
||||
cd uwp_template_ARM && zip -q -9 -r "${templatesdir}/uwp_arm_release.zip" * && cd ..
|
||||
cd uwp_template_ARM_debug && zip -q -9 -r "${templatesdir}/uwp_arm_debug.zip" * && cd ..
|
||||
rm -rf uwp_template_ARM*
|
||||
|
||||
cp out/uwp/x86/godot.uwp.opt.32.x86.exe uwp_template_Win32/godot.uwp.exe
|
||||
cp out/uwp/x86/godot.uwp.opt.debug.32.x86.exe uwp_template_Win32_debug/godot.uwp.exe
|
||||
cd uwp_template_Win32 && zip -q -9 -r "${templatesdir}/uwp_x86_release.zip" * && cd ..
|
||||
cd uwp_template_Win32_debug && zip -q -9 -r "${templatesdir}/uwp_x86_debug.zip" * && cd ..
|
||||
rm -rf uwp_template_Win32*
|
||||
|
||||
cp out/uwp/x64/godot.uwp.opt.64.x64.exe uwp_template_x64/godot.uwp.exe
|
||||
cp out/uwp/x64/godot.uwp.opt.debug.64.x64.exe uwp_template_x64_debug/godot.uwp.exe
|
||||
cd uwp_template_x64 && zip -q -9 -r "${templatesdir}/uwp_x64_release.zip" * && cd ..
|
||||
cd uwp_template_x64_debug && zip -q -9 -r "${templatesdir}/uwp_x64_debug.zip" * && cd ..
|
||||
rm -rf uwp_template_x64*
|
||||
else
|
||||
echo "Skipping UWP templates as no builds were found."
|
||||
fi
|
||||
|
||||
## Templates TPZ (Classical) ##
|
||||
|
||||
echo "${templates_version}" > ${templatesdir}/version.txt
|
||||
@@ -283,4 +380,195 @@ if [ "${build_classical}" == "1" ]; then
|
||||
|
||||
fi
|
||||
|
||||
# Mono
|
||||
|
||||
if [ "${build_mono}" == "1" ]; then
|
||||
|
||||
## Linux (Mono) ##
|
||||
|
||||
# Editor
|
||||
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
|
||||
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_x11"
|
||||
mkdir -p ${binbasename}_32
|
||||
cp out/linux/x86/tools-mono/godot.x11.opt.tools.32.mono ${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 -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
|
||||
|
||||
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"
|
||||
batname="${godot_basename}_mono_win64_console.cmd"
|
||||
mkdir -p ${binname}
|
||||
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/x64/tools-mono/GodotSharp ${binname}/
|
||||
cp -rp out/aot-compilers ${binname}/GodotSharp/Tools/
|
||||
echo "@echo off" > ${batname}
|
||||
echo ${binname}.exe >> ${batname}
|
||||
echo "pause > nul" >> ${batname}
|
||||
mv ${batname} ${binname}/
|
||||
zip -r -q -9 "${reldir_mono}/${binname}.zip" ${binname}
|
||||
rm -rf ${binname}
|
||||
|
||||
binname="${godot_basename}_mono_win32"
|
||||
batname="${godot_basename}_mono_win32_console.cmd"
|
||||
mkdir -p ${binname}
|
||||
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/tools-mono/GodotSharp ${binname}/
|
||||
cp -rp out/aot-compilers ${binname}/GodotSharp/Tools/
|
||||
echo "@echo off" > ${batname}
|
||||
echo ${binname}.exe >> ${batname}
|
||||
echo "pause > nul" >> ${batname}
|
||||
mv ${batname} ${binname}/
|
||||
zip -r -q -9 "${reldir_mono}/${binname}.zip" ${binname}
|
||||
rm -rf ${binname}
|
||||
|
||||
# Templates
|
||||
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
|
||||
|
||||
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_osx.universal"
|
||||
rm -rf Godot_mono.app
|
||||
cp -r git/misc/dist/osx_tools.app Godot_mono.app
|
||||
mkdir -p Godot_mono.app/Contents/{MacOS,Resources}
|
||||
cp out/macosx/tools-mono/godot.osx.opt.tools.universal.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} 1
|
||||
|
||||
# Templates
|
||||
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.universal.mono osx_template.app/Contents/MacOS/godot_osx_debug.64
|
||||
cp out/macosx/templates-mono/godot.osx.opt.universal.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.release.aar ${reldir_mono}/godot-lib.${templates_version}.mono.release.aar
|
||||
|
||||
# Editor
|
||||
#binname="${godot_basename}_mono_android_editor.apk"
|
||||
#cp out/android/tools-mono/android_editor.apk ${reldir_mono}/${binname}
|
||||
|
||||
# Templates
|
||||
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/ios_xcode ios_xcode
|
||||
cp out/ios/templates-mono/libgodot.iphone.simulator.a ios_xcode/libgodot.iphone.release.xcframework/ios-arm64_x86_64-simulator/libgodot.a
|
||||
cp out/ios/templates-mono/libgodot.iphone.debug.simulator.a ios_xcode/libgodot.iphone.debug.xcframework/ios-arm64_x86_64-simulator/libgodot.a
|
||||
cp out/ios/templates-mono/libgodot.iphone.a ios_xcode/libgodot.iphone.release.xcframework/ios-arm64/libgodot.a
|
||||
cp out/ios/templates-mono/libgodot.iphone.debug.a ios_xcode/libgodot.iphone.debug.xcframework/ios-arm64/libgodot.a
|
||||
cd ios_xcode
|
||||
zip -q -9 -r "${templatesdir_mono}/iphone.zip" *
|
||||
cd ..
|
||||
rm -rf ios_xcode
|
||||
|
||||
mkdir -p ${templatesdir_mono}/bcl
|
||||
cp -r out/ios/templates-mono/bcl/monotouch* ${templatesdir_mono}/bcl/
|
||||
cp -r out/ios/templates-mono/iphone-mono-libs ${templatesdir_mono}
|
||||
|
||||
## UWP (Mono) ##
|
||||
|
||||
# Not supported yet.
|
||||
|
||||
## Templates TPZ (Mono) ##
|
||||
|
||||
echo "${templates_version}.mono" > ${templatesdir_mono}/version.txt
|
||||
pushd ${templatesdir_mono}/..
|
||||
zip -q -9 -r -D "${reldir_mono}/${godot_basename}_mono_export_templates.tpz" templates/*
|
||||
popd
|
||||
|
||||
## SHA-512 sums (Mono) ##
|
||||
|
||||
pushd ${reldir_mono}
|
||||
sha512sum [Gg]* >> SHA512-SUMS.txt
|
||||
mkdir -p ${basedir}/sha512sums/${godot_version}/mono
|
||||
cp SHA512-SUMS.txt ${basedir}/sha512sums/${godot_version}/mono/
|
||||
popd
|
||||
|
||||
fi
|
||||
|
||||
echo "All editor binaries and templates prepared successfully for release"
|
||||
|
||||
54
build-server/build.sh
Executable file
54
build-server/build.sh
Executable file
@@ -0,0 +1,54 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Config
|
||||
|
||||
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
|
||||
export OPTIONS="production=yes"
|
||||
export OPTIONS_MONO="module_mono_enabled=yes mono_static=yes mono_prefix=/root/mono-installs/desktop-linux-x86_64-release"
|
||||
export TERM=xterm
|
||||
export PATH="${GODOT_SDK_LINUX_X86_64}/bin:${BASE_PATH}"
|
||||
|
||||
rm -rf godot
|
||||
mkdir godot
|
||||
cd godot
|
||||
tar xf /root/godot.tar.gz --strip-components=1
|
||||
|
||||
# Classical
|
||||
|
||||
if [ "${CLASSICAL}" == "1" ]; then
|
||||
echo "Starting classical build for Server..."
|
||||
|
||||
$SCONS platform=server $OPTIONS tools=yes target=release_debug
|
||||
mkdir -p /root/out/x64/tools
|
||||
cp -rvp bin/* /root/out/x64/tools
|
||||
rm -rf bin
|
||||
|
||||
$SCONS platform=server $OPTIONS tools=no target=release
|
||||
mkdir -p /root/out/x64/templates
|
||||
cp -rvp bin/* /root/out/x64/templates
|
||||
rm -rf bin
|
||||
fi
|
||||
|
||||
# Mono
|
||||
|
||||
if [ "${MONO}" == "1" ]; then
|
||||
echo "Starting Mono build for Server..."
|
||||
|
||||
cp /root/mono-glue/*.cpp modules/mono/glue/
|
||||
cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/
|
||||
cp -r /root/mono-glue/GodotSharp/GodotSharpEditor/Generated modules/mono/glue/GodotSharp/GodotSharpEditor/
|
||||
|
||||
$SCONS platform=server $OPTIONS $OPTIONS_MONO tools=yes target=release_debug copy_mono_root=yes
|
||||
mkdir -p /root/out/x64/tools-mono
|
||||
cp -rvp bin/* /root/out/x64/tools-mono
|
||||
rm -rf bin
|
||||
|
||||
$SCONS platform=server $OPTIONS $OPTIONS_MONO tools=no target=release
|
||||
mkdir -p /root/out/x64/templates-mono
|
||||
cp -rvp bin/* /root/out/x64/templates-mono
|
||||
rm -rf bin
|
||||
fi
|
||||
|
||||
echo "Server build successful"
|
||||
3
build-uwp/build.bat
Executable file
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 -j8 verbose=yes warnings=no progress=no"
|
||||
export OPTIONS="production=yes"
|
||||
export BUILD_ARCHES="x86 x64 arm"
|
||||
export ANGLE_SRC_PATH='c:\angle'
|
||||
|
||||
rm -rf godot
|
||||
mkdir godot
|
||||
cd godot
|
||||
tar xf /root/godot.tar.gz --strip-components=1
|
||||
|
||||
# Classical
|
||||
|
||||
if [ "${CLASSICAL}" == "1" ]; then
|
||||
echo "Starting classical build for UWP..."
|
||||
|
||||
for arch in ${BUILD_ARCHES}; do
|
||||
for release in release release_debug; do
|
||||
wine cmd /c /root/build/build.bat $arch $release
|
||||
|
||||
sync
|
||||
wineserver -kw
|
||||
|
||||
mkdir -p /root/out/$arch
|
||||
mv bin/* /root/out/$arch
|
||||
done
|
||||
done
|
||||
fi
|
||||
|
||||
# Mono
|
||||
|
||||
if [ "${MONO}" == "1" ]; then
|
||||
echo "No Mono support for UWP yet."
|
||||
#cp /root/mono-glue/*.cpp modules/mono/glue/
|
||||
#cp -r /root/mono-glue/Managed/Generated modules/mono/glue/Managed/
|
||||
fi
|
||||
|
||||
echo "UWP build successful"
|
||||
36
build-uwp/env-arm.bat
Executable file
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,26 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Config
|
||||
|
||||
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
|
||||
export OPTIONS=""
|
||||
|
||||
source /root/emsdk/emsdk_env.sh
|
||||
export EMSCRIPTEN_ROOT=/root/emsdk/fastcomp/emscripten
|
||||
|
||||
rm -rf godot
|
||||
mkdir godot
|
||||
cd godot
|
||||
tar xf /root/godot.tar.gz --strip-components=1
|
||||
|
||||
echo "Starting classical build for Web..."
|
||||
|
||||
$SCONS platform=javascript ${OPTIONS} tools=no target=release_debug
|
||||
$SCONS platform=javascript ${OPTIONS} tools=no target=release
|
||||
|
||||
mkdir -p /root/out/templates
|
||||
cp -rvp bin/* /root/out/templates
|
||||
|
||||
echo "Web build successful"
|
||||
@@ -5,40 +5,79 @@ set -e
|
||||
# Config
|
||||
|
||||
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
|
||||
export OPTIONS=""
|
||||
export STRIP="x86_64-w64-mingw32-strip"
|
||||
export OPTIONS="production=yes"
|
||||
export OPTIONS_MONO="module_mono_enabled=yes mono_static=yes"
|
||||
export MONO_PREFIX_X86_64="/root/mono-installs/desktop-windows-x86_64-release"
|
||||
export MONO_PREFIX_X86="/root/mono-installs/desktop-windows-x86-release"
|
||||
export TERM=xterm
|
||||
|
||||
rm -rf godot
|
||||
mkdir godot
|
||||
cd godot
|
||||
tar xf /root/godot.tar.gz --strip-components=1
|
||||
|
||||
echo "Starting classical build for Windows..."
|
||||
# Classical
|
||||
|
||||
$SCONS platform=windows bits=64 $OPTIONS tools=yes target=release_debug
|
||||
$STRIP bin/godot.windows.*
|
||||
mkdir -p /root/out/x86_64/tools
|
||||
cp -rvp bin/* /root/out/x86_64/tools
|
||||
rm -rf bin
|
||||
if [ "${CLASSICAL}" == "1" ]; then
|
||||
echo "Starting classical build for Windows..."
|
||||
|
||||
$SCONS platform=windows bits=64 $OPTIONS tools=no target=release_debug
|
||||
$SCONS platform=windows bits=64 $OPTIONS tools=no target=release
|
||||
$STRIP bin/godot.windows.*
|
||||
mkdir -p /root/out/x86_64/templates
|
||||
cp -rvp bin/* /root/out/x86_64/templates
|
||||
rm -rf bin
|
||||
$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 bits=32 $OPTIONS tools=yes target=release_debug
|
||||
$STRIP bin/godot.windows.*
|
||||
mkdir -p /root/out/x86_32/tools
|
||||
cp -rvp bin/* /root/out/x86_32/tools
|
||||
rm -rf bin
|
||||
$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 bits=32 $OPTIONS tools=no target=release_debug
|
||||
$SCONS platform=windows bits=32 $OPTIONS tools=no target=release
|
||||
$STRIP bin/godot.windows.*
|
||||
mkdir -p /root/out/x86_32/templates
|
||||
cp -rvp bin/* /root/out/x86_32/templates
|
||||
rm -rf bin
|
||||
$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 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
|
||||
fi
|
||||
|
||||
# Mono
|
||||
|
||||
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/
|
||||
|
||||
export OPTIONS_MONO_PREFIX="${OPTIONS} ${OPTIONS_MONO} mono_prefix=${MONO_PREFIX_X86_64}"
|
||||
|
||||
$SCONS platform=windows bits=64 $OPTIONS_MONO_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 bits=64 $OPTIONS_MONO_PREFIX tools=no target=release_debug
|
||||
$SCONS platform=windows bits=64 $OPTIONS_MONO_PREFIX tools=no target=release
|
||||
mkdir -p /root/out/x64/templates-mono
|
||||
cp -rvp bin/* /root/out/x64/templates-mono
|
||||
rm -rf bin
|
||||
|
||||
export OPTIONS_MONO_PREFIX="${OPTIONS} ${OPTIONS_MONO} mono_prefix=${MONO_PREFIX_X86}"
|
||||
|
||||
$SCONS platform=windows bits=32 $OPTIONS_MONO_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 bits=32 $OPTIONS_MONO_PREFIX tools=no target=release_debug
|
||||
$SCONS platform=windows bits=32 $OPTIONS_MONO_PREFIX tools=no target=release
|
||||
mkdir -p /root/out/x86/templates-mono
|
||||
cp -rvp bin/* /root/out/x86/templates-mono
|
||||
rm -rf bin
|
||||
fi
|
||||
|
||||
echo "Windows build successful"
|
||||
|
||||
121
build.sh
121
build.sh
@@ -13,6 +13,7 @@ exec > >(tee -a "out/logs/build") 2>&1
|
||||
|
||||
# Config
|
||||
|
||||
# For default registry and number of cores.
|
||||
if [ ! -e config.sh ]; then
|
||||
echo "No config.sh, copying default values from config.sh.in."
|
||||
cp config.sh.in config.sh
|
||||
@@ -27,41 +28,79 @@ if [ -z "${NUM_CORES}" ]; then
|
||||
export NUM_CORES=16
|
||||
fi
|
||||
|
||||
registry="${REGISTRY}"
|
||||
username=""
|
||||
password=""
|
||||
godot_version=""
|
||||
git_treeish="master"
|
||||
build_classical=1
|
||||
build_mono=1
|
||||
force_download=0
|
||||
skip_download=1
|
||||
skip_git_checkout=0
|
||||
build_uwp=0
|
||||
|
||||
while getopts "h?v:g:fc" opt; do
|
||||
while getopts "h?r:u:p:v:g:b:fscw" opt; do
|
||||
case "$opt" in
|
||||
h|\?)
|
||||
echo "Usage: $0 [OPTIONS...]"
|
||||
echo
|
||||
echo " -v godot version (e.g. 2.1.7-stable) [mandatory]"
|
||||
echo " -r registry"
|
||||
echo " -u username"
|
||||
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 (default: all)"
|
||||
echo " -f force redownload of all images"
|
||||
echo " -s skip downloading"
|
||||
echo " -c skip checkout"
|
||||
echo " -w build UWP templates"
|
||||
echo
|
||||
exit 1
|
||||
;;
|
||||
r)
|
||||
registry=$OPTARG
|
||||
;;
|
||||
u)
|
||||
username=$OPTARG
|
||||
;;
|
||||
p)
|
||||
password=$OPTARG
|
||||
;;
|
||||
v)
|
||||
godot_version=$OPTARG
|
||||
;;
|
||||
g)
|
||||
git_treeish=$OPTARG
|
||||
;;
|
||||
b)
|
||||
if [ "$OPTARG" == "classical" ]; then
|
||||
build_mono=0
|
||||
elif [ "$OPTARG" == "mono" ]; then
|
||||
build_classical=0
|
||||
fi
|
||||
;;
|
||||
f)
|
||||
force_download=1
|
||||
;;
|
||||
s)
|
||||
skip_download=1
|
||||
;;
|
||||
c)
|
||||
skip_git_checkout=1
|
||||
;;
|
||||
w)
|
||||
build_uwp=1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
export podman=${PODMAN}
|
||||
|
||||
if [ $UID != 0 ] && grep -qv sudo <<< "${podman}"; then
|
||||
echo "WARNING: Running as non-root may cause problems for the uwp build"
|
||||
fi
|
||||
|
||||
if [ -z "${godot_version}" ]; then
|
||||
echo "-v <version> is mandatory!"
|
||||
exit 1
|
||||
@@ -77,6 +116,49 @@ case "$choice" in
|
||||
esac
|
||||
export GODOT_VERSION_STATUS="${status}"
|
||||
|
||||
if [ ! -z "${username}" ] && [ ! -z "${password}" ]; then
|
||||
if ${podman} login ${registry} -u "${username}" -p "${password}"; then
|
||||
export logged_in=true
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $skip_download == 0 ]; then
|
||||
echo "Fetching images"
|
||||
for image in mono-glue windows linux 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"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! -z "${logged_in}" ]; then
|
||||
echo "Fetching private images"
|
||||
|
||||
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"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
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
|
||||
@@ -100,37 +182,50 @@ EOF
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sh ../make_tarball.sh -v ${godot_version} -g ${git_treeish}
|
||||
sh misc/scripts/make_tarball.sh -v ${godot_version} -g ${git_treeish}
|
||||
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} -v ${basedir}/godot-${godot_version}.tar.gz:/root/godot.tar.gz -w /root/"
|
||||
export podman_run="${podman} run -it --rm --env BUILD_NAME=${BUILD_NAME} --env GODOT_VERSION_STATUS=${GODOT_VERSION_STATUS} --env NUM_CORES=${NUM_CORES} --env CLASSICAL=${build_classical} --env MONO=${build_mono} -v ${basedir}/godot-${godot_version}.tar.gz:/root/godot.tar.gz -v ${basedir}/mono-glue:/root/mono-glue -w /root/"
|
||||
export img_version=$IMAGE_VERSION
|
||||
|
||||
# Get AOT compilers from their containers.
|
||||
mkdir -p ${basedir}/out/aot-compilers
|
||||
${podman} run -it --rm -w /root -v ${basedir}/out/aot-compilers:/root/out localhost/godot-ios:${img_version} bash -c "cp -r /root/aot-compilers/* /root/out && chmod +x /root/out/*/*"
|
||||
|
||||
mkdir -p ${basedir}/mono-glue
|
||||
${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 --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 localhost/godot-linux:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/linux
|
||||
|
||||
mkdir -p ${basedir}/out/web
|
||||
${podman_run} -v ${basedir}/build-web:/root/build -v ${basedir}/out/web:/root/out localhost/godot-web:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/web
|
||||
mkdir -p ${basedir}/out/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/macos
|
||||
${podman_run} -v ${basedir}/build-macos:/root/build -v ${basedir}/out/macos:/root/out localhost/godot-osx:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/macos
|
||||
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 localhost/godot-android:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/android
|
||||
${podman_run} -v ${basedir}/build-android:/root/build -v ${basedir}/out/android:/root/out -v ${basedir}/deps/keystore:/root/keystore localhost/godot-android:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/android
|
||||
|
||||
mkdir -p ${basedir}/out/ios
|
||||
${podman_run} -v ${basedir}/build-ios:/root/build -v ${basedir}/out/ios:/root/out localhost/godot-ios:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/ios
|
||||
|
||||
mkdir -p ${basedir}/out/server
|
||||
${podman_run} -v ${basedir}/build-server:/root/build -v ${basedir}/out/server:/root/out localhost/godot-linux:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/server
|
||||
|
||||
if [ "${build_uwp}" == "1" ]; then
|
||||
mkdir -p ${basedir}/out/uwp
|
||||
${podman_run} --ulimit nofile=32768:32768 -v ${basedir}/build-uwp:/root/build -v ${basedir}/out/uwp:/root/out ${registry}/godot-private/uwp:latest bash build/build.sh 2>&1 | tee ${basedir}/out/logs/uwp
|
||||
fi
|
||||
|
||||
uid=$(id -un)
|
||||
gid=$(id -gn)
|
||||
if [ ! -z "$SUDO_UID" ]; then
|
||||
uid="${SUDO_UID}"
|
||||
gid="${SUDO_GID}"
|
||||
fi
|
||||
chown -R -f $uid:$gid ${basedir}/git ${basedir}/out ${basedir}/godot*.tar.gz
|
||||
|
||||
echo "All builds completed. Check `out/logs/` to validate that they all succeeded (e.g. `tail -n 1 out/logs/*`)."
|
||||
chown -R -f $uid:$gid ${basedir}/git ${basedir}/out ${basedir}/mono-glue ${basedir}/godot*.tar.gz
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
rm -rf releases steam tmp web
|
||||
rm -rf releases tmp web
|
||||
|
||||
2
clean.sh
2
clean.sh
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
rm -rf godot*.tar.gz mono-glue out releases steam tmp web
|
||||
rm -rf godot*.tar.gz mono-glue out releases tmp web
|
||||
git status
|
||||
|
||||
55
config.sh.in
55
config.sh.in
@@ -10,19 +10,44 @@
|
||||
# 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'
|
||||
export PODMAN='sudo 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=''
|
||||
|
||||
# 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='2.1-f43'
|
||||
export IMAGE_VERSION='3.7-f42-mono-6.12.0.206'
|
||||
|
||||
# Default build name used to distinguish between official and custom builds.
|
||||
export BUILD_REVISION='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.
|
||||
# If you do not fill all SIGN_* fields, signing will be skipped.
|
||||
# If you do not fill all WINDOWS_SIGN_* fields, signing will be skipped.
|
||||
|
||||
# Name and URL of the signed application.
|
||||
# Use your own when making a thirdparty build.
|
||||
@@ -40,3 +65,25 @@ export OSX_BUNDLE_ID=''
|
||||
export APPLE_TEAM=''
|
||||
export APPLE_ID=''
|
||||
export APPLE_ID_PASSWORD=''
|
||||
|
||||
# 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=''
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ ! -e "version.py" ]; then
|
||||
echo "This script should be ran from the root folder of the Godot repository."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
while getopts "h?sv:g:" opt; do
|
||||
case "$opt" in
|
||||
h|\?)
|
||||
echo "Usage: $0 [OPTIONS...]"
|
||||
echo
|
||||
echo " -s script friendly file name (godot.tar.gz)"
|
||||
echo " -v godot version for file name (e.g. 4.0-stable)"
|
||||
echo " -g git treeish to archive (e.g. master)"
|
||||
echo
|
||||
exit 1
|
||||
;;
|
||||
s)
|
||||
script_friendly_name=1
|
||||
;;
|
||||
v)
|
||||
godot_version=$OPTARG
|
||||
;;
|
||||
g)
|
||||
git_treeish=$OPTARG
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ ! -z "$git_treeish" ]; then
|
||||
HEAD=$(git rev-parse $git_treeish)
|
||||
else
|
||||
HEAD=$(git rev-parse HEAD)
|
||||
fi
|
||||
|
||||
if [ ! -z "$script_friendly_name" ]; then
|
||||
NAME=godot
|
||||
else
|
||||
if [ ! -z "$godot_version" ]; then
|
||||
NAME=godot-$godot_version
|
||||
else
|
||||
NAME=godot-$HEAD
|
||||
fi
|
||||
fi
|
||||
|
||||
CURDIR=$(pwd)
|
||||
TMPDIR=$(mktemp -d -t godot-XXXXXX)
|
||||
|
||||
echo "Generating tarball for revision $HEAD with folder name '$NAME'."
|
||||
echo
|
||||
echo "The tarball will be written to the parent folder:"
|
||||
echo " $(dirname $CURDIR)/$NAME.tar.gz"
|
||||
|
||||
git archive $HEAD --prefix=$NAME/ -o $TMPDIR/$NAME.tar
|
||||
|
||||
# Adding custom .git/HEAD to tarball so that we can generate VERSION_HASH.
|
||||
cd $TMPDIR
|
||||
mkdir -p $NAME/.git
|
||||
echo $HEAD > $NAME/.git/HEAD
|
||||
tar -uf $NAME.tar $NAME
|
||||
|
||||
cd $CURDIR
|
||||
gzip -c $TMPDIR/$NAME.tar > ../$NAME.tar.gz
|
||||
|
||||
rm -rf $TMPDIR
|
||||
@@ -73,6 +73,11 @@ if [ "${status}" == "stable" -a "${skip_stable}" == "0" ]; then
|
||||
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
|
||||
fi
|
||||
|
||||
# Upload to GitHub godot-builds
|
||||
@@ -101,14 +106,69 @@ if [ "${status}" == "stable" -a "${skip_stable}" == "0" ]; then
|
||||
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]*
|
||||
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/templates/*
|
||||
cp -f ${basedir}/git/*.{md,txt,png,svg} content/
|
||||
pushd content/bin/
|
||||
unzip ${reldir}/${namever}_x11.64.zip
|
||||
unzip ${reldir}/${namever}_x11.32.zip
|
||||
unzip ${reldir}/${namever}_win64.exe.zip
|
||||
unzip ${reldir}/${namever}_win32.exe.zip
|
||||
unzip ${reldir}/${namever}_osx.universal.zip
|
||||
mv ${namever}_x11.64 godot.x11.opt.tools.64
|
||||
mv ${namever}_x11.32 godot.x11.opt.tools.32
|
||||
mv ${namever}_win64.exe godot.windows.opt.tools.64.exe
|
||||
mv ${namever}_win32.exe godot.windows.opt.tools.32.exe
|
||||
popd
|
||||
unzip ${reldir}/${namever}_export_templates.tpz -d content/editor_data/templates/
|
||||
mv content/editor_data/templates/{templates,${template_version}}
|
||||
steam_build/build.sh
|
||||
popd
|
||||
|
||||
echo "All stable release upload steps done."
|
||||
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}"
|
||||
|
||||
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