forked from Aurorastation/Aurora.3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fixes errors when running dependencies.sh outside github * Adds PreCOmpile/InstallDeps/WatchdogLaunch Script heavilybased on tgs versions * removes tgui artifacts -> using server side build script instead * removes librust_g.so -> using server side build script instead * adds .tgs.yml * Bump Flyway Version Co-authored-by: Werner <[email protected]>
- Loading branch information
Showing
15 changed files
with
103 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# This file is used by TGS (https://github.com/tgstation/tgstation-server) clients to quickly initialize a server instance for the codebase | ||
# The format isn't documented anywhere but hopefully we never have to change it. If there are questions, contact the TGS maintainer Cyberboss/@Dominion#0444 | ||
version: 1 | ||
# The BYOND version to use (kept in sync with dependencies.sh by the "TGS Test Suite" CI job) | ||
# Must be interpreted as a string, keep quoted | ||
byond: "514.1588" | ||
# Folders to create in "<instance_path>/Configuration/GameStaticFiles/" | ||
static_files: | ||
# Config directory should be static | ||
- name: config | ||
# This implies the folder should be pre-populated with contents from the repo | ||
# populate: true | ||
# Data directory must be static | ||
- name: data | ||
# String dictionary. The value is the location of the file in the repo to upload to TGS. The key is the name of the file to upload to "<instance_path>/Configuration/EventScripts/" | ||
# This one is for Linux hosted servers | ||
linux_scripts: | ||
PreCompile.sh: tools/tgs_scripts/PreCompile.sh | ||
WatchdogLaunch.sh: tools/tgs_scripts/WatchdogLaunch.sh | ||
InstallDeps.sh: tools/tgs_scripts/InstallDeps.sh | ||
# The security level the game should be run at | ||
security: Trusted |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
#find out what we have (+e is important for this) | ||
set +e | ||
has_git="$(command -v git)" | ||
has_curl="$(command -v curl)" | ||
has_cargo="$(command -v ~/.cargo/bin/cargo)" | ||
has_sudo="$(command -v sudo)" | ||
has_pip3="$(command -v pip3)" | ||
set -e | ||
set -x | ||
|
||
# apt packages, libssl needed by rust-g but not included in TGS barebones install | ||
if ! ( [ -x "$has_git" ] && [ -x "$has_curl" ] && [ -f "/usr/lib/i386-linux-gnu/libssl.so" ] ); then | ||
echo "Installing apt dependencies..." | ||
if ! [ -x "$has_sudo" ]; then | ||
dpkg --add-architecture i386 | ||
apt-get update | ||
apt-get install -y lib32z1 git pkg-config libssl-dev:i386 libssl-dev zlib1g-dev:i386 curl | ||
else | ||
sudo dpkg --add-architecture i386 | ||
sudo apt-get update | ||
sudo apt-get install -y lib32z1 git pkg-config libssl-dev:i386 libssl-dev zlib1g-dev:i386 curl | ||
fi | ||
fi | ||
|
||
# install cargo if needed | ||
if ! [ -x "$has_cargo" ]; then | ||
echo "Installing rust..." | ||
curl https://sh.rustup.rs -sSf | sh -s -- -y | ||
. ~/.profile | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/bash | ||
|
||
./InstallDeps.sh | ||
|
||
set -e | ||
set -x | ||
|
||
#load dep exports | ||
#need to switch to game dir for Dockerfile weirdness | ||
original_dir=$PWD | ||
cd "$1" | ||
. dependencies.sh | ||
cd "$original_dir" | ||
|
||
# update rust-g | ||
if [ ! -d "rust-g" ]; then | ||
echo "Cloning rust-g..." | ||
git clone https://github.com/Aurorastation/rust-g | ||
cd rust-g | ||
~/.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" | ||
env PKG_CONFIG_ALLOW_CROSS=1 ~/.cargo/bin/cargo build --release --target=i686-unknown-linux-gnu --all-features | ||
mv target/i686-unknown-linux-gnu/release/librust_g.so "$1/librust_g.so" | ||
cd .. | ||
|
||
# compile tgui | ||
echo "Compiling tgui..." | ||
cd "$1" | ||
env TG_BOOTSTRAP_CACHE="$original_dir" TG_BOOTSTRAP_NODE_LINUX=1 CBT_BUILD_MODE="TGS" tools/bootstrap/node tools/build/build.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
|
||
# Special file to ensure all dependencies still exist between server launches. | ||
# Mainly for use by people who abuse docker by modifying the container's system. | ||
|
||
./InstallDeps.sh |