Skip to content

Commit

Permalink
soft sync with cit's tg ""hardsync""
Browse files Browse the repository at this point in the history
  • Loading branch information
MarinaGryphon committed Jan 18, 2021
1 parent 4687053 commit 5ebcd9c
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 54 deletions.
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -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

13 changes: 8 additions & 5 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
50 changes: 11 additions & 39 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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 \
Expand All @@ -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
Expand All @@ -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" ]
39 changes: 38 additions & 1 deletion code/__DEFINES/_extools.dm
Original file line number Diff line number Diff line change
@@ -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()
5 changes: 0 additions & 5 deletions code/__HELPERS/_extools_api.dm

This file was deleted.

6 changes: 3 additions & 3 deletions code/_compile_options.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
1 change: 0 additions & 1 deletion tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 5ebcd9c

Please sign in to comment.