forked from SPLURT-Station/S.P.L.U.R.T-tg
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPreCompile.sh
More file actions
executable file
·59 lines (50 loc) · 1.47 KB
/
PreCompile.sh
File metadata and controls
executable file
·59 lines (50 loc) · 1.47 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
#!/bin/bash
./InstallDeps.sh
set -e
set -x
#load dep exports
#need to switch to game dir for Dockerfile weirdness
original_dir=$PWD
cd "$1"
. dependencies.sh
cd "$original_dir"
# update rust-g
if [ ! -d "rust-g" ]; then
echo "Cloning rust-g..."
git clone https://github.com/tgstation/rust-g
cd rust-g
~/.cargo/bin/rustup target add i686-unknown-linux-gnu
else
echo "Fetching rust-g..."
cd rust-g
git fetch
~/.cargo/bin/rustup target add i686-unknown-linux-gnu
fi
echo "Deploying rust-g..."
git checkout "$RUST_G_VERSION"
env PKG_CONFIG_ALLOW_CROSS=1 ~/.cargo/bin/cargo build --ignore-rust-version --release --target=i686-unknown-linux-gnu
cp -f target/i686-unknown-linux-gnu/release/librust_g.so "$1/librust_g.so"
cd ..
#
cd "$original_dir"
# update dreamluau
if [ ! -d "dreamluau" ]; then
echo "Cloning dreamluau..."
git clone https://github.com/tgstation/dreamluau
cd dreamluau
~/.cargo/bin/rustup target add i686-unknown-linux-gnu
else
echo "Fetching dreamlaua..."
cd dreamluau
git fetch
~/.cargo/bin/rustup target add i686-unknown-linux-gnu
fi
echo "Deploying Dreamlaua..."
git checkout "$DREAMLUAU_VERSION"
env PKG_CONFIG_ALLOW_CROSS=1 ~/.cargo/bin/cargo build --ignore-rust-version --release --target=i686-unknown-linux-gnu
cp -f target/i686-unknown-linux-gnu/release/libdreamluau.so "$1/libdreamluau.so"
cd ..
# compile tgui
echo "Compiling tgui..."
cd "$1"
env TG_BOOTSTRAP_CACHE="$original_dir" CBT_BUILD_MODE="TGS" tools/bootstrap/javascript.sh tools/build/build.ts