-
-
Notifications
You must be signed in to change notification settings - Fork 64
/
build.sh
executable file
·140 lines (106 loc) · 4.78 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
#!/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
# 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_32}/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
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
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_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
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
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"