From ebffe80abf0b1b1944eeaafed32281b131125f46 Mon Sep 17 00:00:00 2001 From: ChocoTaco Date: Thu, 28 Nov 2019 20:39:10 -0500 Subject: [PATCH] A lot of updates Git-clone working Wine Version options --- Dockerfile | 15 ++++-- README.md | 6 +-- _custom/GameData/Classic/prefs/dummy | 0 _custom/GameData/Construction/prefs/dummy | 0 .../Construction/scripts/autoexec/dummy | 0 _custom/GameData/FuryTV/prefs/dummy | 0 .../GameData/FuryTV/scripts/autoexec/dummy | 0 _custom/GameData/Meltdown2/prefs/dummy | 0 .../GameData/Meltdown2/scripts/autoexec/dummy | 0 _custom/GameData/Mousemod/prefs/dummy | 0 .../GameData/Mousemod/scripts/autoexec/dummy | 0 _custom/GameData/Shifter/prefs/dummy | 0 .../GameData/Shifter/scripts/autoexec/dummy | 0 _custom/GameData/Triumph/prefs/dummy | 0 .../GameData/Triumph/scripts/autoexec/dummy | 0 _custom/GameData/tac/prefs/dummy | 0 _custom/GameData/tac/scripts/autoexec/dummy | 0 _custom/GameData/variant/prefs/dummy | 0 .../GameData/variant/scripts/autoexec/dummy | 0 _scripts/start-server | 3 +- _scripts/tribesnext-server-installer | 53 +++++++++++++++---- docker-compose.override.yml | 5 ++ docker-compose.yml | 40 ++++++++++++++ 23 files changed, 101 insertions(+), 21 deletions(-) delete mode 100644 _custom/GameData/Classic/prefs/dummy delete mode 100644 _custom/GameData/Construction/prefs/dummy delete mode 100644 _custom/GameData/Construction/scripts/autoexec/dummy delete mode 100644 _custom/GameData/FuryTV/prefs/dummy delete mode 100644 _custom/GameData/FuryTV/scripts/autoexec/dummy delete mode 100644 _custom/GameData/Meltdown2/prefs/dummy delete mode 100644 _custom/GameData/Meltdown2/scripts/autoexec/dummy delete mode 100644 _custom/GameData/Mousemod/prefs/dummy delete mode 100644 _custom/GameData/Mousemod/scripts/autoexec/dummy delete mode 100644 _custom/GameData/Shifter/prefs/dummy delete mode 100644 _custom/GameData/Shifter/scripts/autoexec/dummy delete mode 100644 _custom/GameData/Triumph/prefs/dummy delete mode 100644 _custom/GameData/Triumph/scripts/autoexec/dummy delete mode 100644 _custom/GameData/tac/prefs/dummy delete mode 100644 _custom/GameData/tac/scripts/autoexec/dummy delete mode 100644 _custom/GameData/variant/prefs/dummy delete mode 100644 _custom/GameData/variant/scripts/autoexec/dummy create mode 100644 docker-compose.override.yml create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile index aa54598..6aaa1a6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ FROM multiarch/debian-debootstrap:i386-jessie -MAINTAINER sairuk +MAINTAINER sairuk battlelore chocotaco # ENVIRONMENT ARG SRVUSER=gameserv @@ -7,11 +7,16 @@ ARG SRVUID=1000 ARG SRVDIR=/tmp/tribes2/ ENV INSTDIR=/home/${SRVUSER}/.wine/drive_c/Dynamix/Tribes2/ +# WINE VERSION: wine = 1.6, wine-development = 1.7.29 for i386-jessie +ENV WINEVER=wine-development + # UPDATE IMAGE -RUN apt-get -y update && apt-get -y upgrade +RUN apt-get -y update +RUN apt-get -y upgrade # DEPENDENCIES +RUN dpkg --add-architecture i386 RUN apt-get -y install \ # -- access sudo unzip \ @@ -20,9 +25,11 @@ rsyslog \ # -- utilities sed less vim file \ # --- wine -wine \ +${WINEVER} \ # -- display -xvfb +xvfb \ +# -- git clone +git-core # CLEAN IMAGE diff --git a/README.md b/README.md index 96bbb79..2625d4e 100644 --- a/README.md +++ b/README.md @@ -29,11 +29,7 @@ No volumes are used NB: the `--rm` arg will destroy the container when stopped; internal ports (666) can be mapped to available host ports (27999) per container ``` -docker run -d --rm \ --p 27999:666/tcp \ --p 28000:28000/udp \ ---name tribesnext-server \ -tribesnext-server:latest +docker run -d --rm -p 27999:666/tcp -p 28000:28000/udp --name tribesnext-server tribesnext-server:latest ``` **Stop container** diff --git a/_custom/GameData/Classic/prefs/dummy b/_custom/GameData/Classic/prefs/dummy deleted file mode 100644 index e69de29..0000000 diff --git a/_custom/GameData/Construction/prefs/dummy b/_custom/GameData/Construction/prefs/dummy deleted file mode 100644 index e69de29..0000000 diff --git a/_custom/GameData/Construction/scripts/autoexec/dummy b/_custom/GameData/Construction/scripts/autoexec/dummy deleted file mode 100644 index e69de29..0000000 diff --git a/_custom/GameData/FuryTV/prefs/dummy b/_custom/GameData/FuryTV/prefs/dummy deleted file mode 100644 index e69de29..0000000 diff --git a/_custom/GameData/FuryTV/scripts/autoexec/dummy b/_custom/GameData/FuryTV/scripts/autoexec/dummy deleted file mode 100644 index e69de29..0000000 diff --git a/_custom/GameData/Meltdown2/prefs/dummy b/_custom/GameData/Meltdown2/prefs/dummy deleted file mode 100644 index e69de29..0000000 diff --git a/_custom/GameData/Meltdown2/scripts/autoexec/dummy b/_custom/GameData/Meltdown2/scripts/autoexec/dummy deleted file mode 100644 index e69de29..0000000 diff --git a/_custom/GameData/Mousemod/prefs/dummy b/_custom/GameData/Mousemod/prefs/dummy deleted file mode 100644 index e69de29..0000000 diff --git a/_custom/GameData/Mousemod/scripts/autoexec/dummy b/_custom/GameData/Mousemod/scripts/autoexec/dummy deleted file mode 100644 index e69de29..0000000 diff --git a/_custom/GameData/Shifter/prefs/dummy b/_custom/GameData/Shifter/prefs/dummy deleted file mode 100644 index e69de29..0000000 diff --git a/_custom/GameData/Shifter/scripts/autoexec/dummy b/_custom/GameData/Shifter/scripts/autoexec/dummy deleted file mode 100644 index e69de29..0000000 diff --git a/_custom/GameData/Triumph/prefs/dummy b/_custom/GameData/Triumph/prefs/dummy deleted file mode 100644 index e69de29..0000000 diff --git a/_custom/GameData/Triumph/scripts/autoexec/dummy b/_custom/GameData/Triumph/scripts/autoexec/dummy deleted file mode 100644 index e69de29..0000000 diff --git a/_custom/GameData/tac/prefs/dummy b/_custom/GameData/tac/prefs/dummy deleted file mode 100644 index e69de29..0000000 diff --git a/_custom/GameData/tac/scripts/autoexec/dummy b/_custom/GameData/tac/scripts/autoexec/dummy deleted file mode 100644 index e69de29..0000000 diff --git a/_custom/GameData/variant/prefs/dummy b/_custom/GameData/variant/prefs/dummy deleted file mode 100644 index e69de29..0000000 diff --git a/_custom/GameData/variant/scripts/autoexec/dummy b/_custom/GameData/variant/scripts/autoexec/dummy deleted file mode 100644 index e69de29..0000000 diff --git a/_scripts/start-server b/_scripts/start-server index f4190af..ad1ed2c 100755 --- a/_scripts/start-server +++ b/_scripts/start-server @@ -8,5 +8,4 @@ find ${BASEDIR} -name \*.dso -execdir /bin/rm {} \; cd $WINEPREFIX/drive_c/Dynamix/Tribes2/GameData xvfb-run -a -w 5 \ -wine Tribes2.exe -dedicated - +$WINEVER Tribes2.exe --backend=curses -dedicated -mod Classic 28000 \ No newline at end of file diff --git a/_scripts/tribesnext-server-installer b/_scripts/tribesnext-server-installer index a487ad1..ec7a35d 100755 --- a/_scripts/tribesnext-server-installer +++ b/_scripts/tribesnext-server-installer @@ -10,7 +10,7 @@ SRVUSER=gameserv INSBASE=/home/$SRVUSER/.wine/drive_c/Dynamix/ export TMPBASE=/tmp/tribes2 export WINEPREFIX=/home/$SRVUSER/.wine/ -export REQUIREMENTS=(wine Xvfb) +export REQUIREMENTS=($WINEVER Xvfb) # -- server requirements function check_requirements { @@ -31,7 +31,7 @@ function check_requirements { function get_files { if [ ! -f "$TMPBASE/$1" ] then - /usr/bin/wget --no-check-certificate -q "$2/$1" -O "$TMPBASE/$1" + /usr/bin/wget --no-check-certificate "$2/$1" -O "$TMPBASE/$1" fi } @@ -50,9 +50,13 @@ fi # -- download files -get_files tribes2gsi.exe "https://www.the-construct.net/downloads/tribes2/" "$TMPBASE" -get_files TribesNext_rc2a.exe "https://www.tribesnext.com/files/" "$TMPBASE" -get_files TribesNext_RC2_LinuxVersion.zip "https://lutris.net/files/games/tribes-2/" "$TMPBASE" +get_files tribes2gsi.exe "https://www.the-construct.net/downloads/tribes2/" "$TMPBASE" +get_files TribesNext_rc2a.exe "https://www.tribesnext.com/files/" "$TMPBASE" +get_files ruby-1.9.0-2-i386-mswin32.zip "https://ftp.ruby-lang.org/pub/ruby/binaries/mswin32/unstable" "$TMPBASE" +get_files classic_v152.zip "https://tribes2stats.com/files/mods/" "$TMPBASE" + +git clone "https://github.com/ChocoTaco1/TacoServer/" "$TMPBASE/TacoServer" +git clone "https://github.com/ChocoTaco1/TacoMaps/" "$TMPBASE/TacoMaps" # -- some items require an headerless export DISPLAY=:99 @@ -64,7 +68,8 @@ sleep 1 # -- extract the main installer, the silent installer is a lie! -/usr/bin/wine $TMPBASE/tribes2gsi.exe /x Z:\\tmp\\tribes2\\game +echo "Installing tribes2gsi.exe..." +/usr/bin/$WINEVER $TMPBASE/tribes2gsi.exe /x Z:\\tmp\\tribes2\\game # -- move all extract files into place @@ -246,10 +251,38 @@ then fi # -- install tribesnext silently -[ -f $TMPBASE/TribesNext_rc2a.exe ] && /usr/bin/wine $TMPBASE/TribesNext_rc2a.exe /S +echo "Installing TribesNext_rc2a.exe..." +[ -f $TMPBASE/TribesNext_rc2a.exe ] && /usr/bin/$WINEVER $TMPBASE/TribesNext_rc2a.exe /S -# -- extract updated linux version and replace the existing installation -[ -f $TMPBASE/TribesNext_RC2_LinuxVersion.zip ] && /usr/bin/unzip -o $TMPBASE/TribesNext_RC2_LinuxVersion.zip -d $INSBASE/Tribes2/GameData 2>&1 > /dev/null +# -- update Ruby v1.9.0-2 +echo "Installing Ruby Interpreter v1.9.0-2..." +[ -f $TMPBASE/ruby-1.9.0-2-i386-mswin32.zip ] && /usr/bin/unzip -o $TMPBASE/ruby-1.9.0-2-i386-mswin32.zip -d $TMPBASE/ruby 2>&1 > /dev/null +if [ -f $TMPBASE/ruby-1.9.0-2-i386-mswin32.zip ] +then + cp -r $TMPBASE/ruby/bin/msvcrt-ruby190.dll $INSBASE/Tribes2/GameData/msvcrt-ruby190.dll +fi -exit 0 + +# -- update Classic mod to v1.5.2 +echo "Installing Classic mod to v1.5.2..." +[ -f $TMPBASE/classic_v152.zip ] && /usr/bin/unzip -o $TMPBASE/classic_v152.zip -d $TMPBASE/classic 2>&1 > /dev/null +[ -f $TMPBASE/classic/classic_files_v152.zip ] && /usr/bin/unzip -o $TMPBASE/classic/classic_files_v152.zip -d $TMPBASE/classic 2>&1 > /dev/null +# -- move all extract files into place +if [ -f $TMPBASE/classic/classic_files_v152.zip ] +then +# /home/gameserv/.wine/drive_c/Dynamix/Tribes2/GameData/Classic + mv -f $TMPBASE/classic/base/zz_classic_client_v1.vl2 $INSBASE/Tribes2/GameData/base/zz_Classic_client_v1.vl2 + cp -r $TMPBASE/classic/classic/. $INSBASE/Tribes2/GameData/Classic/. +fi + +# -- install TacoServer +echo "Installing TacoServer..." +cp -r $TMPBASE/TacoServer/Classic/. $INSBASE/Tribes2/GameData/Classic/. + +# -- install TacoMaps +echo "Installing TacoMaps..." +mkdir -p $INSBASE/Tribes2/GameData/Classic/Maps +cp -r $TMPBASE/TacoMaps/ $INSBASE/Tribes2/GameData/Classic/Maps/ + +exit 0 \ No newline at end of file diff --git a/docker-compose.override.yml b/docker-compose.override.yml new file mode 100644 index 0000000..a2d6296 --- /dev/null +++ b/docker-compose.override.yml @@ -0,0 +1,5 @@ +version: "3.7" + +networks: + t2-net: + driver: bridge \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..4fffb55 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,40 @@ +version: "3.7" + +services: + + t2: + build: + context: . + dockerfile: ./Dockerfile + environment: + # TODO + T2_SERVERNAME: "T2DockerTest" + + ports: + - target: 28000 + published: 28000 + protocol: udp + mode: host + - target: 666 + protocol: tcp + published: 27999 + mode: host + + networks: + - t2-net + + deploy: + replicas: 1 + update_config: + parallelism: 1 + delay: 5s + restart_policy: + condition: on-failure + + logging: + options: + max-size: "10m" + +networks: + t2-net: + driver: overlay \ No newline at end of file