mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 14:39:58 +01:00
[MIRROR] Update precompile.sh with the one I had to use to get everything to work (#2105)
* Update precompile.sh with the one I had to use to get everything to work (#55304) Some notes: * failures are hard to deal with if so many installs are behind narrowly scoped checks. This should be improved. for instance rustup failing meant it never ran again. even if you fixed the cause. * you have to install the 64 bit version of openssl too or pkg-config can't find it. * rustup was not in path * setting a target changes the path the .so is dumped out to. I don't care how ugly and bad this is, this is likely what will get used in production unless somebody hands me a better working version. side-note: move to debian based docker images when? * Update precompile.sh with the one I had to use to get everything to work Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
This commit is contained in:
co-authored by
Kyle Spier-Swenson
parent
ad7ccbfefd
commit
9db59d58a7
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# REPO MAINTAINERS: KEEP CHANGES TO THIS IN SYNC WITH /tools/LinuxOneShot/SetupProgram/PreCompile.sh
|
||||
|
||||
# No ~mso
|
||||
set -e
|
||||
set -x
|
||||
|
||||
@@ -42,21 +42,25 @@ if ! ( [ -x "$has_git" ] && [ -x "$has_grep" ] && [ -f "/usr/lib/i386-linux-gnu/
|
||||
sudo rm -rf /var/lib/apt/lists/*
|
||||
fi
|
||||
fi
|
||||
|
||||
dpkg --add-architecture i386
|
||||
apt-get update
|
||||
#apt-get upgrade -y
|
||||
apt-get install -y lib32z1 pkg-config libssl-dev:i386 libssl-dev
|
||||
#update rust-g
|
||||
if [ ! -d "rust-g" ]; then
|
||||
echo "Cloning rust-g..."
|
||||
git clone https://github.com/tgstation/rust-g
|
||||
cd rust-g
|
||||
rustup target add i686-unknown-linux-gnu
|
||||
~/.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"
|
||||
~/.cargo/bin/cargo build --release --target=i686-unknown-linux-gnu
|
||||
mv target/release/librust_g.so "$1/rust_g"
|
||||
mv target/i686-unknown-linux-gnu/release/librust_g.so "$1/rust_g"
|
||||
cd ..
|
||||
|
||||
Reference in New Issue
Block a user