From e3b470f5d3c5dc04527a4d2ceadce972863317a2 Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Fri, 3 Jul 2020 08:15:29 +0200 Subject: [PATCH] Alright, I don't want to deal with path shenanigans right now. --- code/__DEFINES/rust_g.dm | 39 +--------------------------------- tools/travis/install_rust_g.sh | 5 ++--- 2 files changed, 3 insertions(+), 41 deletions(-) diff --git a/code/__DEFINES/rust_g.dm b/code/__DEFINES/rust_g.dm index 120c5fdee5..b7754f7141 100644 --- a/code/__DEFINES/rust_g.dm +++ b/code/__DEFINES/rust_g.dm @@ -1,42 +1,5 @@ // rust_g.dm - DM API for rust_g extension library -// -// To configure, create a `rust_g.config.dm` and set what you care about from -// the following options: -// -// #define RUST_G "path/to/rust_g" -// Override the .dll/.so detection logic with a fixed path or with detection -// logic of your own. -// -// #define RUSTG_OVERRIDE_BUILTINS -// Enable replacement rust-g functions for certain builtins. Off by default. - -#ifndef RUST_G -// Default automatic RUST_G detection. -// On Windows, looks in the standard places for `rust_g.dll`. -// On Linux, looks in `.`, `$LD_LIBRARY_PATH`, and `~/.byond/bin` for either of -// `librust_g.so` (preferred) or `rust_g` (old). -/proc/__detect_rust_g() - var/static/__rust_g - . = __rust_g - if (!.) - if (world.system_type == UNIX) - if (fexists("./librust_g.so")) - // No need for LD_LIBRARY_PATH badness. - . = __rust_g = "./librust_g.so" - else if (fexists("./rust_g")) - // Old dumb filename. - . = __rust_g = "./rust_g" - else if (fexists("[world.GetConfig("env", "HOME")]/.byond/bin/rust_g")) - // Old dumb filename in `~/.byond/bin`. - . = __rust_g = "rust_g" - else - // It's not in the current directory, so try others - . = __rust_g = "librust_g.so" - else - . = __rust_g = "rust_g" - -#define RUST_G __detect_rust_g() -#endif +#define RUST_G "rust_g" #define RUSTG_JOB_NO_RESULTS_YET "NO RESULTS YET" #define RUSTG_JOB_NO_SUCH_JOB "NO SUCH JOB" diff --git a/tools/travis/install_rust_g.sh b/tools/travis/install_rust_g.sh index 2309f9d952..227034af66 100755 --- a/tools/travis/install_rust_g.sh +++ b/tools/travis/install_rust_g.sh @@ -4,6 +4,5 @@ set -euo pipefail source dependencies.sh mkdir -p ~/.byond/bin -wget -O ~/.byond/bin/librust_g.so "https://github.com/tgstation/rust-g/releases/download/$RUST_G_VERSION/librust_g.so" -chmod +x ~/.byond/bin/librust_g.so -ldd ~/.byond/bin/librust_g.so +wget -O ~/.byond/bin/rust_g "https://github.com/tgstation/rust-g/releases/download/$RUST_G_VERSION/librust_g.so" +chmod +x ~/.byond/bin/rust_g