Files
Paradise/tools/tgs_scripts/PreCompile.sh
AffectedArc07 4ccd0b453f Redoes CI + removes RUSTG from the repo (#23490)
* Redoes CI + removes RUSTG from the repo

* We need these

* Split these out

* Why does every CI PR end like this

* Agh

* Fun

* Even more shit

* Try this

* Lets bump this
2023-12-08 17:05:08 +01:00

34 lines
724 B
Bash
Executable File

#!/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 --release --features all --target=i686-unknown-linux-gnu
mv target/i686-unknown-linux-gnu/release/librust_g.so "$1/librust_g.so"
cd ..