mirror of
https://github.com/godotengine/godot-build-scripts.git
synced 2026-01-04 02:09:44 +03:00
Follow-up to https://github.com/godotengine/build-containers/pull/128. Also reverts #88 since these new images include JDK 17, and the closure compiler issue was fixed upstream. And removes the manual install of gettext which is now also part of the images. X11 libs should not be needed to generate the Mono glue anymore (they've been unnecessary for a while already).
90 lines
2.9 KiB
Bash
Executable File
90 lines
2.9 KiB
Bash
Executable File
#!/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"
|
|
export TERM=xterm
|
|
|
|
rm -rf godot
|
|
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"
|
|
|
|
# Classical
|
|
|
|
if [ "${CLASSICAL}" == "1" ]; then
|
|
echo "Starting classical build for Linux..."
|
|
|
|
export PATH="${GODOT_SDK_LINUX_X86_64}/bin:${BASE_PATH}"
|
|
|
|
$SCONS platform=linuxbsd arch=x86_64 $OPTIONS target=editor
|
|
mkdir -p /root/out/x86_64/tools
|
|
cp -rvp bin/* /root/out/x86_64/tools
|
|
rm -rf bin
|
|
|
|
$SCONS platform=linuxbsd arch=x86_64 $OPTIONS target=template_debug
|
|
$SCONS platform=linuxbsd arch=x86_64 $OPTIONS target=template_release
|
|
mkdir -p /root/out/x86_64/templates
|
|
cp -rvp bin/* /root/out/x86_64/templates
|
|
rm -rf bin
|
|
|
|
export PATH="${GODOT_SDK_LINUX_X86}/bin:${BASE_PATH}"
|
|
|
|
$SCONS platform=linuxbsd arch=x86_32 $OPTIONS target=editor
|
|
mkdir -p /root/out/x86_32/tools
|
|
cp -rvp bin/* /root/out/x86_32/tools
|
|
rm -rf bin
|
|
|
|
$SCONS platform=linuxbsd arch=x86_32 $OPTIONS target=template_debug
|
|
$SCONS platform=linuxbsd arch=x86_32 $OPTIONS target=template_release
|
|
mkdir -p /root/out/x86_32/templates
|
|
cp -rvp bin/* /root/out/x86_32/templates
|
|
rm -rf bin
|
|
fi
|
|
|
|
# Mono
|
|
|
|
if [ "${MONO}" == "1" ]; then
|
|
echo "Starting Mono build for Linux..."
|
|
|
|
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}"
|
|
|
|
$SCONS platform=linuxbsd arch=x86_64 $OPTIONS $OPTIONS_MONO target=editor
|
|
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=linuxbsd
|
|
mkdir -p /root/out/x86_64/tools-mono
|
|
cp -rvp bin/* /root/out/x86_64/tools-mono
|
|
rm -rf bin
|
|
|
|
$SCONS platform=linuxbsd arch=x86_64 $OPTIONS $OPTIONS_MONO target=template_debug
|
|
$SCONS platform=linuxbsd arch=x86_64 $OPTIONS $OPTIONS_MONO target=template_release
|
|
mkdir -p /root/out/x86_64/templates-mono
|
|
cp -rvp bin/* /root/out/x86_64/templates-mono
|
|
rm -rf bin
|
|
|
|
export PATH="${GODOT_SDK_LINUX_X86}/bin:${BASE_PATH}"
|
|
|
|
$SCONS platform=linuxbsd arch=x86_32 $OPTIONS $OPTIONS_MONO target=editor
|
|
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=linuxbsd
|
|
mkdir -p /root/out/x86_32/tools-mono
|
|
cp -rvp bin/* /root/out/x86_32/tools-mono
|
|
rm -rf bin
|
|
|
|
$SCONS platform=linuxbsd arch=x86_32 $OPTIONS $OPTIONS_MONO target=template_debug
|
|
$SCONS platform=linuxbsd arch=x86_32 $OPTIONS $OPTIONS_MONO target=template_release
|
|
mkdir -p /root/out/x86_32/templates-mono
|
|
cp -rvp bin/* /root/out/x86_32/templates-mono
|
|
rm -rf bin
|
|
fi
|
|
|
|
echo "Linux build successful"
|