-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJustfile
More file actions
114 lines (99 loc) · 3.58 KB
/
Copy pathJustfile
File metadata and controls
114 lines (99 loc) · 3.58 KB
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
# SPDX-FileCopyrightText: Robert Ryszard Paciorek <rrp@opcode.eu.org>
# SPDX-License-Identifier: MIT
run: build
godot project.godot
build: init-submodules build-gdspice build-qemu-images build-addons-godot-xterm build-manual build-addons-gdcef
mkdir -p imported
build-windows-libs:
@ WINDOWS=true just build-gdspice build-addons-godot-xterm build-addons-gdcef
init-submodules:
#!/bin/sh -e
echo '{{BOLD + YELLOW}} Init git submodules {{NORMAL}}'
# only init and checkout on empty submodule directory, DO NOT checkout on already checkouted submodule
git submodule status | while read a b c; do [ -z "$( ls -A "$b" )" ] && git submodule update --init $b; done || true
build-godot-cpp: init-submodules
#!/bin/sh -e
echo '{{BOLD + YELLOW}} Build godot-cpp {{NORMAL}}'
cd addons/3rdparty/_godot-cpp/
git submodule update --init .
if [ "$WINDOWS" = "true" ]; then
[ -f bin/libgodot-cpp.windows.template_debug.x86_64.a ] || scons platform=windows arch=x86_64
[ -f bin/libgodot-cpp.windows.template_release.x86_64.a ] || ln -sr bin/libgodot-cpp.windows.template_debug.x86_64.a bin/libgodot-cpp.windows.template_release.x86_64.a
else
[ -f bin/libgodot-cpp.linux.template_debug.x86_64.a ] || scons
[ -f bin/libgodot-cpp.linux.template_release.x86_64.a ] || ln -sr bin/libgodot-cpp.linux.template_debug.x86_64.a bin/libgodot-cpp.linux.template_release.x86_64.a
fi
build-gdspice: build-godot-cpp
#!/bin/sh -e
echo '{{BOLD + YELLOW}} Build gdSpice {{NORMAL}}'
cd ElectronicsSimulator/GdSpice/
if [ "$WINDOWS" = "true" ]; then
scons platform=windows arch=x86_64
else
scons
fi
build-qemu-images:
#!/bin/sh -e
echo '{{BOLD + YELLOW}} Build qemu images {{NORMAL}}'
cd ComputerSimulator/OS/
make
build-addons-godot-xterm: build-godot-cpp
#!/bin/sh -e
echo '{{BOLD + YELLOW}} Build GodotXterm {{NORMAL}}'
cd addons/3rdparty/godot-xterm/
if [ "$WINDOWS" = "true" ]; then
cd addons/godot_xterm/native/
scons platform=windows arch=x86_64 build_library=False no_pty=True
else
SCONSFLAGS="build_library=False" just
fi
build-manual:
#!/bin/sh -e
echo '{{BOLD + YELLOW}} Build manual pages {{NORMAL}}'
cd Manual/
scons
build-addons-gdcef: build-godot-cpp
#!/bin/sh -e
echo '{{BOLD + YELLOW}} Build gdCef {{NORMAL}}'
cd addons/3rdparty/gdcef/
if ! LANG=C patch --dry-run -t -p1 < ../gdcef-no-dbus.patch | grep 'Reversed (or previously applied) patch detected' > /dev/null; then
patch -t -p1 < ../gdcef-no-dbus.patch
fi
if [ "$WINDOWS" = "true" ]; then
(
mkdir -p cef_artifacts
cd cef_artifacts/
if [ -f windows/libgdcef.dll ]; then
exit
fi
tempdir=`mktemp -d`
(
cd "$tempdir"
wget https://github.com/Lecrapouille/gdcef/releases/download/v0.19.3-godot4/gdcef-0.19.3_godot-4.5.zip
unzip gdcef-0.19.3_godot-4.5.zip
)
mv "$tempdir/gdcef/cef_artifacts/windows" .
rm -fr "$tempdir"
)
else
(
while read p i; do
pip3 show $p > /dev/null
done < requirements.txt
/usr/bin/env python3 build.py
echo '/sbin/ldconfig -p | grep libGL.so.1 > /dev/null; exit $?' > cef_artifacts/linux/check_libGL.sh
chmod +x cef_artifacts/linux/check_libGL.sh
)
fi
build-addons-godot_wry:
#!/bin/sh -e
tempdir=`mktemp -d`
(
cd "$tempdir"
wget https://github.com/doceazedo/godot_wry/releases/download/v1.0.2/godot_wry.zip # TODO update or build from source due to BUG https://github.com/doceazedo/godot_wry/pull/79 DO NOT use last git version due to BUG https://github.com/doceazedo/godot_wry/issues/92
unzip godot_wry.zip
mv godot_wry/addons/godot_wry/examples .
)
rm -fr addons/godot_wry
mv "$tempdir/godot_wry/addons/godot_wry" addons/
rm -fr "$tempdir"