From 9db59d58a7f5d27bddadbccd94ef6e86f53b5ff1 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Thu, 10 Dec 2020 11:47:21 +0100 Subject: [PATCH] [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 --- tools/tgs4_scripts/PreCompile.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tools/tgs4_scripts/PreCompile.sh b/tools/tgs4_scripts/PreCompile.sh index ef16cdd900c..cc74790c307 100755 --- a/tools/tgs4_scripts/PreCompile.sh +++ b/tools/tgs4_scripts/PreCompile.sh @@ -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 ..