mirror of
https://github.com/godotengine/godot-build-scripts.git
synced 2026-01-04 02:09:44 +03:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
02e092ce76 | ||
|
|
4863750c00 | ||
|
|
37938758d8 | ||
|
|
79967d5bb9 | ||
|
|
37876d4d40 | ||
|
|
9f25ceccfb |
@@ -88,9 +88,7 @@ fi
|
|||||||
|
|
||||||
# Mono
|
# Mono
|
||||||
|
|
||||||
# No Android support with .NET 6 yet.
|
if [ "${MONO}" == "1" ]; then
|
||||||
#if [ "${MONO}" == "1" ]; then
|
|
||||||
if false; then
|
|
||||||
echo "Starting Mono build for Android..."
|
echo "Starting Mono build for Android..."
|
||||||
|
|
||||||
cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/
|
cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/
|
||||||
@@ -115,7 +113,7 @@ if false; then
|
|||||||
cp bin/android_source.zip /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_debug.apk /root/out/templates-mono/
|
||||||
cp bin/android_release.apk /root/out/templates-mono/
|
cp bin/android_release.apk /root/out/templates-mono/
|
||||||
cp bin/godot-lib.release.aar /root/out/templates-mono/
|
cp bin/godot-lib.template_release.aar /root/out/templates-mono/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Android build successful"
|
echo "Android build successful"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ set -e
|
|||||||
# Config
|
# Config
|
||||||
|
|
||||||
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
|
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
|
||||||
export OPTIONS="osxcross_sdk=darwin22 production=yes use_volk=no vulkan_sdk_path=/root/vulkansdk"
|
export OPTIONS="osxcross_sdk=darwin22 production=yes use_volk=no vulkan_sdk_path=/root/vulkansdk angle_libs=/root/angle"
|
||||||
export OPTIONS_MONO="module_mono_enabled=yes"
|
export OPTIONS_MONO="module_mono_enabled=yes"
|
||||||
export STRIP="x86_64-apple-darwin22-strip -u -r"
|
export STRIP="x86_64-apple-darwin22-strip -u -r"
|
||||||
export TERM=xterm
|
export TERM=xterm
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
export basedir=$(pwd)
|
|
||||||
|
|
||||||
# Config
|
# Config
|
||||||
|
|
||||||
@@ -49,11 +48,12 @@ sign_macos() {
|
|||||||
-s ${OSX_KEY_ID} -v ${_appname} && \
|
-s ${OSX_KEY_ID} -v ${_appname} && \
|
||||||
zip -r ${_binname}_signed.zip ${_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 altool --notarize-app --primary-bundle-id \"${OSX_BUNDLE_ID}\" --username \"${APPLE_ID}\" --password \"${APPLE_ID_PASSWORD}\" --file ${_macos_tmpdir}/${_binname}_signed.zip")
|
||||||
_request_uuid=$(echo ${_request_uuid} | sed -e 's/.*"id":"\([^"]*\)".*/\1/')
|
_request_uuid=$(echo ${_request_uuid} | sed -e 's/.*RequestUUID = //')
|
||||||
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
|
ssh "${OSX_HOST}" "while xcrun altool --notarization-info ${_request_uuid} -u \"${APPLE_ID}\" -p \"${APPLE_ID_PASSWORD}\" | grep -q Status:\ in\ progress; do echo Waiting on Apple notarization...; sleep 30s; done"
|
||||||
|
if ! ssh "${OSX_HOST}" "xcrun altool --notarization-info ${_request_uuid} -u \"${APPLE_ID}\" -p \"${APPLE_ID_PASSWORD}\" | grep -q Status:\ success"; then
|
||||||
echo "Notarization failed."
|
echo "Notarization failed."
|
||||||
_notarization_log=$(ssh "${OSX_HOST}" "xcrun notarytool log ${_request_uuid} --team-id \"${APPLE_TEAM}\" --apple-id \"${APPLE_ID}\" --password \"${APPLE_ID_PASSWORD}\"")
|
_notarization_log=$(ssh "${OSX_HOST}" "xcrun altool --notarization-info ${_request_uuid} -u \"${APPLE_ID}\" -p \"${APPLE_ID_PASSWORD}\"")
|
||||||
echo "${_notarization_log}"
|
echo "${_notarization_log}"
|
||||||
ssh "${OSX_HOST}" "rm -rf ${_macos_tmpdir}"
|
ssh "${OSX_HOST}" "rm -rf ${_macos_tmpdir}"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -104,21 +104,6 @@ publish_nuget_packages() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
can_publish_maven=0
|
|
||||||
if [ ! -d "${basedir}/deps/keystore" ]; then
|
|
||||||
echo "Disabling Android library publishing as ${basedir}/deps/keystore doesn't exist."
|
|
||||||
else
|
|
||||||
can_publish_maven=1
|
|
||||||
fi
|
|
||||||
|
|
||||||
publish_maven_library() {
|
|
||||||
if [ $can_publish_maven == 0 ]; then
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
# FIXME: Might be worth reworking the script to make it all sudo-safe and use appropriate users throughout.
|
|
||||||
sudo sh build-android/upload-mavencentral.sh
|
|
||||||
}
|
|
||||||
|
|
||||||
godot_version=""
|
godot_version=""
|
||||||
templates_version=""
|
templates_version=""
|
||||||
do_cleanup=1
|
do_cleanup=1
|
||||||
@@ -126,9 +111,8 @@ make_tarball=1
|
|||||||
build_classical=1
|
build_classical=1
|
||||||
build_mono=1
|
build_mono=1
|
||||||
publish_nuget=0
|
publish_nuget=0
|
||||||
publish_maven=0
|
|
||||||
|
|
||||||
while getopts "h?v:t:b:p:n-:" opt; do
|
while getopts "h?v:t:b:n-:" opt; do
|
||||||
case "$opt" in
|
case "$opt" in
|
||||||
h|\?)
|
h|\?)
|
||||||
echo "Usage: $0 [OPTIONS...]"
|
echo "Usage: $0 [OPTIONS...]"
|
||||||
@@ -136,7 +120,7 @@ while getopts "h?v:t:b:p:n-:" opt; do
|
|||||||
echo " -v godot version (e.g: 3.2-stable) [mandatory]"
|
echo " -v godot version (e.g: 3.2-stable) [mandatory]"
|
||||||
echo " -t templates version (e.g. 3.2.stable) [mandatory]"
|
echo " -t templates version (e.g. 3.2.stable) [mandatory]"
|
||||||
echo " -b build target: all|classical|mono|none (default: all)"
|
echo " -b build target: all|classical|mono|none (default: all)"
|
||||||
echo " -p publish target: all|nuget|maven|none (default: none)"
|
echo " -n publish nuget packages (default: false)"
|
||||||
echo " --no-cleanup disable deleting pre-existing output folders (default: false)"
|
echo " --no-cleanup disable deleting pre-existing output folders (default: false)"
|
||||||
echo " --no-tarball disable generating source tarball (default: false)"
|
echo " --no-tarball disable generating source tarball (default: false)"
|
||||||
echo
|
echo
|
||||||
@@ -158,15 +142,8 @@ while getopts "h?v:t:b:p:n-:" opt; do
|
|||||||
build_mono=0
|
build_mono=0
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
p)
|
n)
|
||||||
if [ "$OPTARG" == "nuget" ]; then
|
publish_nuget=1
|
||||||
publish_nuget=1
|
|
||||||
elif [ "$OPTARG" == "maven" ]; then
|
|
||||||
publish_maven=1
|
|
||||||
elif [ "$OPTARG" == "all" ]; then
|
|
||||||
publish_nuget=1
|
|
||||||
publish_maven=1
|
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
-)
|
-)
|
||||||
case "${OPTARG}" in
|
case "${OPTARG}" in
|
||||||
@@ -195,6 +172,7 @@ elif [[ "{$templates_version}" == *"-"* ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
export basedir=$(pwd)
|
||||||
export webdir="${basedir}/web/${templates_version}"
|
export webdir="${basedir}/web/${templates_version}"
|
||||||
export reldir="${basedir}/releases/${godot_version}"
|
export reldir="${basedir}/releases/${godot_version}"
|
||||||
export reldir_mono="${reldir}/mono"
|
export reldir_mono="${reldir}/mono"
|
||||||
@@ -475,6 +453,15 @@ if [ "${build_mono}" == "1" ]; then
|
|||||||
rm -rf macos_template.app
|
rm -rf macos_template.app
|
||||||
sign_macos_template ${templatesdir_mono} 1
|
sign_macos_template ${templatesdir_mono} 1
|
||||||
|
|
||||||
|
## Android (Mono) ##
|
||||||
|
|
||||||
|
# Lib for direct download
|
||||||
|
cp out/android/templates-mono/godot-lib.template_release.aar ${reldir_mono}/godot-lib.${templates_version}.mono.template_release.aar
|
||||||
|
|
||||||
|
# Templates
|
||||||
|
cp out/android/templates-mono/*.apk ${templatesdir_mono}/
|
||||||
|
cp out/android/templates-mono/android_source.zip ${templatesdir_mono}/
|
||||||
|
|
||||||
# No .NET support for those platforms yet.
|
# No .NET support for those platforms yet.
|
||||||
|
|
||||||
if false; then
|
if false; then
|
||||||
@@ -485,15 +472,6 @@ if [ "${build_mono}" == "1" ]; then
|
|||||||
cp out/web/templates-mono/godot.web.template_debug.wasm32.mono.zip ${templatesdir_mono}/web_debug.zip
|
cp out/web/templates-mono/godot.web.template_debug.wasm32.mono.zip ${templatesdir_mono}/web_debug.zip
|
||||||
cp out/web/templates-mono/godot.web.template_release.wasm32.mono.zip ${templatesdir_mono}/web_release.zip
|
cp out/web/templates-mono/godot.web.template_release.wasm32.mono.zip ${templatesdir_mono}/web_release.zip
|
||||||
|
|
||||||
## Android (Mono) ##
|
|
||||||
|
|
||||||
# Lib for direct download
|
|
||||||
cp out/android/templates-mono/godot-lib.template_release.aar ${reldir_mono}/godot-lib.${templates_version}.mono.template_release.aar
|
|
||||||
|
|
||||||
# Templates
|
|
||||||
cp out/android/templates-mono/*.apk ${templatesdir_mono}/
|
|
||||||
cp out/android/templates-mono/android_source.zip ${templatesdir_mono}/
|
|
||||||
|
|
||||||
## iOS (Mono) ##
|
## iOS (Mono) ##
|
||||||
|
|
||||||
rm -rf ios_xcode
|
rm -rf ios_xcode
|
||||||
@@ -537,13 +515,4 @@ if [ "${publish_nuget}" == "1" ]; then
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Godot Android library
|
|
||||||
|
|
||||||
if [ "${publish_maven}" == "1" ]; then
|
|
||||||
|
|
||||||
echo "Publishing Android library to MavenCentral..."
|
|
||||||
publish_maven_library
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "All editor binaries and templates prepared successfully for release"
|
echo "All editor binaries and templates prepared successfully for release"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ set -e
|
|||||||
# Config
|
# Config
|
||||||
|
|
||||||
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
|
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
|
||||||
export OPTIONS="production=yes"
|
export OPTIONS="production=yes angle_libs=/root/angle"
|
||||||
export OPTIONS_MONO="module_mono_enabled=yes"
|
export OPTIONS_MONO="module_mono_enabled=yes"
|
||||||
export TERM=xterm
|
export TERM=xterm
|
||||||
|
|
||||||
|
|||||||
16
build.sh
16
build.sh
@@ -136,6 +136,18 @@ if [ ! -d "deps/vulkansdk-macos" ]; then
|
|||||||
echo "Missing Vulkan SDK for macOS, we're going to run into issues!"
|
echo "Missing Vulkan SDK for macOS, we're going to run into issues!"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Windows and macOS need ANGLE
|
||||||
|
if [ ! -d "deps/angle" ]; then
|
||||||
|
echo "Missing ANGLE libraries, downloading them."
|
||||||
|
mkdir -p deps/angle
|
||||||
|
pushd deps/angle
|
||||||
|
curl -L -o windows.zip https://github.com/godotengine/godot-angle-static/releases/download/chromium%2F6029/Windows.6029-1.MinGW_11.x86_64.x86_32.zip
|
||||||
|
curl -L -o macos.zip https://github.com/godotengine/godot-angle-static/releases/download/chromium%2F6029/macOS.6029.Xcode_15.arm64.x86_64.zip
|
||||||
|
unzip windows.zip && rm -f windows.zip
|
||||||
|
unzip macos.zip && rm -f macos.zip
|
||||||
|
popd
|
||||||
|
fi
|
||||||
|
|
||||||
# Keystore for Android editor signing
|
# Keystore for Android editor signing
|
||||||
# Optional - the config.sh will be copied but if it's not filled in,
|
# Optional - the config.sh will be copied but if it's not filled in,
|
||||||
# it will do an unsigned build.
|
# it will do an unsigned build.
|
||||||
@@ -187,7 +199,7 @@ mkdir -p ${basedir}/mono-glue
|
|||||||
${podman_run} -v ${basedir}/build-mono-glue:/root/build localhost/godot-linux:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/mono-glue
|
${podman_run} -v ${basedir}/build-mono-glue:/root/build localhost/godot-linux:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/mono-glue
|
||||||
|
|
||||||
mkdir -p ${basedir}/out/windows
|
mkdir -p ${basedir}/out/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
|
${podman_run} -v ${basedir}/build-windows:/root/build -v ${basedir}/out/windows:/root/out -v ${basedir}/deps/angle:/root/angle localhost/godot-windows:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/windows
|
||||||
|
|
||||||
mkdir -p ${basedir}/out/linux
|
mkdir -p ${basedir}/out/linux
|
||||||
${podman_run} -v ${basedir}/build-linux:/root/build -v ${basedir}/out/linux:/root/out localhost/godot-linux:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/linux
|
${podman_run} -v ${basedir}/build-linux:/root/build -v ${basedir}/out/linux:/root/out localhost/godot-linux:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/linux
|
||||||
@@ -196,7 +208,7 @@ 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
|
${podman_run} -v ${basedir}/build-web:/root/build -v ${basedir}/out/web:/root/out localhost/godot-web:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/web
|
||||||
|
|
||||||
mkdir -p ${basedir}/out/macos
|
mkdir -p ${basedir}/out/macos
|
||||||
${podman_run} -v ${basedir}/build-macos:/root/build -v ${basedir}/out/macos:/root/out -v ${basedir}/deps/vulkansdk-macos:/root/vulkansdk localhost/godot-osx:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/macos
|
${podman_run} -v ${basedir}/build-macos:/root/build -v ${basedir}/out/macos:/root/out -v ${basedir}/deps/vulkansdk-macos:/root/vulkansdk -v ${basedir}/deps/angle:/root/angle localhost/godot-osx:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/macos
|
||||||
|
|
||||||
mkdir -p ${basedir}/out/android
|
mkdir -p ${basedir}/out/android
|
||||||
${podman_run} -v ${basedir}/build-android:/root/build -v ${basedir}/out/android:/root/out -v ${basedir}/deps/keystore:/root/keystore localhost/godot-android:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/android
|
${podman_run} -v ${basedir}/build-android:/root/build -v ${basedir}/out/android:/root/out -v ${basedir}/deps/keystore:/root/keystore localhost/godot-android:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/android
|
||||||
|
|||||||
@@ -1,3 +1,2 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
rm -rf releases tmp web
|
rm -rf releases tmp web
|
||||||
|
|
||||||
|
|||||||
2
clean.sh
2
clean.sh
@@ -1,4 +1,2 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
rm -rf godot*.tar.gz mono-glue out releases tmp web
|
rm -rf godot*.tar.gz mono-glue out releases tmp web
|
||||||
git status
|
git status
|
||||||
|
|||||||
@@ -50,8 +50,7 @@ export OSX_HOST=''
|
|||||||
export OSX_KEY_ID=''
|
export OSX_KEY_ID=''
|
||||||
# Bundle id for the signed app
|
# Bundle id for the signed app
|
||||||
export OSX_BUNDLE_ID=''
|
export OSX_BUNDLE_ID=''
|
||||||
# Username/password for Apple's signing APIs (used for notarytool)
|
# Username/password for Apple's signing APIs (used for atltool)
|
||||||
export APPLE_TEAM=''
|
|
||||||
export APPLE_ID=''
|
export APPLE_ID=''
|
||||||
export APPLE_ID_PASSWORD=''
|
export APPLE_ID_PASSWORD=''
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user