From 5ebcd9c7537e4391bf6e40bd38ee9b5607e7def3 Mon Sep 17 00:00:00 2001 From: MarinaGryphon Date: Sun, 17 Jan 2021 21:18:49 -0600 Subject: [PATCH] soft sync with cit's tg ""hardsync"" --- .gitattributes | 4 +++ .vscode/extensions.json | 13 +++++---- Dockerfile | 50 ++++++++-------------------------- code/__DEFINES/_extools.dm | 39 +++++++++++++++++++++++++- code/__HELPERS/_extools_api.dm | 5 ---- code/_compile_options.dm | 6 ++-- tgstation.dme | 1 - 7 files changed, 64 insertions(+), 54 deletions(-) delete mode 100644 code/__HELPERS/_extools_api.dm diff --git a/.gitattributes b/.gitattributes index a0a624af04f..3913bddd8d6 100644 --- a/.gitattributes +++ b/.gitattributes @@ -7,3 +7,7 @@ html/changelog.html merge=union # force all files to be LF * text=auto + +##Force tab indents on dm files +*.dm whitespace=indent-with-non-tab + diff --git a/.vscode/extensions.json b/.vscode/extensions.json index ca0e6ad9970..bf0d9d2fb96 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,7 +1,10 @@ { - "recommendations": [ - "gbasood.byond-dm-language-support", - "platymuus.dm-langclient", - "EditorConfig.EditorConfig" - ] + "recommendations": [ + "gbasood.byond-dm-language-support", + "platymuus.dm-langclient", + "EditorConfig.EditorConfig", + "arcanis.vscode-zipfs", + "dbaeumer.vscode-eslint", + "kevinkyang.auto-comment-blocks" + ] } diff --git a/Dockerfile b/Dockerfile index fe257a75c08..7bf1cb59e5c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,12 @@ -FROM tgstation/byond:513.1536 as base +FROM tgstation/byond:513.1533 as base -FROM base as build_base +FROM base as rust_g RUN apt-get update \ && apt-get install -y --no-install-recommends \ git \ ca-certificates -FROM build_base as rust_g - WORKDIR /rust_g RUN apt-get install -y --no-install-recommends \ @@ -27,36 +25,6 @@ RUN /bin/bash -c "source dependencies.sh \ && git checkout FETCH_HEAD \ && ~/.cargo/bin/cargo build --release -FROM build_base as bsql - -WORKDIR /bsql - -RUN apt-get install -y --no-install-recommends software-properties-common \ - && add-apt-repository ppa:ubuntu-toolchain-r/test \ - && apt-get update \ - && apt-get install -y --no-install-recommends \ - cmake \ - make \ - g++-7 \ - libmariadb-client-lgpl-dev \ - && git init \ - && git remote add origin https://github.com/tgstation/BSQL - -COPY dependencies.sh . - -RUN /bin/bash -c "source dependencies.sh \ - && git fetch --depth 1 origin \$BSQL_VERSION" \ - && git checkout FETCH_HEAD - -WORKDIR /bsql/artifacts - -ENV CC=gcc-7 CXX=g++-7 - -RUN ln -s /usr/include/mariadb /usr/include/mysql \ - && ln -s /usr/lib/i386-linux-gnu /root/MariaDB \ - && cmake .. \ - && make - FROM base as dm_base WORKDIR /tgstation @@ -65,26 +33,30 @@ FROM dm_base as build COPY . . -RUN DreamMaker -max_errors 0 tgstation.dme && tools/deploy.sh /deploy +RUN DreamMaker -max_errors 0 tgstation.dme \ + && tools/deploy.sh /deploy \ + && rm /deploy/*.dll FROM dm_base EXPOSE 1337 RUN apt-get update \ + && apt-get install -y --no-install-recommends software-properties-common \ + && add-apt-repository ppa:ubuntu-toolchain-r/test \ + && apt-get update \ + && apt-get upgrade -y \ + && apt-get dist-upgrade -y \ && apt-get install -y --no-install-recommends \ + libmariadb2 \ mariadb-client \ libssl1.0.0 \ && rm -rf /var/lib/apt/lists/* \ && mkdir -p /root/.byond/bin COPY --from=rust_g /rust_g/target/release/librust_g.so /root/.byond/bin/rust_g -COPY --from=bsql /bsql/artifacts/src/BSQL/libBSQL.so ./ COPY --from=build /deploy ./ -#bsql fexists memes -RUN ln -s /tgstation/libBSQL.so /root/.byond/bin/libBSQL.so - VOLUME [ "/tgstation/config", "/tgstation/data" ] ENTRYPOINT [ "DreamDaemon", "tgstation.dmb", "-port", "1337", "-trusted", "-close", "-verbose" ] diff --git a/code/__DEFINES/_extools.dm b/code/__DEFINES/_extools.dm index 4513243aae0..e01e09a3d34 100644 --- a/code/__DEFINES/_extools.dm +++ b/code/__DEFINES/_extools.dm @@ -1 +1,38 @@ -#define EXTOOLS (world.system_type == MS_WINDOWS ? "byond-extools.dll" : "libbyond-extools.so") +// _extools_api.dm - DM API for extools extension library +// (blatently stolen from rust_g) +// +// To configure, create a `extools.config.dm` and set what you care about from +// the following options: +// +// #define EXTOOLS "path/to/extools" +// Override the .dll/.so detection logic with a fixed path or with detection +// logic of your own. + +#ifndef EXTOOLS +// Default automatic EXTOOLS detection. +// On Windows, looks in the standard places for `byond-extools.dll`. +// On Linux, looks in the standard places for`libbyond-extools.so`. + +/* This comment bypasses grep checks */ /var/__extools + +/proc/__detect_extools() + if (world.system_type == UNIX) + if (fexists("./libbyond-extools.so")) + // No need for LD_LIBRARY_PATH badness. + return __extools = "./libbyond-extools.so" + else + // It's not in the current directory, so try others + return __extools = "libbyond-extools.so" + else + return __extools = "byond-extools.dll" + +#define EXTOOLS (__extools || __detect_extools()) +#endif + +#ifndef UNIT_TESTS // use default logging as extools is broken on travis +#define EXTOOLS_LOGGING // rust_g is used as a fallback if this is undefined +#endif + +/proc/extools_log_write() + +/proc/extools_finalize_logging() diff --git a/code/__HELPERS/_extools_api.dm b/code/__HELPERS/_extools_api.dm deleted file mode 100644 index af348dc9390..00000000000 --- a/code/__HELPERS/_extools_api.dm +++ /dev/null @@ -1,5 +0,0 @@ -#define EXTOOLS_LOGGING // rust_g is used as a fallback if this is undefined - -/proc/extools_log_write() - -/proc/extools_finalize_logging() diff --git a/code/_compile_options.dm b/code/_compile_options.dm index 0e0bd4ffaad..773c6601930 100644 --- a/code/_compile_options.dm +++ b/code/_compile_options.dm @@ -46,7 +46,7 @@ //Update this whenever you need to take advantage of more recent byond features #define MIN_COMPILER_VERSION 513 -#define MIN_COMPILER_BUILD 1508 +#define MIN_COMPILER_BUILD 1514 #if DM_VERSION < MIN_COMPILER_VERSION || DM_BUILD < MIN_COMPILER_BUILD //Don't forget to update this part #error Your version of BYOND is too out-of-date to compile this project. Go to https://secure.byond.com/download and update. @@ -62,10 +62,10 @@ #define FIND_REF_NO_CHECK_TICK #endif -#ifdef TRAVISBUILDING +#ifdef CIBUILDING #define UNIT_TESTS #endif -#ifdef TRAVISTESTING +#ifdef CITESTING #define TESTING #endif diff --git a/tgstation.dme b/tgstation.dme index 18158efafd7..f9e0cee4e5e 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -150,7 +150,6 @@ #include "code\__DEFINES\storage\_storage.dm" #include "code\__DEFINES\storage\volumetrics.dm" #include "code\__HELPERS\_cit_helpers.dm" -#include "code\__HELPERS\_extools_api.dm" #include "code\__HELPERS\_lists.dm" #include "code\__HELPERS\_logging.dm" #include "code\__HELPERS\_string_lists.dm"