mirror of
https://github.com/godotengine/godot-build-scripts.git
synced 2026-01-01 09:48:47 +03:00
Compare commits
53 Commits
4.1
...
debugsymbo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1445dc1fea | ||
|
|
1e4dc88253 | ||
|
|
8c176b460b | ||
|
|
e0891e9fde | ||
|
|
251cea182e | ||
|
|
9259edf571 | ||
|
|
cc7ca0f706 | ||
|
|
5f48331f5d | ||
|
|
fa404f8c17 | ||
|
|
d808ce84ce | ||
|
|
c3d199c4d4 | ||
|
|
629090d76e | ||
|
|
834f6223d8 | ||
|
|
1bf0772565 | ||
|
|
7131e406ae | ||
|
|
62a88ec262 | ||
|
|
0c96c1ea15 | ||
|
|
c3f202946a | ||
|
|
3cb13f27ea | ||
|
|
d99668ccaa | ||
|
|
a29f0a255d | ||
|
|
d36a865ff1 | ||
|
|
15810984ed | ||
|
|
a79a7d16ce | ||
|
|
b3ba0ae932 | ||
|
|
232be2e47f | ||
|
|
0f11496664 | ||
|
|
e321eca2bf | ||
|
|
ef6c745075 | ||
|
|
3fd3880077 | ||
|
|
0da7793d2d | ||
|
|
9bba647a8b | ||
|
|
ceadb16e22 | ||
|
|
ee35cb71ca | ||
|
|
f8a41bc69f | ||
|
|
2398d61b29 | ||
|
|
96b8f89a22 | ||
|
|
09b9dcf969 | ||
|
|
7b9e4271f4 | ||
|
|
93d253330f | ||
|
|
65cca8165a | ||
|
|
be182f1ed7 | ||
|
|
2c7419a7ed | ||
|
|
ad9e3b238a | ||
|
|
9d40b39c01 | ||
|
|
066ede3602 | ||
|
|
75877451f2 | ||
|
|
02e092ce76 | ||
|
|
4863750c00 | ||
|
|
37938758d8 | ||
|
|
79967d5bb9 | ||
|
|
37876d4d40 | ||
|
|
9f25ceccfb |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -18,3 +18,6 @@ releases/
|
||||
sha512sums/
|
||||
tmp/
|
||||
web/
|
||||
|
||||
# macOS
|
||||
.DS_Store
|
||||
|
||||
@@ -13,6 +13,7 @@ rm -rf godot
|
||||
mkdir godot
|
||||
cd godot
|
||||
tar xf /root/godot.tar.gz --strip-components=1
|
||||
cp -rf /root/swappy/* thirdparty/swappy-frame-pacing/
|
||||
|
||||
# Environment variables and keystore needed for signing store editor build,
|
||||
# as well as signing and publishing to MavenCentral.
|
||||
@@ -26,8 +27,6 @@ fi
|
||||
|
||||
# Classical
|
||||
|
||||
dnf -y install gettext
|
||||
|
||||
if [ "${CLASSICAL}" == "1" ]; then
|
||||
echo "Starting classical build for Android..."
|
||||
|
||||
@@ -37,23 +36,31 @@ if [ "${CLASSICAL}" == "1" ]; then
|
||||
$SCONS platform=android arch=x86_64 $OPTIONS target=editor store_release=${store_release}
|
||||
|
||||
pushd platform/android/java
|
||||
# Generate the regular Android editor.
|
||||
./gradlew generateGodotEditor
|
||||
# Generate the Android editor for HorizonOS devices.
|
||||
./gradlew generateGodotHorizonOSEditor
|
||||
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
|
||||
cp bin/android_editor_builds/android_editor-android-release.apk /root/out/tools/android_editor.apk
|
||||
cp bin/android_editor_builds/android_editor-android-release.aab /root/out/tools/android_editor.aab
|
||||
# For the HorizonOS build, we only copy the apk.
|
||||
cp bin/android_editor_builds/android_editor-horizonos-release.apk /root/out/tools/android_editor_horizonos.apk
|
||||
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
|
||||
cp bin/android_editor_builds/android_editor-android-debug.apk /root/out/tools/android_editor.apk
|
||||
cp bin/android_editor_builds/android_editor-android-debug.aab /root/out/tools/android_editor.aab
|
||||
# For the HorizonOS build, we only copy the apk.
|
||||
cp bin/android_editor_builds/android_editor-horizonos-debug.apk /root/out/tools/android_editor_horizonos.apk
|
||||
fi
|
||||
|
||||
# Restart from a clean tarball, as we'll copy all the contents
|
||||
# outside the container for the MavenCentral upload.
|
||||
rm -rf /root/godot/*
|
||||
tar xf /root/godot.tar.gz --strip-components=1
|
||||
cp -rf /root/swappy/* thirdparty/swappy-frame-pacing/
|
||||
|
||||
$SCONS platform=android arch=arm32 $OPTIONS target=template_debug
|
||||
$SCONS platform=android arch=arm32 $OPTIONS target=template_release
|
||||
@@ -88,9 +95,7 @@ fi
|
||||
|
||||
# Mono
|
||||
|
||||
# No Android support with .NET 6 yet.
|
||||
#if [ "${MONO}" == "1" ]; then
|
||||
if false; then
|
||||
if [ "${MONO}" == "1" ]; then
|
||||
echo "Starting Mono build for Android..."
|
||||
|
||||
cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/
|
||||
@@ -108,14 +113,14 @@ if false; then
|
||||
$SCONS platform=android arch=x86_64 $OPTIONS $OPTIONS_MONO target=template_release
|
||||
|
||||
pushd platform/android/java
|
||||
./gradlew generateGodotTemplates
|
||||
./gradlew generateGodotMonoTemplates
|
||||
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/
|
||||
cp bin/android_monoDebug.apk /root/out/templates-mono/android_debug.apk
|
||||
cp bin/android_monoRelease.apk /root/out/templates-mono/android_release.apk
|
||||
cp bin/godot-lib.template_release.aar /root/out/templates-mono/
|
||||
fi
|
||||
|
||||
echo "Android build successful"
|
||||
|
||||
0
build-android/upload-mavencentral.sh
Normal file → Executable file
0
build-android/upload-mavencentral.sh
Normal file → Executable file
@@ -11,7 +11,7 @@ export OPTIONS="production=yes use_lto=no"
|
||||
export OPTIONS_MONO="module_mono_enabled=yes"
|
||||
export TERM=xterm
|
||||
|
||||
export IOS_SDK="16.1"
|
||||
export IOS_SDK="17.5"
|
||||
export IOS_LIPO="/root/ioscross/arm64/bin/arm-apple-darwin11-lipo"
|
||||
|
||||
rm -rf godot
|
||||
@@ -21,8 +21,6 @@ tar xf /root/godot.tar.gz --strip-components=1
|
||||
|
||||
# Classical
|
||||
|
||||
dnf -y install gettext
|
||||
|
||||
if [ "${CLASSICAL}" == "1" ]; then
|
||||
echo "Starting classical build for iOS..."
|
||||
|
||||
@@ -36,15 +34,15 @@ if [ "${CLASSICAL}" == "1" ]; then
|
||||
# Disabled for now as it doesn't work with cctools-port and current LLVM.
|
||||
# See https://github.com/godotengine/build-containers/pull/85.
|
||||
#$SCONS platform=ios $OPTIONS arch=arm64 ios_simulator=yes target=template_debug \
|
||||
# IOS_SDK_PATH="/root/ioscross/arm64_sim/SDK/iPhoneOS${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/arm64_sim/" ios_triple="arm-apple-darwin11-"
|
||||
#$SCONS platform=ios $OPTIONS arch=arm64 ios_simulator=no target=template_release \
|
||||
# IOS_SDK_PATH="/root/ioscross/arm64_sim/SDK/iPhoneOS${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/arm64_sim/" ios_triple="arm-apple-darwin11-"
|
||||
# IOS_SDK_PATH="/root/ioscross/arm64_sim/SDK/iPhoneSimulator${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/arm64_sim/" ios_triple="arm-apple-darwin11-"
|
||||
#$SCONS platform=ios $OPTIONS arch=arm64 ios_simulator=yes target=template_release \
|
||||
# IOS_SDK_PATH="/root/ioscross/arm64_sim/SDK/iPhoneSimulator${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/arm64_sim/" ios_triple="arm-apple-darwin11-"
|
||||
|
||||
# x86_64 simulator
|
||||
$SCONS platform=ios $OPTIONS arch=x86_64 ios_simulator=yes target=template_debug \
|
||||
IOS_SDK_PATH="/root/ioscross/x86_64_sim/SDK/iPhoneOS${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/x86_64_sim/" ios_triple="x86_64-apple-darwin11-"
|
||||
IOS_SDK_PATH="/root/ioscross/x86_64_sim/SDK/iPhoneSimulator${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/x86_64_sim/" ios_triple="x86_64-apple-darwin11-"
|
||||
$SCONS platform=ios $OPTIONS arch=x86_64 ios_simulator=yes target=template_release \
|
||||
IOS_SDK_PATH="/root/ioscross/x86_64_sim/SDK/iPhoneOS${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/x86_64_sim/" ios_triple="x86_64-apple-darwin11-"
|
||||
IOS_SDK_PATH="/root/ioscross/x86_64_sim/SDK/iPhoneSimulator${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/x86_64_sim/" ios_triple="x86_64-apple-darwin11-"
|
||||
|
||||
mkdir -p /root/out/templates
|
||||
cp bin/libgodot.ios.template_release.arm64.a /root/out/templates/libgodot.ios.a
|
||||
@@ -57,9 +55,7 @@ fi
|
||||
|
||||
# Mono
|
||||
|
||||
# No iOS support with .NET 6 yet.
|
||||
#if [ "${MONO}" == "1" ]; then
|
||||
if false; then
|
||||
if [ "${MONO}" == "1" ]; then
|
||||
echo "Starting Mono build for iOS..."
|
||||
|
||||
cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/
|
||||
@@ -74,15 +70,15 @@ if false; then
|
||||
# Disabled for now as it doesn't work with cctools-port and current LLVM.
|
||||
# See https://github.com/godotengine/build-containers/pull/85.
|
||||
#$SCONS platform=ios $OPTIONS $OPTIONS_MONO arch=arm64 ios_simulator=yes target=template_debug \
|
||||
# IOS_SDK_PATH="/root/ioscross/arm64_sim/SDK/iPhoneOS${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/arm64_sim/" ios_triple="arm-apple-darwin11-"
|
||||
# IOS_SDK_PATH="/root/ioscross/arm64_sim/SDK/iPhoneSimulator${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/arm64_sim/" ios_triple="arm-apple-darwin11-"
|
||||
#$SCONS platform=ios $OPTIONS $OPTIONS_MONO arch=arm64 ios_simulator=yes target=template_release \
|
||||
# IOS_SDK_PATH="/root/ioscross/arm64_sim/SDK/iPhoneOS${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/arm64_sim/" ios_triple="arm-apple-darwin11-"
|
||||
# IOS_SDK_PATH="/root/ioscross/arm64_sim/SDK/iPhoneSimulator${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/arm64_sim/" ios_triple="arm-apple-darwin11-"
|
||||
|
||||
# x86_64 simulator
|
||||
$SCONS platform=ios $OPTIONS $OPTIONS_MONO arch=x86_64 ios_simulator=yes target=template_debug \
|
||||
IOS_SDK_PATH="/root/ioscross/x86_64_sim/SDK/iPhoneOS${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/x86_64_sim/" ios_triple="x86_64-apple-darwin11-"
|
||||
IOS_SDK_PATH="/root/ioscross/x86_64_sim/SDK/iPhoneSimulator${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/x86_64_sim/" ios_triple="x86_64-apple-darwin11-"
|
||||
$SCONS platform=ios $OPTIONS $OPTIONS_MONO arch=x86_64 ios_simulator=yes target=template_release \
|
||||
IOS_SDK_PATH="/root/ioscross/x86_64_sim/SDK/iPhoneOS${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/x86_64_sim/" ios_triple="x86_64-apple-darwin11-"
|
||||
IOS_SDK_PATH="/root/ioscross/x86_64_sim/SDK/iPhoneSimulator${IOS_SDK}.sdk" IOS_TOOLCHAIN_PATH="/root/ioscross/x86_64_sim/" ios_triple="x86_64-apple-darwin11-"
|
||||
|
||||
mkdir -p /root/out/templates-mono
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ set -e
|
||||
# Config
|
||||
|
||||
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
|
||||
export OPTIONS="production=yes"
|
||||
export OPTIONS="production=yes debug_symbols=yes separate_debug_symbols=yes debug_paths_relative=yes"
|
||||
export OPTIONS_MONO="module_mono_enabled=yes"
|
||||
export TERM=xterm
|
||||
|
||||
@@ -14,10 +14,7 @@ mkdir godot
|
||||
cd godot
|
||||
tar xf /root/godot.tar.gz --strip-components=1
|
||||
|
||||
# pkg-config wrongly points to lib instead of lib64 for arch-dependent header.
|
||||
sed -i ${GODOT_SDK_LINUX_X86_64}/x86_64-godot-linux-gnu/sysroot/usr/lib/pkgconfig/dbus-1.pc -e "s@/lib@/lib64@g"
|
||||
|
||||
dnf -y install gettext
|
||||
dnf install -y binutils
|
||||
|
||||
# Classical
|
||||
|
||||
@@ -37,7 +34,7 @@ if [ "${CLASSICAL}" == "1" ]; then
|
||||
cp -rvp bin/* /root/out/x86_64/templates
|
||||
rm -rf bin
|
||||
|
||||
export PATH="${GODOT_SDK_LINUX_X86}/bin:${BASE_PATH}"
|
||||
export PATH="${GODOT_SDK_LINUX_X86_32}/bin:${BASE_PATH}"
|
||||
|
||||
$SCONS platform=linuxbsd arch=x86_32 $OPTIONS target=editor
|
||||
mkdir -p /root/out/x86_32/tools
|
||||
@@ -49,6 +46,32 @@ if [ "${CLASSICAL}" == "1" ]; then
|
||||
mkdir -p /root/out/x86_32/templates
|
||||
cp -rvp bin/* /root/out/x86_32/templates
|
||||
rm -rf bin
|
||||
|
||||
export PATH="${GODOT_SDK_LINUX_ARM64}/bin:${BASE_PATH}"
|
||||
|
||||
$SCONS platform=linuxbsd arch=arm64 $OPTIONS target=editor
|
||||
mkdir -p /root/out/arm64/tools
|
||||
cp -rvp bin/* /root/out/arm64/tools
|
||||
rm -rf bin
|
||||
|
||||
$SCONS platform=linuxbsd arch=arm64 $OPTIONS target=template_debug
|
||||
$SCONS platform=linuxbsd arch=arm64 $OPTIONS target=template_release
|
||||
mkdir -p /root/out/arm64/templates
|
||||
cp -rvp bin/* /root/out/arm64/templates
|
||||
rm -rf bin
|
||||
|
||||
export PATH="${GODOT_SDK_LINUX_ARM32}/bin:${BASE_PATH}"
|
||||
|
||||
$SCONS platform=linuxbsd arch=arm32 $OPTIONS target=editor
|
||||
mkdir -p /root/out/arm32/tools
|
||||
cp -rvp bin/* /root/out/arm32/tools
|
||||
rm -rf bin
|
||||
|
||||
$SCONS platform=linuxbsd arch=arm32 $OPTIONS target=template_debug
|
||||
$SCONS platform=linuxbsd arch=arm32 $OPTIONS target=template_release
|
||||
mkdir -p /root/out/arm32/templates
|
||||
cp -rvp bin/* /root/out/arm32/templates
|
||||
rm -rf bin
|
||||
fi
|
||||
|
||||
# Mono
|
||||
@@ -73,7 +96,7 @@ if [ "${MONO}" == "1" ]; then
|
||||
cp -rvp bin/* /root/out/x86_64/templates-mono
|
||||
rm -rf bin
|
||||
|
||||
export PATH="${GODOT_SDK_LINUX_X86}/bin:${BASE_PATH}"
|
||||
export PATH="${GODOT_SDK_LINUX_X86_32}/bin:${BASE_PATH}"
|
||||
|
||||
$SCONS platform=linuxbsd arch=x86_32 $OPTIONS $OPTIONS_MONO target=editor
|
||||
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=linuxbsd
|
||||
@@ -86,6 +109,34 @@ if [ "${MONO}" == "1" ]; then
|
||||
mkdir -p /root/out/x86_32/templates-mono
|
||||
cp -rvp bin/* /root/out/x86_32/templates-mono
|
||||
rm -rf bin
|
||||
|
||||
export PATH="${GODOT_SDK_LINUX_ARM64}/bin:${BASE_PATH}"
|
||||
|
||||
$SCONS platform=linuxbsd arch=arm64 $OPTIONS $OPTIONS_MONO target=editor
|
||||
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=linuxbsd
|
||||
mkdir -p /root/out/arm64/tools-mono
|
||||
cp -rvp bin/* /root/out/arm64/tools-mono
|
||||
rm -rf bin
|
||||
|
||||
$SCONS platform=linuxbsd arch=arm64 $OPTIONS $OPTIONS_MONO target=template_debug
|
||||
$SCONS platform=linuxbsd arch=arm64 $OPTIONS $OPTIONS_MONO target=template_release
|
||||
mkdir -p /root/out/arm64/templates-mono
|
||||
cp -rvp bin/* /root/out/arm64/templates-mono
|
||||
rm -rf bin
|
||||
|
||||
export PATH="${GODOT_SDK_LINUX_ARM32}/bin:${BASE_PATH}"
|
||||
|
||||
$SCONS platform=linuxbsd arch=arm32 $OPTIONS $OPTIONS_MONO target=editor
|
||||
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=linuxbsd
|
||||
mkdir -p /root/out/arm32/tools-mono
|
||||
cp -rvp bin/* /root/out/arm32/tools-mono
|
||||
rm -rf bin
|
||||
|
||||
$SCONS platform=linuxbsd arch=arm32 $OPTIONS $OPTIONS_MONO target=template_debug
|
||||
$SCONS platform=linuxbsd arch=arm32 $OPTIONS $OPTIONS_MONO target=template_release
|
||||
mkdir -p /root/out/arm32/templates-mono
|
||||
cp -rvp bin/* /root/out/arm32/templates-mono
|
||||
rm -rf bin
|
||||
fi
|
||||
|
||||
echo "Linux build successful"
|
||||
|
||||
@@ -5,9 +5,8 @@ set -e
|
||||
# Config
|
||||
|
||||
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=darwin23.6 production=yes debug_symbols=yes separate_debug_symbols=yes debug_paths_relative=yes use_volk=no vulkan_sdk_path=/root/moltenvk angle_libs=/root/angle"
|
||||
export OPTIONS_MONO="module_mono_enabled=yes"
|
||||
export STRIP="x86_64-apple-darwin22-strip -u -r"
|
||||
export TERM=xterm
|
||||
|
||||
rm -rf godot
|
||||
@@ -17,15 +16,12 @@ tar xf /root/godot.tar.gz --strip-components=1
|
||||
|
||||
# Classical
|
||||
|
||||
dnf -y install gettext
|
||||
|
||||
if [ "${CLASSICAL}" == "1" ]; then
|
||||
echo "Starting classical build for macOS..."
|
||||
|
||||
$SCONS platform=macos $OPTIONS arch=x86_64 target=editor
|
||||
$SCONS platform=macos $OPTIONS arch=arm64 target=editor
|
||||
lipo -create bin/godot.macos.editor.x86_64 bin/godot.macos.editor.arm64 -output bin/godot.macos.editor.universal
|
||||
$STRIP bin/godot.macos.editor.universal
|
||||
|
||||
mkdir -p /root/out/tools
|
||||
cp -rvp bin/* /root/out/tools
|
||||
@@ -34,11 +30,9 @@ if [ "${CLASSICAL}" == "1" ]; then
|
||||
$SCONS platform=macos $OPTIONS arch=x86_64 target=template_debug
|
||||
$SCONS platform=macos $OPTIONS arch=arm64 target=template_debug
|
||||
lipo -create bin/godot.macos.template_debug.x86_64 bin/godot.macos.template_debug.arm64 -output bin/godot.macos.template_debug.universal
|
||||
$STRIP bin/godot.macos.template_debug.universal
|
||||
$SCONS platform=macos $OPTIONS arch=x86_64 target=template_release
|
||||
$SCONS platform=macos $OPTIONS arch=arm64 target=template_release
|
||||
lipo -create bin/godot.macos.template_release.x86_64 bin/godot.macos.template_release.arm64 -output bin/godot.macos.template_release.universal
|
||||
$STRIP bin/godot.macos.template_release.universal
|
||||
|
||||
mkdir -p /root/out/templates
|
||||
cp -rvp bin/* /root/out/templates
|
||||
@@ -56,7 +50,6 @@ if [ "${MONO}" == "1" ]; then
|
||||
$SCONS platform=macos $OPTIONS $OPTIONS_MONO arch=x86_64 target=editor
|
||||
$SCONS platform=macos $OPTIONS $OPTIONS_MONO arch=arm64 target=editor
|
||||
lipo -create bin/godot.macos.editor.x86_64.mono bin/godot.macos.editor.arm64.mono -output bin/godot.macos.editor.universal.mono
|
||||
$STRIP bin/godot.macos.editor.universal.mono
|
||||
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=macos
|
||||
|
||||
mkdir -p /root/out/tools-mono
|
||||
@@ -66,11 +59,9 @@ if [ "${MONO}" == "1" ]; then
|
||||
$SCONS platform=macos $OPTIONS $OPTIONS_MONO arch=x86_64 target=template_debug
|
||||
$SCONS platform=macos $OPTIONS $OPTIONS_MONO arch=arm64 target=template_debug
|
||||
lipo -create bin/godot.macos.template_debug.x86_64.mono bin/godot.macos.template_debug.arm64.mono -output bin/godot.macos.template_debug.universal.mono
|
||||
$STRIP bin/godot.macos.template_debug.universal.mono
|
||||
$SCONS platform=macos $OPTIONS $OPTIONS_MONO arch=x86_64 target=template_release
|
||||
$SCONS platform=macos $OPTIONS $OPTIONS_MONO arch=arm64 target=template_release
|
||||
lipo -create bin/godot.macos.template_release.x86_64.mono bin/godot.macos.template_release.arm64.mono -output bin/godot.macos.template_release.universal.mono
|
||||
$STRIP bin/godot.macos.template_release.universal.mono
|
||||
|
||||
mkdir -p /root/out/templates-mono
|
||||
cp -rvp bin/* /root/out/templates-mono
|
||||
|
||||
@@ -15,20 +15,12 @@ mkdir godot
|
||||
cd godot
|
||||
tar xf ../godot.tar.gz --strip-components=1
|
||||
|
||||
# pkg-config wrongly points to lib instead of lib64 for arch-dependent header.
|
||||
sed -i ${GODOT_SDK_LINUX_X86_64}/x86_64-godot-linux-gnu/sysroot/usr/lib/pkgconfig/dbus-1.pc -e "s@/lib@/lib64@g"
|
||||
|
||||
# Temporarily until we make --headless mode actually skip X11.
|
||||
dnf install -y libX11 libXcursor libXrandr libXinerama libXi mesa-libGL
|
||||
dnf -y install gettext
|
||||
|
||||
# Mono
|
||||
|
||||
if [ "${MONO}" == "1" ]; then
|
||||
echo "Building and generating Mono glue..."
|
||||
|
||||
dotnet --info
|
||||
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/pkgconfig/
|
||||
|
||||
${SCONS} platform=linuxbsd ${OPTIONS} target=editor module_mono_enabled=yes
|
||||
|
||||
|
||||
172
build-release.sh
172
build-release.sh
@@ -88,47 +88,14 @@ sign_macos_template() {
|
||||
ssh "${OSX_HOST}" "rm -rf ${_macos_tmpdir}"
|
||||
}
|
||||
|
||||
can_publish_nuget=0
|
||||
if [ ! -z "${NUGET_SOURCE}" ] && [ ! -z "${NUGET_API_KEY}" ] && [[ $(type -P "dotnet") ]]; then
|
||||
can_publish_nuget=1
|
||||
else
|
||||
echo "Disabling NuGet package publishing as config.sh does not define the required data (NUGET_SOURCE, NUGET_API_KEY), or dotnet can't be found in PATH."
|
||||
fi
|
||||
|
||||
publish_nuget_packages() {
|
||||
if [ $can_publish_nuget == 0 ]; then
|
||||
return
|
||||
fi
|
||||
for pkg in "$@"; do
|
||||
dotnet nuget push $pkg --source "${NUGET_SOURCE}" --api-key "${NUGET_API_KEY}" --skip-duplicate
|
||||
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=""
|
||||
templates_version=""
|
||||
do_cleanup=1
|
||||
make_tarball=1
|
||||
build_classical=1
|
||||
build_mono=1
|
||||
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
|
||||
h|\?)
|
||||
echo "Usage: $0 [OPTIONS...]"
|
||||
@@ -136,7 +103,6 @@ while getopts "h?v:t:b:p:n-:" opt; do
|
||||
echo " -v godot version (e.g: 3.2-stable) [mandatory]"
|
||||
echo " -t templates version (e.g. 3.2.stable) [mandatory]"
|
||||
echo " -b build target: all|classical|mono|none (default: all)"
|
||||
echo " -p publish target: all|nuget|maven|none (default: none)"
|
||||
echo " --no-cleanup disable deleting pre-existing output folders (default: false)"
|
||||
echo " --no-tarball disable generating source tarball (default: false)"
|
||||
echo
|
||||
@@ -158,16 +124,6 @@ while getopts "h?v:t:b:p:n-:" opt; do
|
||||
build_mono=0
|
||||
fi
|
||||
;;
|
||||
p)
|
||||
if [ "$OPTARG" == "nuget" ]; then
|
||||
publish_nuget=1
|
||||
elif [ "$OPTARG" == "maven" ]; then
|
||||
publish_maven=1
|
||||
elif [ "$OPTARG" == "all" ]; then
|
||||
publish_nuget=1
|
||||
publish_maven=1
|
||||
fi
|
||||
;;
|
||||
-)
|
||||
case "${OPTARG}" in
|
||||
no-cleanup)
|
||||
@@ -240,13 +196,21 @@ if [ "${build_classical}" == "1" ]; then
|
||||
# Editor
|
||||
binname="${godot_basename}_linux.x86_64"
|
||||
cp out/linux/x86_64/tools/godot.linuxbsd.editor.x86_64 ${binname}
|
||||
strip ${binname}
|
||||
zip -q -9 "${reldir}/${binname}.zip" ${binname}
|
||||
rm ${binname}
|
||||
|
||||
binname="${godot_basename}_linux.x86_32"
|
||||
cp out/linux/x86_32/tools/godot.linuxbsd.editor.x86_32 ${binname}
|
||||
strip ${binname}
|
||||
zip -q -9 "${reldir}/${binname}.zip" ${binname}
|
||||
rm ${binname}
|
||||
|
||||
binname="${godot_basename}_linux.arm64"
|
||||
cp out/linux/arm64/tools/godot.linuxbsd.editor.arm64 ${binname}
|
||||
zip -q -9 "${reldir}/${binname}.zip" ${binname}
|
||||
rm ${binname}
|
||||
|
||||
binname="${godot_basename}_linux.arm32"
|
||||
cp out/linux/arm32/tools/godot.linuxbsd.editor.arm32 ${binname}
|
||||
zip -q -9 "${reldir}/${binname}.zip" ${binname}
|
||||
rm ${binname}
|
||||
|
||||
@@ -255,7 +219,10 @@ if [ "${build_classical}" == "1" ]; then
|
||||
cp out/linux/x86_64/templates/godot.linuxbsd.template_debug.x86_64 ${templatesdir}/linux_debug.x86_64
|
||||
cp out/linux/x86_32/templates/godot.linuxbsd.template_release.x86_32 ${templatesdir}/linux_release.x86_32
|
||||
cp out/linux/x86_32/templates/godot.linuxbsd.template_debug.x86_32 ${templatesdir}/linux_debug.x86_32
|
||||
strip ${templatesdir}/linux*
|
||||
cp out/linux/arm64/templates/godot.linuxbsd.template_release.arm64 ${templatesdir}/linux_release.arm64
|
||||
cp out/linux/arm64/templates/godot.linuxbsd.template_debug.arm64 ${templatesdir}/linux_debug.arm64
|
||||
cp out/linux/arm32/templates/godot.linuxbsd.template_release.arm32 ${templatesdir}/linux_release.arm32
|
||||
cp out/linux/arm32/templates/godot.linuxbsd.template_debug.arm32 ${templatesdir}/linux_debug.arm32
|
||||
|
||||
## Windows (Classical) ##
|
||||
|
||||
@@ -263,10 +230,8 @@ if [ "${build_classical}" == "1" ]; then
|
||||
binname="${godot_basename}_win64.exe"
|
||||
wrpname="${godot_basename}_win64_console.exe"
|
||||
cp out/windows/x86_64/tools/godot.windows.editor.x86_64.exe ${binname}
|
||||
strip ${binname}
|
||||
sign_windows ${binname}
|
||||
cp out/windows/x86_64/tools/godot.windows.editor.x86_64.console.exe ${wrpname}
|
||||
strip ${wrpname}
|
||||
sign_windows ${wrpname}
|
||||
zip -q -9 "${reldir}/${binname}.zip" ${binname} ${wrpname}
|
||||
rm ${binname} ${wrpname}
|
||||
@@ -274,10 +239,17 @@ if [ "${build_classical}" == "1" ]; then
|
||||
binname="${godot_basename}_win32.exe"
|
||||
wrpname="${godot_basename}_win32_console.exe"
|
||||
cp out/windows/x86_32/tools/godot.windows.editor.x86_32.exe ${binname}
|
||||
strip ${binname}
|
||||
sign_windows ${binname}
|
||||
cp out/windows/x86_32/tools/godot.windows.editor.x86_32.console.exe ${wrpname}
|
||||
strip ${wrpname}
|
||||
sign_windows ${wrpname}
|
||||
zip -q -9 "${reldir}/${binname}.zip" ${binname} ${wrpname}
|
||||
rm ${binname} ${wrpname}
|
||||
|
||||
binname="${godot_basename}_windows_arm64.exe"
|
||||
wrpname="${godot_basename}_windows_arm64_console.exe"
|
||||
cp out/windows/arm64/tools/godot.windows.editor.arm64.llvm.exe ${binname}
|
||||
sign_windows ${binname}
|
||||
cp out/windows/arm64/tools/godot.windows.editor.arm64.llvm.console.exe ${wrpname}
|
||||
sign_windows ${wrpname}
|
||||
zip -q -9 "${reldir}/${binname}.zip" ${binname} ${wrpname}
|
||||
rm ${binname} ${wrpname}
|
||||
@@ -287,11 +259,14 @@ if [ "${build_classical}" == "1" ]; then
|
||||
cp out/windows/x86_64/templates/godot.windows.template_debug.x86_64.exe ${templatesdir}/windows_debug_x86_64.exe
|
||||
cp out/windows/x86_32/templates/godot.windows.template_release.x86_32.exe ${templatesdir}/windows_release_x86_32.exe
|
||||
cp out/windows/x86_32/templates/godot.windows.template_debug.x86_32.exe ${templatesdir}/windows_debug_x86_32.exe
|
||||
cp out/windows/arm64/templates/godot.windows.template_release.arm64.llvm.exe ${templatesdir}/windows_release_arm64.exe
|
||||
cp out/windows/arm64/templates/godot.windows.template_debug.arm64.llvm.exe ${templatesdir}/windows_debug_arm64.exe
|
||||
cp out/windows/x86_64/templates/godot.windows.template_release.x86_64.console.exe ${templatesdir}/windows_release_x86_64_console.exe
|
||||
cp out/windows/x86_64/templates/godot.windows.template_debug.x86_64.console.exe ${templatesdir}/windows_debug_x86_64_console.exe
|
||||
cp out/windows/x86_32/templates/godot.windows.template_release.x86_32.console.exe ${templatesdir}/windows_release_x86_32_console.exe
|
||||
cp out/windows/x86_32/templates/godot.windows.template_debug.x86_32.console.exe ${templatesdir}/windows_debug_x86_32_console.exe
|
||||
strip ${templatesdir}/windows*.exe
|
||||
cp out/windows/arm64/templates/godot.windows.template_release.arm64.llvm.console.exe ${templatesdir}/windows_release_arm64_console.exe
|
||||
cp out/windows/arm64/templates/godot.windows.template_debug.arm64.llvm.console.exe ${templatesdir}/windows_debug_arm64_console.exe
|
||||
|
||||
## macOS (Classical) ##
|
||||
|
||||
@@ -330,9 +305,15 @@ if [ "${build_classical}" == "1" ]; then
|
||||
cp out/web/templates/godot.web.template_release.wasm32.zip ${templatesdir}/web_release.zip
|
||||
cp out/web/templates/godot.web.template_debug.wasm32.zip ${templatesdir}/web_debug.zip
|
||||
|
||||
cp out/web/templates/godot.web.template_release.wasm32.nothreads.zip ${templatesdir}/web_nothreads_release.zip
|
||||
cp out/web/templates/godot.web.template_debug.wasm32.nothreads.zip ${templatesdir}/web_nothreads_debug.zip
|
||||
|
||||
cp out/web/templates/godot.web.template_release.wasm32.dlink.zip ${templatesdir}/web_dlink_release.zip
|
||||
cp out/web/templates/godot.web.template_debug.wasm32.dlink.zip ${templatesdir}/web_dlink_debug.zip
|
||||
|
||||
cp out/web/templates/godot.web.template_release.wasm32.nothreads.dlink.zip ${templatesdir}/web_dlink_nothreads_release.zip
|
||||
cp out/web/templates/godot.web.template_debug.wasm32.nothreads.dlink.zip ${templatesdir}/web_dlink_nothreads_debug.zip
|
||||
|
||||
## Android (Classical) ##
|
||||
|
||||
# Lib for direct download
|
||||
@@ -341,6 +322,8 @@ if [ "${build_classical}" == "1" ]; then
|
||||
# Editor
|
||||
binname="${godot_basename}_android_editor.apk"
|
||||
cp out/android/tools/android_editor.apk ${reldir}/${binname}
|
||||
binname="${godot_basename}_android_editor_horizonos.apk"
|
||||
cp out/android/tools/android_editor_horizonos.apk ${reldir}/${binname}
|
||||
binname="${godot_basename}_android_editor.aab"
|
||||
cp out/android/tools/android_editor.aab ${reldir}/${binname}
|
||||
|
||||
@@ -356,7 +339,7 @@ if [ "${build_classical}" == "1" ]; then
|
||||
cp out/ios/templates/libgodot.ios.debug.simulator.a ios_xcode/libgodot.ios.debug.xcframework/ios-arm64_x86_64-simulator/libgodot.a
|
||||
cp out/ios/templates/libgodot.ios.a ios_xcode/libgodot.ios.release.xcframework/ios-arm64/libgodot.a
|
||||
cp out/ios/templates/libgodot.ios.debug.a ios_xcode/libgodot.ios.debug.xcframework/ios-arm64/libgodot.a
|
||||
cp -r deps/vulkansdk-macos/MoltenVK/MoltenVK.xcframework ios_xcode/
|
||||
cp -r deps/moltenvk/MoltenVK/MoltenVK.xcframework ios_xcode/
|
||||
rm -rf ios_xcode/MoltenVK.xcframework/{macos,tvos}*
|
||||
cd ios_xcode
|
||||
zip -q -9 -r "${templatesdir}/ios.zip" *
|
||||
@@ -390,7 +373,6 @@ if [ "${build_mono}" == "1" ]; then
|
||||
binbasename="${godot_basename}_mono_linux"
|
||||
mkdir -p ${binbasename}_x86_64
|
||||
cp out/linux/x86_64/tools-mono/godot.linuxbsd.editor.x86_64.mono ${binbasename}_x86_64/${binbasename}.x86_64
|
||||
strip ${binbasename}_x86_64/${binbasename}.x86_64
|
||||
cp -rp out/linux/x86_64/tools-mono/GodotSharp ${binbasename}_x86_64/
|
||||
zip -r -q -9 "${reldir_mono}/${binbasename}_x86_64.zip" ${binbasename}_x86_64
|
||||
rm -rf ${binbasename}_x86_64
|
||||
@@ -398,17 +380,33 @@ if [ "${build_mono}" == "1" ]; then
|
||||
binbasename="${godot_basename}_mono_linux"
|
||||
mkdir -p ${binbasename}_x86_32
|
||||
cp out/linux/x86_32/tools-mono/godot.linuxbsd.editor.x86_32.mono ${binbasename}_x86_32/${binbasename}.x86_32
|
||||
strip ${binbasename}_x86_32/${binbasename}.x86_32
|
||||
cp -rp out/linux/x86_32/tools-mono/GodotSharp/ ${binbasename}_x86_32/
|
||||
zip -r -q -9 "${reldir_mono}/${binbasename}_x86_32.zip" ${binbasename}_x86_32
|
||||
rm -rf ${binbasename}_x86_32
|
||||
|
||||
binbasename="${godot_basename}_mono_linux"
|
||||
mkdir -p ${binbasename}_arm64
|
||||
cp out/linux/arm64/tools-mono/godot.linuxbsd.editor.arm64.mono ${binbasename}_arm64/${binbasename}.arm64
|
||||
cp -rp out/linux/arm64/tools-mono/GodotSharp/ ${binbasename}_arm64/
|
||||
zip -r -q -9 "${reldir_mono}/${binbasename}_arm64.zip" ${binbasename}_arm64
|
||||
rm -rf ${binbasename}_arm64
|
||||
|
||||
binbasename="${godot_basename}_mono_linux"
|
||||
mkdir -p ${binbasename}_arm32
|
||||
cp out/linux/arm32/tools-mono/godot.linuxbsd.editor.arm32.mono ${binbasename}_arm32/${binbasename}.arm32
|
||||
cp -rp out/linux/arm32/tools-mono/GodotSharp/ ${binbasename}_arm32/
|
||||
zip -r -q -9 "${reldir_mono}/${binbasename}_arm32.zip" ${binbasename}_arm32
|
||||
rm -rf ${binbasename}_arm32
|
||||
|
||||
# Templates
|
||||
cp out/linux/x86_64/templates-mono/godot.linuxbsd.template_debug.x86_64.mono ${templatesdir_mono}/linux_debug.x86_64
|
||||
cp out/linux/x86_64/templates-mono/godot.linuxbsd.template_release.x86_64.mono ${templatesdir_mono}/linux_release.x86_64
|
||||
cp out/linux/x86_32/templates-mono/godot.linuxbsd.template_debug.x86_32.mono ${templatesdir_mono}/linux_debug.x86_32
|
||||
cp out/linux/x86_32/templates-mono/godot.linuxbsd.template_release.x86_32.mono ${templatesdir_mono}/linux_release.x86_32
|
||||
strip ${templatesdir_mono}/linux*
|
||||
cp out/linux/arm64/templates-mono/godot.linuxbsd.template_debug.arm64.mono ${templatesdir_mono}/linux_debug.arm64
|
||||
cp out/linux/arm64/templates-mono/godot.linuxbsd.template_release.arm64.mono ${templatesdir_mono}/linux_release.arm64
|
||||
cp out/linux/arm32/templates-mono/godot.linuxbsd.template_debug.arm32.mono ${templatesdir_mono}/linux_debug.arm32
|
||||
cp out/linux/arm32/templates-mono/godot.linuxbsd.template_release.arm32.mono ${templatesdir_mono}/linux_release.arm32
|
||||
|
||||
## Windows (Mono) ##
|
||||
|
||||
@@ -417,11 +415,9 @@ if [ "${build_mono}" == "1" ]; then
|
||||
wrpname="${godot_basename}_mono_win64_console"
|
||||
mkdir -p ${binname}
|
||||
cp out/windows/x86_64/tools-mono/godot.windows.editor.x86_64.mono.exe ${binname}/${binname}.exe
|
||||
strip ${binname}/${binname}.exe
|
||||
sign_windows ${binname}/${binname}.exe
|
||||
cp -rp out/windows/x86_64/tools-mono/GodotSharp ${binname}/
|
||||
cp out/windows/x86_64/tools-mono/godot.windows.editor.x86_64.mono.console.exe ${binname}/${wrpname}.exe
|
||||
strip ${binname}/${wrpname}.exe
|
||||
sign_windows ${binname}/${wrpname}.exe
|
||||
zip -r -q -9 "${reldir_mono}/${binname}.zip" ${binname}
|
||||
rm -rf ${binname}
|
||||
@@ -430,11 +426,20 @@ if [ "${build_mono}" == "1" ]; then
|
||||
wrpname="${godot_basename}_mono_win32_console"
|
||||
mkdir -p ${binname}
|
||||
cp out/windows/x86_32/tools-mono/godot.windows.editor.x86_32.mono.exe ${binname}/${binname}.exe
|
||||
strip ${binname}/${binname}.exe
|
||||
sign_windows ${binname}/${binname}.exe
|
||||
cp -rp out/windows/x86_32/tools-mono/GodotSharp ${binname}/
|
||||
cp out/windows/x86_32/tools-mono/godot.windows.editor.x86_32.mono.console.exe ${binname}/${wrpname}.exe
|
||||
strip ${binname}/${wrpname}.exe
|
||||
sign_windows ${binname}/${wrpname}.exe
|
||||
zip -r -q -9 "${reldir_mono}/${binname}.zip" ${binname}
|
||||
rm -rf ${binname}
|
||||
|
||||
binname="${godot_basename}_mono_windows_arm64"
|
||||
wrpname="${godot_basename}_mono_windows_arm64_console"
|
||||
mkdir -p ${binname}
|
||||
cp out/windows/arm64/tools-mono/godot.windows.editor.arm64.llvm.mono.exe ${binname}/${binname}.exe
|
||||
sign_windows ${binname}/${binname}.exe
|
||||
cp -rp out/windows/arm64/tools-mono/GodotSharp ${binname}/
|
||||
cp out/windows/arm64/tools-mono/godot.windows.editor.arm64.llvm.mono.console.exe ${binname}/${wrpname}.exe
|
||||
sign_windows ${binname}/${wrpname}.exe
|
||||
zip -r -q -9 "${reldir_mono}/${binname}.zip" ${binname}
|
||||
rm -rf ${binname}
|
||||
@@ -444,11 +449,14 @@ if [ "${build_mono}" == "1" ]; then
|
||||
cp out/windows/x86_64/templates-mono/godot.windows.template_release.x86_64.mono.exe ${templatesdir_mono}/windows_release_x86_64.exe
|
||||
cp out/windows/x86_32/templates-mono/godot.windows.template_debug.x86_32.mono.exe ${templatesdir_mono}/windows_debug_x86_32.exe
|
||||
cp out/windows/x86_32/templates-mono/godot.windows.template_release.x86_32.mono.exe ${templatesdir_mono}/windows_release_x86_32.exe
|
||||
cp out/windows/arm64/templates-mono/godot.windows.template_debug.arm64.llvm.mono.exe ${templatesdir_mono}/windows_debug_arm64.exe
|
||||
cp out/windows/arm64/templates-mono/godot.windows.template_release.arm64.llvm.mono.exe ${templatesdir_mono}/windows_release_arm64.exe
|
||||
cp out/windows/x86_64/templates-mono/godot.windows.template_debug.x86_64.mono.console.exe ${templatesdir_mono}/windows_debug_x86_64_console.exe
|
||||
cp out/windows/x86_64/templates-mono/godot.windows.template_release.x86_64.mono.console.exe ${templatesdir_mono}/windows_release_x86_64_console.exe
|
||||
cp out/windows/x86_32/templates-mono/godot.windows.template_debug.x86_32.mono.console.exe ${templatesdir_mono}/windows_debug_x86_32_console.exe
|
||||
cp out/windows/x86_32/templates-mono/godot.windows.template_release.x86_32.mono.console.exe ${templatesdir_mono}/windows_release_x86_32_console.exe
|
||||
strip ${templatesdir_mono}/windows*.exe
|
||||
cp out/windows/arm64/templates-mono/godot.windows.template_debug.arm64.llvm.mono.console.exe ${templatesdir_mono}/windows_debug_arm64_console.exe
|
||||
cp out/windows/arm64/templates-mono/godot.windows.template_release.arm64.llvm.mono.console.exe ${templatesdir_mono}/windows_release_arm64_console.exe
|
||||
|
||||
## macOS (Mono) ##
|
||||
|
||||
@@ -475,16 +483,6 @@ if [ "${build_mono}" == "1" ]; then
|
||||
rm -rf macos_template.app
|
||||
sign_macos_template ${templatesdir_mono} 1
|
||||
|
||||
# No .NET support for those platforms yet.
|
||||
|
||||
if false; then
|
||||
|
||||
## Web (Mono) ##
|
||||
|
||||
# Templates
|
||||
cp out/web/templates-mono/godot.web.template_debug.wasm32.mono.zip ${templatesdir_mono}/web_debug.zip
|
||||
cp out/web/templates-mono/godot.web.template_release.wasm32.mono.zip ${templatesdir_mono}/web_release.zip
|
||||
|
||||
## Android (Mono) ##
|
||||
|
||||
# Lib for direct download
|
||||
@@ -502,13 +500,23 @@ if [ "${build_mono}" == "1" ]; then
|
||||
cp out/ios/templates-mono/libgodot.ios.debug.simulator.a ios_xcode/libgodot.ios.debug.xcframework/ios-arm64_x86_64-simulator/libgodot.a
|
||||
cp out/ios/templates-mono/libgodot.ios.a ios_xcode/libgodot.ios.release.xcframework/ios-arm64/libgodot.a
|
||||
cp out/ios/templates-mono/libgodot.ios.debug.a ios_xcode/libgodot.ios.debug.xcframework/ios-arm64/libgodot.a
|
||||
cp -r deps/vulkansdk-macos/MoltenVK/MoltenVK.xcframework ios_xcode/
|
||||
cp -r deps/moltenvk/MoltenVK/MoltenVK.xcframework ios_xcode/
|
||||
rm -rf ios_xcode/MoltenVK.xcframework/{macos,tvos}*
|
||||
cd ios_xcode
|
||||
zip -q -9 -r "${templatesdir_mono}/ios.zip" *
|
||||
cd ..
|
||||
rm -rf ios_xcode
|
||||
|
||||
# No .NET support for those platforms yet.
|
||||
|
||||
if false; then
|
||||
|
||||
## Web (Mono) ##
|
||||
|
||||
# Templates
|
||||
cp out/web/templates-mono/godot.web.template_debug.wasm32.mono.zip ${templatesdir_mono}/web_debug.zip
|
||||
cp out/web/templates-mono/godot.web.template_release.wasm32.mono.zip ${templatesdir_mono}/web_release.zip
|
||||
|
||||
fi
|
||||
|
||||
## Templates TPZ (Mono) ##
|
||||
@@ -528,22 +536,4 @@ if [ "${build_mono}" == "1" ]; then
|
||||
|
||||
fi
|
||||
|
||||
# NuGet packages
|
||||
|
||||
if [ "${publish_nuget}" == "1" ]; then
|
||||
|
||||
echo "Publishing NuGet packages..."
|
||||
publish_nuget_packages out/linux/x86_64/tools-mono/GodotSharp/Tools/nupkgs/*.nupkg
|
||||
|
||||
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"
|
||||
|
||||
@@ -8,12 +8,17 @@ set -e
|
||||
# we run all builds in parallel each from their own folder.
|
||||
export NUM_JOBS=5
|
||||
declare -a JOBS=(
|
||||
"target=editor use_closure_compiler=yes"
|
||||
"target=template_debug"
|
||||
"target=template_release"
|
||||
"target=template_debug dlink_enabled=yes"
|
||||
"target=template_release dlink_enabled=yes"
|
||||
)
|
||||
declare -a JOBS_NOTHREADS=(
|
||||
"target=template_debug threads=no"
|
||||
"target=template_release threads=no"
|
||||
"target=template_debug dlink_enabled=yes threads=no"
|
||||
"target=template_release dlink_enabled=yes threads=no"
|
||||
)
|
||||
|
||||
export SCONS="scons -j$(expr ${NUM_CORES} / ${NUM_JOBS}) verbose=yes warnings=no progress=no"
|
||||
export OPTIONS="production=yes"
|
||||
@@ -29,12 +34,10 @@ tar xf /root/godot.tar.gz --strip-components=1
|
||||
|
||||
# Classical
|
||||
|
||||
dnf -y install gettext
|
||||
|
||||
if [ "${CLASSICAL}" == "1" ]; then
|
||||
echo "Starting classical build for Web..."
|
||||
|
||||
for i in {0..4}; do
|
||||
for i in {0..3}; do
|
||||
cp -r /root/godot /root/godot$i
|
||||
cd /root/godot$i
|
||||
echo "$SCONS platform=web ${OPTIONS} ${JOBS[$i]}"
|
||||
@@ -42,16 +45,35 @@ if [ "${CLASSICAL}" == "1" ]; then
|
||||
pids[$i]=$!
|
||||
done
|
||||
|
||||
cd /root/godot
|
||||
echo "$SCONS platform=web ${OPTIONS} target=editor use_closure_compiler=yes"
|
||||
$SCONS platform=web ${OPTIONS} target=editor use_closure_compiler=yes &
|
||||
pid_editor=$!
|
||||
|
||||
for pid in ${pids[*]}; do
|
||||
wait $pid
|
||||
done
|
||||
wait $pid_editor
|
||||
|
||||
for i in {0..3}; do
|
||||
cp -r /root/godot /root/godot-nothreads$i
|
||||
cd /root/godot-nothreads$i
|
||||
echo "$SCONS platform=web ${OPTIONS} ${JOBS_NOTHREADS[$i]}"
|
||||
$SCONS platform=web ${OPTIONS} ${JOBS_NOTHREADS[$i]} &
|
||||
pids_nothreads[$i]=$!
|
||||
done
|
||||
|
||||
for pid in ${pids_nothreads[*]}; do
|
||||
wait $pid
|
||||
done
|
||||
|
||||
mkdir -p /root/out/tools
|
||||
cp -rvp /root/godot0/bin/*.editor*.zip /root/out/tools
|
||||
cp -rvp /root/godot/bin/*.editor*.zip /root/out/tools
|
||||
|
||||
mkdir -p /root/out/templates
|
||||
for i in {1..4}; do
|
||||
for i in {0..3}; do
|
||||
cp -rvp /root/godot$i/bin/*.zip /root/out/templates
|
||||
cp -rvp /root/godot-nothreads$i/bin/*.zip /root/out/templates
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
@@ -5,8 +5,9 @@ set -e
|
||||
# Config
|
||||
|
||||
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
|
||||
export OPTIONS="production=yes"
|
||||
export OPTIONS="production=yes debug_symbols=yes separate_debug_symbols=yes debug_paths_relative=yes use_mingw=yes angle_libs=/root/angle mesa_libs=/root/mesa d3d12=yes"
|
||||
export OPTIONS_MONO="module_mono_enabled=yes"
|
||||
export OPTIONS_LLVM="use_llvm=yes mingw_prefix=/root/llvm-mingw"
|
||||
export TERM=xterm
|
||||
|
||||
rm -rf godot
|
||||
@@ -16,8 +17,6 @@ tar xf /root/godot.tar.gz --strip-components=1
|
||||
|
||||
# Classical
|
||||
|
||||
dnf -y install gettext
|
||||
|
||||
if [ "${CLASSICAL}" == "1" ]; then
|
||||
echo "Starting classical build for Windows..."
|
||||
|
||||
@@ -42,6 +41,28 @@ if [ "${CLASSICAL}" == "1" ]; then
|
||||
mkdir -p /root/out/x86_32/templates
|
||||
cp -rvp bin/* /root/out/x86_32/templates
|
||||
rm -rf bin
|
||||
|
||||
$SCONS platform=windows arch=arm64 $OPTIONS $OPTIONS_LLVM target=editor
|
||||
mkdir -p /root/out/arm64/tools
|
||||
cp -rvp bin/* /root/out/arm64/tools
|
||||
rm -rf bin
|
||||
|
||||
$SCONS platform=windows arch=arm64 $OPTIONS $OPTIONS_LLVM target=template_debug
|
||||
$SCONS platform=windows arch=arm64 $OPTIONS $OPTIONS_LLVM target=template_release
|
||||
mkdir -p /root/out/arm64/templates
|
||||
cp -rvp bin/* /root/out/arm64/templates
|
||||
rm -rf bin
|
||||
|
||||
if [ "${STEAM}" == "1" ]; then
|
||||
build_name=${BUILD_NAME}
|
||||
export BUILD_NAME="steam"
|
||||
$SCONS platform=windows arch=x86_64 $OPTIONS target=editor steamapi=yes
|
||||
$SCONS platform=windows arch=x86_32 $OPTIONS target=editor steamapi=yes
|
||||
mkdir -p /root/out/steam
|
||||
cp -rvp bin/* /root/out/steam
|
||||
rm -rf bin
|
||||
export BUILD_NAME=${build_name}
|
||||
fi
|
||||
fi
|
||||
|
||||
# Mono
|
||||
@@ -75,6 +96,18 @@ if [ "${MONO}" == "1" ]; then
|
||||
mkdir -p /root/out/x86_32/templates-mono
|
||||
cp -rvp bin/* /root/out/x86_32/templates-mono
|
||||
rm -rf bin
|
||||
|
||||
$SCONS platform=windows arch=arm64 $OPTIONS $OPTIONS_MONO $OPTIONS_LLVM target=editor
|
||||
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=windows
|
||||
mkdir -p /root/out/arm64/tools-mono
|
||||
cp -rvp bin/* /root/out/arm64/tools-mono
|
||||
rm -rf bin
|
||||
|
||||
$SCONS platform=windows arch=arm64 $OPTIONS $OPTIONS_MONO $OPTIONS_LLVM target=template_debug
|
||||
$SCONS platform=windows arch=arm64 $OPTIONS $OPTIONS_MONO $OPTIONS_LLVM target=template_release
|
||||
mkdir -p /root/out/arm64/templates-mono
|
||||
cp -rvp bin/* /root/out/arm64/templates-mono
|
||||
rm -rf bin
|
||||
fi
|
||||
|
||||
echo "Windows build successful"
|
||||
|
||||
73
build.sh
73
build.sh
@@ -28,6 +28,7 @@ godot_version=""
|
||||
git_treeish="master"
|
||||
build_classical=1
|
||||
build_mono=1
|
||||
build_steam=0
|
||||
force_download=0
|
||||
skip_download=1
|
||||
skip_git_checkout=0
|
||||
@@ -100,6 +101,10 @@ case "$choice" in
|
||||
esac
|
||||
export GODOT_VERSION_STATUS="${status}"
|
||||
|
||||
if [ "${status}" == "stable" ]; then
|
||||
build_steam=1
|
||||
fi
|
||||
|
||||
if [ ! -z "${username}" ] && [ ! -z "${password}" ]; then
|
||||
if ${podman} login ${registry} -u "${username}" -p "${password}"; then
|
||||
export logged_in=true
|
||||
@@ -131,9 +136,57 @@ if [ $skip_download == 0 ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# macOS and iOS need the Vulkan SDK
|
||||
if [ ! -d "deps/vulkansdk-macos" ]; then
|
||||
echo "Missing Vulkan SDK for macOS, we're going to run into issues!"
|
||||
# macOS needs MoltenVK
|
||||
if [ ! -d "deps/moltenvk" ]; then
|
||||
echo "Missing MoltenVK for macOS, downloading it."
|
||||
mkdir -p deps/moltenvk
|
||||
pushd deps/moltenvk
|
||||
curl -L -o moltenvk.tar https://github.com/godotengine/moltenvk-osxcross/releases/download/vulkan-sdk-1.3.283.0-2/MoltenVK-all.tar
|
||||
tar xf moltenvk.tar && rm -f moltenvk.tar
|
||||
mv MoltenVK/MoltenVK/include/ MoltenVK/
|
||||
mv MoltenVK/MoltenVK/static/MoltenVK.xcframework/ MoltenVK/
|
||||
popd
|
||||
fi
|
||||
|
||||
# Windows and macOS need ANGLE
|
||||
if [ ! -d "deps/angle" ]; then
|
||||
echo "Missing ANGLE libraries, downloading them."
|
||||
mkdir -p deps/angle
|
||||
pushd deps/angle
|
||||
base_url=https://github.com/godotengine/godot-angle-static/releases/download/chromium%2F6601.2/godot-angle-static
|
||||
curl -L -o windows_arm64.zip $base_url-arm64-llvm-release.zip
|
||||
curl -L -o windows_x86_64.zip $base_url-x86_64-gcc-release.zip
|
||||
curl -L -o windows_x86_32.zip $base_url-x86_32-gcc-release.zip
|
||||
curl -L -o macos_arm64.zip $base_url-arm64-macos-release.zip
|
||||
curl -L -o macos_x86_64.zip $base_url-x86_64-macos-release.zip
|
||||
unzip -o windows_arm64.zip && rm -f windows_arm64.zip
|
||||
unzip -o windows_x86_64.zip && rm -f windows_x86_64.zip
|
||||
unzip -o windows_x86_32.zip && rm -f windows_x86_32.zip
|
||||
unzip -o macos_arm64.zip && rm -f macos_arm64.zip
|
||||
unzip -o macos_x86_64.zip && rm -f macos_x86_64.zip
|
||||
popd
|
||||
fi
|
||||
|
||||
if [ ! -d "deps/mesa" ]; then
|
||||
echo "Missing Mesa/NIR libraries, downloading them."
|
||||
mkdir -p deps/mesa
|
||||
pushd deps/mesa
|
||||
curl -L -o mesa_arm64.zip https://github.com/godotengine/godot-nir-static/releases/download/23.1.9-1/godot-nir-static-arm64-llvm-release.zip
|
||||
curl -L -o mesa_x86_64.zip https://github.com/godotengine/godot-nir-static/releases/download/23.1.9-1/godot-nir-static-x86_64-gcc-release.zip
|
||||
curl -L -o mesa_x86_32.zip https://github.com/godotengine/godot-nir-static/releases/download/23.1.9-1/godot-nir-static-x86_32-gcc-release.zip
|
||||
unzip -o mesa_arm64.zip && rm -f mesa_arm64.zip
|
||||
unzip -o mesa_x86_64.zip && rm -f mesa_x86_64.zip
|
||||
unzip -o mesa_x86_32.zip && rm -f mesa_x86_32.zip
|
||||
popd
|
||||
fi
|
||||
|
||||
if [ ! -d "deps/swappy" ]; then
|
||||
echo "Missing Swappy libraries, downloading them."
|
||||
mkdir -p deps/swappy
|
||||
pushd deps/swappy
|
||||
curl -L -O https://github.com/darksylinc/godot-swappy/releases/download/v2023.3.0.0/godot-swappy.7z
|
||||
7z x godot-swappy.7z && rm godot-swappy.7z
|
||||
popd
|
||||
fi
|
||||
|
||||
# Keystore for Android editor signing
|
||||
@@ -180,14 +233,14 @@ mkdir -p ${basedir}/out
|
||||
mkdir -p ${basedir}/out/logs
|
||||
mkdir -p ${basedir}/mono-glue
|
||||
|
||||
export podman_run="${podman} run -it --rm --env BUILD_NAME --env GODOT_VERSION_STATUS --env NUM_CORES --env CLASSICAL=${build_classical} --env MONO=${build_mono} -v ${basedir}/godot-${godot_version}.tar.gz:/root/godot.tar.gz -v ${basedir}/mono-glue:/root/mono-glue -w /root/"
|
||||
export 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
|
||||
|
||||
mkdir -p ${basedir}/mono-glue
|
||||
${podman_run} -v ${basedir}/build-mono-glue:/root/build localhost/godot-linux:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/mono-glue
|
||||
|
||||
mkdir -p ${basedir}/out/windows
|
||||
${podman_run} -v ${basedir}/build-windows:/root/build -v ${basedir}/out/windows:/root/out localhost/godot-windows:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/windows
|
||||
${podman_run} -v ${basedir}/build-windows:/root/build -v ${basedir}/out/windows:/root/out -v ${basedir}/deps/angle:/root/angle -v ${basedir}/deps/mesa:/root/mesa --env STEAM=${build_steam} localhost/godot-windows:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/windows
|
||||
|
||||
mkdir -p ${basedir}/out/linux
|
||||
${podman_run} -v ${basedir}/build-linux:/root/build -v ${basedir}/out/linux:/root/out localhost/godot-linux:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/linux
|
||||
@@ -196,14 +249,18 @@ mkdir -p ${basedir}/out/web
|
||||
${podman_run} -v ${basedir}/build-web:/root/build -v ${basedir}/out/web:/root/out localhost/godot-web:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/web
|
||||
|
||||
mkdir -p ${basedir}/out/macos
|
||||
${podman_run} -v ${basedir}/build-macos:/root/build -v ${basedir}/out/macos:/root/out -v ${basedir}/deps/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/moltenvk:/root/moltenvk -v ${basedir}/deps/angle:/root/angle localhost/godot-osx:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/macos
|
||||
|
||||
mkdir -p ${basedir}/out/android
|
||||
${podman_run} -v ${basedir}/build-android:/root/build -v ${basedir}/out/android:/root/out -v ${basedir}/deps/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/swappy:/root/swappy -v ${basedir}/deps/keystore:/root/keystore localhost/godot-android:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/android
|
||||
|
||||
mkdir -p ${basedir}/out/ios
|
||||
${podman_run} -v ${basedir}/build-ios:/root/build -v ${basedir}/out/ios:/root/out localhost/godot-ios:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/ios
|
||||
|
||||
uid=$(id -un)
|
||||
gid=$(id -gn)
|
||||
if [ ! -z "$SUDO_UID" ]; then
|
||||
chown -R "${SUDO_UID}":"${SUDO_GID}" ${basedir}/git ${basedir}/out ${basedir}/mono-glue ${basedir}/godot*.tar.gz
|
||||
uid="${SUDO_UID}"
|
||||
gid="${SUDO_GID}"
|
||||
fi
|
||||
chown -R -f $uid:$gid ${basedir}/git ${basedir}/out ${basedir}/mono-glue ${basedir}/godot*.tar.gz
|
||||
|
||||
@@ -12,6 +12,14 @@
|
||||
# relevant tool in your PATH or an absolute path to run it from.
|
||||
export PODMAN='podman'
|
||||
|
||||
# Path to a Git clone of https://github.com/godotengine/godot-builds.
|
||||
# Only used for uploading official releases.
|
||||
export GODOT_BUILDS_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
|
||||
|
||||
98
publish-release.sh
Executable file
98
publish-release.sh
Executable file
@@ -0,0 +1,98 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Config
|
||||
|
||||
# For signing keys, and path to godot-builds repo.
|
||||
source ./config.sh
|
||||
|
||||
godot_version=""
|
||||
web_editor_latest=0
|
||||
|
||||
while getopts "h?v:l" opt; do
|
||||
case "$opt" in
|
||||
h|\?)
|
||||
echo "Usage: $0 [OPTIONS...]"
|
||||
echo
|
||||
echo " -v godot version (e.g: 3.2-stable) [mandatory]"
|
||||
echo " -l mark web editor as latest"
|
||||
echo
|
||||
exit 1
|
||||
;;
|
||||
v)
|
||||
godot_version=$OPTARG
|
||||
;;
|
||||
l)
|
||||
web_editor_latest=1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -z "${godot_version}" ]; then
|
||||
echo "Mandatory argument -v missing."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Confirm
|
||||
|
||||
IFS=- read version status <<< "${godot_version}"
|
||||
echo "Publishing Godot ${version} ${status}."
|
||||
read -p "Is this correct (y/n)? " choice
|
||||
case "$choice" in
|
||||
y|Y ) echo "yes";;
|
||||
n|N ) echo "No, aborting."; exit 0;;
|
||||
* ) echo "Invalid choice, aborting."; exit 1;;
|
||||
esac
|
||||
template_version=${version}.${status}
|
||||
|
||||
# Upload to GitHub godot-builds
|
||||
|
||||
if [ -z "${GODOT_BUILDS_PATH}" ]; then
|
||||
echo "Missing path to godotengine/godot-builds clone in config.sh, necessary to upload releases. Aborting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
${GODOT_BUILDS_PATH}/tools/upload-github.sh -v ${version} -f ${status}
|
||||
|
||||
# Web editor
|
||||
|
||||
scp -P 22 -r web/${template_version} ${WEB_EDITOR_HOSTNAME}:/home/akien/web_editor/
|
||||
sleep 2
|
||||
command="sudo mv /home/akien/web_editor/${template_version} /var/www/editor.godotengine.org/public/releases/"
|
||||
command="${command}; cd /var/www/editor.godotengine.org; sudo chown -R www-data:www-data public/releases/${template_version}"
|
||||
command="${command}; sudo ./create-symlinks.sh -v ${template_version}"
|
||||
if [ $web_editor_latest == 1 ]; then
|
||||
command="${command} -l"
|
||||
fi
|
||||
ssh -P 22 ${WEB_EDITOR_HOSTNAME} "${command}"
|
||||
|
||||
# NuGet packages
|
||||
|
||||
publish_nuget_packages() {
|
||||
for pkg in "$@"; do
|
||||
dotnet nuget push $pkg --source "${NUGET_SOURCE}" --api-key "${NUGET_API_KEY}" --skip-duplicate
|
||||
done
|
||||
}
|
||||
|
||||
if [ ! -z "${NUGET_SOURCE}" ] && [ ! -z "${NUGET_API_KEY}" ] && [[ $(type -P "dotnet") ]]; then
|
||||
echo "Publishing NuGet packages..."
|
||||
publish_nuget_packages out/linux/x86_64/tools-mono/GodotSharp/Tools/nupkgs/*.nupkg
|
||||
else
|
||||
echo "Disabling NuGet package publishing as config.sh does not define the required data (NUGET_SOURCE, NUGET_API_KEY), or dotnet can't be found in PATH."
|
||||
fi
|
||||
|
||||
# Godot Android library
|
||||
|
||||
if [ -d "deps/keystore" ]; then
|
||||
echo "Publishing Android library to MavenCentral..."
|
||||
sh build-android/upload-mavencentral.sh
|
||||
else
|
||||
echo "Disabling Android library publishing as deps/keystore doesn't exist."
|
||||
fi
|
||||
|
||||
# Stable release only
|
||||
|
||||
if [ "${status}" == "stable" ]; then
|
||||
echo "NOTE: This script doesn't handle yet uploading stable releases to the main GitHub repository, Steam, EGS, and itch.io."
|
||||
fi
|
||||
Reference in New Issue
Block a user