Skip to content

Commit be46304

Browse files
committed
Linux: Update to new SDK with GCC 13, add ARM64 and ARM32
1 parent 09b9dcf commit be46304

File tree

3 files changed

+92
-9
lines changed

3 files changed

+92
-9
lines changed

build-linux/build.sh

Lines changed: 56 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ mkdir godot
1414
cd godot
1515
tar xf /root/godot.tar.gz --strip-components=1
1616

17-
# pkg-config wrongly points to lib instead of lib64 for arch-dependent header.
18-
sed -i ${GODOT_SDK_LINUX_X86_64}/x86_64-godot-linux-gnu/sysroot/usr/lib/pkgconfig/dbus-1.pc -e "s@/lib@/lib64@g"
19-
2017
# Classical
2118

2219
if [ "${CLASSICAL}" == "1" ]; then
@@ -35,7 +32,7 @@ if [ "${CLASSICAL}" == "1" ]; then
3532
cp -rvp bin/* /root/out/x86_64/templates
3633
rm -rf bin
3734

38-
export PATH="${GODOT_SDK_LINUX_X86}/bin:${BASE_PATH}"
35+
export PATH="${GODOT_SDK_LINUX_X86_32}/bin:${BASE_PATH}"
3936

4037
$SCONS platform=linuxbsd arch=x86_32 $OPTIONS target=editor
4138
mkdir -p /root/out/x86_32/tools
@@ -47,6 +44,32 @@ if [ "${CLASSICAL}" == "1" ]; then
4744
mkdir -p /root/out/x86_32/templates
4845
cp -rvp bin/* /root/out/x86_32/templates
4946
rm -rf bin
47+
48+
export PATH="${GODOT_SDK_LINUX_ARM64}/bin:${BASE_PATH}"
49+
50+
$SCONS platform=linuxbsd arch=arm64 $OPTIONS target=editor
51+
mkdir -p /root/out/arm64/tools
52+
cp -rvp bin/* /root/out/arm64/tools
53+
rm -rf bin
54+
55+
$SCONS platform=linuxbsd arch=arm64 $OPTIONS target=template_debug
56+
$SCONS platform=linuxbsd arch=arm64 $OPTIONS target=template_release
57+
mkdir -p /root/out/arm64/templates
58+
cp -rvp bin/* /root/out/arm64/templates
59+
rm -rf bin
60+
61+
export PATH="${GODOT_SDK_LINUX_ARM32}/bin:${BASE_PATH}"
62+
63+
$SCONS platform=linuxbsd arch=arm32 $OPTIONS target=editor
64+
mkdir -p /root/out/arm32/tools
65+
cp -rvp bin/* /root/out/arm32/tools
66+
rm -rf bin
67+
68+
$SCONS platform=linuxbsd arch=arm32 $OPTIONS target=template_debug
69+
$SCONS platform=linuxbsd arch=arm32 $OPTIONS target=template_release
70+
mkdir -p /root/out/arm32/templates
71+
cp -rvp bin/* /root/out/arm32/templates
72+
rm -rf bin
5073
fi
5174

5275
# Mono
@@ -71,7 +94,7 @@ if [ "${MONO}" == "1" ]; then
7194
cp -rvp bin/* /root/out/x86_64/templates-mono
7295
rm -rf bin
7396

74-
export PATH="${GODOT_SDK_LINUX_X86}/bin:${BASE_PATH}"
97+
export PATH="${GODOT_SDK_LINUX_X86_32}/bin:${BASE_PATH}"
7598

7699
$SCONS platform=linuxbsd arch=x86_32 $OPTIONS $OPTIONS_MONO target=editor
77100
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=linuxbsd
@@ -84,6 +107,34 @@ if [ "${MONO}" == "1" ]; then
84107
mkdir -p /root/out/x86_32/templates-mono
85108
cp -rvp bin/* /root/out/x86_32/templates-mono
86109
rm -rf bin
110+
111+
export PATH="${GODOT_SDK_LINUX_ARM64}/bin:${BASE_PATH}"
112+
113+
$SCONS platform=linuxbsd arch=arm64 $OPTIONS $OPTIONS_MONO target=editor
114+
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=linuxbsd
115+
mkdir -p /root/out/arm64/tools-mono
116+
cp -rvp bin/* /root/out/arm64/tools-mono
117+
rm -rf bin
118+
119+
$SCONS platform=linuxbsd arch=arm64 $OPTIONS $OPTIONS_MONO target=template_debug
120+
$SCONS platform=linuxbsd arch=arm64 $OPTIONS $OPTIONS_MONO target=template_release
121+
mkdir -p /root/out/arm64/templates-mono
122+
cp -rvp bin/* /root/out/arm64/templates-mono
123+
rm -rf bin
124+
125+
export PATH="${GODOT_SDK_LINUX_ARM32}/bin:${BASE_PATH}"
126+
127+
$SCONS platform=linuxbsd arch=arm32 $OPTIONS $OPTIONS_MONO target=editor
128+
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=linuxbsd
129+
mkdir -p /root/out/arm32/tools-mono
130+
cp -rvp bin/* /root/out/arm32/tools-mono
131+
rm -rf bin
132+
133+
$SCONS platform=linuxbsd arch=arm32 $OPTIONS $OPTIONS_MONO target=template_debug
134+
$SCONS platform=linuxbsd arch=arm32 $OPTIONS $OPTIONS_MONO target=template_release
135+
mkdir -p /root/out/arm32/templates-mono
136+
cp -rvp bin/* /root/out/arm32/templates-mono
137+
rm -rf bin
87138
fi
88139

89140
echo "Linux build successful"

build-mono-glue/build.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,12 @@ mkdir godot
1515
cd godot
1616
tar xf ../godot.tar.gz --strip-components=1
1717

18-
# pkg-config wrongly points to lib instead of lib64 for arch-dependent header.
19-
sed -i ${GODOT_SDK_LINUX_X86_64}/x86_64-godot-linux-gnu/sysroot/usr/lib/pkgconfig/dbus-1.pc -e "s@/lib@/lib64@g"
20-
2118
# Mono
2219

2320
if [ "${MONO}" == "1" ]; then
2421
echo "Building and generating Mono glue..."
2522

2623
dotnet --info
27-
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/pkgconfig/
2824

2925
${SCONS} platform=linuxbsd ${OPTIONS} target=editor module_mono_enabled=yes
3026

build-release.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,11 +250,27 @@ if [ "${build_classical}" == "1" ]; then
250250
zip -q -9 "${reldir}/${binname}.zip" ${binname}
251251
rm ${binname}
252252

253+
binname="${godot_basename}_linux.arm64"
254+
cp out/linux/arm64/tools/godot.linuxbsd.editor.arm64 ${binname}
255+
strip ${binname}
256+
zip -q -9 "${reldir}/${binname}.zip" ${binname}
257+
rm ${binname}
258+
259+
binname="${godot_basename}_linux.arm32"
260+
cp out/linux/arm32/tools/godot.linuxbsd.editor.arm32 ${binname}
261+
strip ${binname}
262+
zip -q -9 "${reldir}/${binname}.zip" ${binname}
263+
rm ${binname}
264+
253265
# Templates
254266
cp out/linux/x86_64/templates/godot.linuxbsd.template_release.x86_64 ${templatesdir}/linux_release.x86_64
255267
cp out/linux/x86_64/templates/godot.linuxbsd.template_debug.x86_64 ${templatesdir}/linux_debug.x86_64
256268
cp out/linux/x86_32/templates/godot.linuxbsd.template_release.x86_32 ${templatesdir}/linux_release.x86_32
257269
cp out/linux/x86_32/templates/godot.linuxbsd.template_debug.x86_32 ${templatesdir}/linux_debug.x86_32
270+
cp out/linux/arm64/templates/godot.linuxbsd.template_release.arm64 ${templatesdir}/linux_release.arm64
271+
cp out/linux/arm64/templates/godot.linuxbsd.template_debug.arm64 ${templatesdir}/linux_debug.arm64
272+
cp out/linux/arm32/templates/godot.linuxbsd.template_release.arm32 ${templatesdir}/linux_release.arm32
273+
cp out/linux/arm32/templates/godot.linuxbsd.template_debug.arm32 ${templatesdir}/linux_debug.arm32
258274
strip ${templatesdir}/linux*
259275

260276
## Windows (Classical) ##
@@ -403,11 +419,31 @@ if [ "${build_mono}" == "1" ]; then
403419
zip -r -q -9 "${reldir_mono}/${binbasename}_x86_32.zip" ${binbasename}_x86_32
404420
rm -rf ${binbasename}_x86_32
405421

422+
binbasename="${godot_basename}_mono_linux"
423+
mkdir -p ${binbasename}_arm64
424+
cp out/linux/arm64/tools-mono/godot.linuxbsd.editor.arm64.mono ${binbasename}_arm64/${binbasename}.arm64
425+
strip ${binbasename}_arm64/${binbasename}.arm64
426+
cp -rp out/linux/arm64/tools-mono/GodotSharp/ ${binbasename}_arm64/
427+
zip -r -q -9 "${reldir_mono}/${binbasename}_arm64.zip" ${binbasename}_arm64
428+
rm -rf ${binbasename}_arm64
429+
430+
binbasename="${godot_basename}_mono_linux"
431+
mkdir -p ${binbasename}_arm32
432+
cp out/linux/arm32/tools-mono/godot.linuxbsd.editor.arm32.mono ${binbasename}_arm32/${binbasename}.arm32
433+
strip ${binbasename}_arm32/${binbasename}.arm32
434+
cp -rp out/linux/arm32/tools-mono/GodotSharp/ ${binbasename}_arm32/
435+
zip -r -q -9 "${reldir_mono}/${binbasename}_arm32.zip" ${binbasename}_arm32
436+
rm -rf ${binbasename}_arm32
437+
406438
# Templates
407439
cp out/linux/x86_64/templates-mono/godot.linuxbsd.template_debug.x86_64.mono ${templatesdir_mono}/linux_debug.x86_64
408440
cp out/linux/x86_64/templates-mono/godot.linuxbsd.template_release.x86_64.mono ${templatesdir_mono}/linux_release.x86_64
409441
cp out/linux/x86_32/templates-mono/godot.linuxbsd.template_debug.x86_32.mono ${templatesdir_mono}/linux_debug.x86_32
410442
cp out/linux/x86_32/templates-mono/godot.linuxbsd.template_release.x86_32.mono ${templatesdir_mono}/linux_release.x86_32
443+
cp out/linux/arm64/templates-mono/godot.linuxbsd.template_debug.arm64.mono ${templatesdir_mono}/linux_debug.arm64
444+
cp out/linux/arm64/templates-mono/godot.linuxbsd.template_release.arm64.mono ${templatesdir_mono}/linux_release.arm64
445+
cp out/linux/arm32/templates-mono/godot.linuxbsd.template_debug.arm32.mono ${templatesdir_mono}/linux_debug.arm32
446+
cp out/linux/arm32/templates-mono/godot.linuxbsd.template_release.arm32.mono ${templatesdir_mono}/linux_release.arm32
411447
strip ${templatesdir_mono}/linux*
412448

413449
## Windows (Mono) ##

0 commit comments

Comments
 (0)