mirror of
https://ceregatti.org/git/daniel/dayzdockerserver.git
synced 2025-10-13 21:43:30 +00:00
Use wine to run the server. WIP.
This commit is contained in:
parent
247612f32d
commit
d517f56f8f
4 changed files with 19 additions and 5 deletions
|
@ -52,7 +52,7 @@ export FILES="/files"
|
||||||
export SERVER_FILES="/serverfiles"
|
export SERVER_FILES="/serverfiles"
|
||||||
|
|
||||||
# Used to check if dayZ is installed
|
# Used to check if dayZ is installed
|
||||||
export SERVER_INSTALL_FILE="${SERVER_FILES}/DayZServer"
|
export SERVER_INSTALL_FILE="${SERVER_FILES}/DayZServer_x64.exe"
|
||||||
|
|
||||||
if [ -f ${SERVER_INSTALL_FILE} ]
|
if [ -f ${SERVER_INSTALL_FILE} ]
|
||||||
then
|
then
|
||||||
|
@ -63,12 +63,12 @@ then
|
||||||
else
|
else
|
||||||
RELEASE="Experimental"
|
RELEASE="Experimental"
|
||||||
fi
|
fi
|
||||||
VERSION=$(strings /serverfiles/DayZServer | grep -P "1\.\d{2}\.\d{6}")" - ${RELEASE}"
|
VERSION=$(strings ${SERVER_INSTALL_FILE} | grep -P "1\.\d{2}\.\d{6}")" - ${RELEASE}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Steam files
|
# Steam files
|
||||||
export STEAM_LOGIN="${HOME}/steamlogin"
|
export STEAM_LOGIN="${HOME}/steamlogin"
|
||||||
export STEAMCMD=steamcmd
|
export STEAMCMD="steamcmd +@sSteamCmdForcePlatformType windows"
|
||||||
|
|
||||||
# Other stuff
|
# Other stuff
|
||||||
export YES="${green}yes${default}"
|
export YES="${green}yes${default}"
|
||||||
|
|
|
@ -6,6 +6,9 @@ RUN rm /bin/sh && ln -s /bin/bash /bin/sh
|
||||||
# Set debconf to run non-interactively
|
# Set debconf to run non-interactively
|
||||||
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
|
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
|
||||||
|
|
||||||
|
# Add 32 bit support
|
||||||
|
RUN dpkg --add-architecture i386
|
||||||
|
|
||||||
# Add backports and contrib
|
# Add backports and contrib
|
||||||
RUN sed -i /etc/apt/sources.list.d/debian.sources -e 's/Components: main/Components: main contrib non-free/g'
|
RUN sed -i /etc/apt/sources.list.d/debian.sources -e 's/Components: main/Components: main contrib non-free/g'
|
||||||
|
|
||||||
|
@ -22,7 +25,12 @@ RUN apt-get update && apt-get -y upgrade && apt-get -y install --no-install-reco
|
||||||
procps \
|
procps \
|
||||||
strace \
|
strace \
|
||||||
wget \
|
wget \
|
||||||
xmlstarlet
|
wine \
|
||||||
|
wine64 \
|
||||||
|
wine32:i386 \
|
||||||
|
winbind \
|
||||||
|
xmlstarlet \
|
||||||
|
xvfb
|
||||||
|
|
||||||
# Add bercon-cli https://github.com/WoozyMasta/bercon
|
# Add bercon-cli https://github.com/WoozyMasta/bercon
|
||||||
RUN wget https://github.com/WoozyMasta/bercon-cli/releases/latest/download/bercon-cli-linux-amd64 -O bercon-cli \
|
RUN wget https://github.com/WoozyMasta/bercon-cli/releases/latest/download/bercon-cli-linux-amd64 -O bercon-cli \
|
||||||
|
|
|
@ -421,7 +421,7 @@ start(){
|
||||||
then
|
then
|
||||||
sed -e "s,^steamQueryPort.*,steamQueryPort = ${STEAM_PORT};," -i "${SERVER_CFG_DST}"
|
sed -e "s,^steamQueryPort.*,steamQueryPort = ${STEAM_PORT};," -i "${SERVER_CFG_DST}"
|
||||||
fi
|
fi
|
||||||
./DayZServer "${mod_command_line}" "${server_command_line}" ${parameters}
|
/usr/lib/wine/wine64 DayZServer_x64.exe "${mod_command_line}" "${server_command_line}" ${parameters}
|
||||||
EXIT_CODE=$?
|
EXIT_CODE=$?
|
||||||
printf "\n[ ${yellow}DayZ${default} ] Server exited. Exit code: ${EXIT_CODE}\n"
|
printf "\n[ ${yellow}DayZ${default} ] Server exited. Exit code: ${EXIT_CODE}\n"
|
||||||
report
|
report
|
||||||
|
|
|
@ -8,6 +8,12 @@ export TERM=screen.xterm-256color
|
||||||
unset DEVELOPMENT
|
unset DEVELOPMENT
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
# Start the Xvfb display server in the background
|
||||||
|
Xvfb ${DISPLAY} -screen 0 1024x768x24 &
|
||||||
|
|
||||||
|
# Let it start up
|
||||||
|
sleep 5
|
||||||
|
|
||||||
# Start the server.
|
# Start the server.
|
||||||
# If the DEVELOPMENT environment variable is set to 1, the container will just block and not start the server.
|
# If the DEVELOPMENT environment variable is set to 1, the container will just block and not start the server.
|
||||||
exec dz start
|
exec dz start
|
||||||
|
|
Loading…
Add table
Reference in a new issue