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"
|
||||
|
||||
# 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} ]
|
||||
then
|
||||
|
@ -63,12 +63,12 @@ then
|
|||
else
|
||||
RELEASE="Experimental"
|
||||
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
|
||||
|
||||
# Steam files
|
||||
export STEAM_LOGIN="${HOME}/steamlogin"
|
||||
export STEAMCMD=steamcmd
|
||||
export STEAMCMD="steamcmd +@sSteamCmdForcePlatformType windows"
|
||||
|
||||
# Other stuff
|
||||
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
|
||||
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
|
||||
|
||||
# Add 32 bit support
|
||||
RUN dpkg --add-architecture i386
|
||||
|
||||
# Add backports and contrib
|
||||
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 \
|
||||
strace \
|
||||
wget \
|
||||
xmlstarlet
|
||||
wine \
|
||||
wine64 \
|
||||
wine32:i386 \
|
||||
winbind \
|
||||
xmlstarlet \
|
||||
xvfb
|
||||
|
||||
# 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 \
|
||||
|
|
|
@ -421,7 +421,7 @@ start(){
|
|||
then
|
||||
sed -e "s,^steamQueryPort.*,steamQueryPort = ${STEAM_PORT};," -i "${SERVER_CFG_DST}"
|
||||
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=$?
|
||||
printf "\n[ ${yellow}DayZ${default} ] Server exited. Exit code: ${EXIT_CODE}\n"
|
||||
report
|
||||
|
|
|
@ -8,6 +8,12 @@ export TERM=screen.xterm-256color
|
|||
unset DEVELOPMENT
|
||||
EOF
|
||||
|
||||
# Start the Xvfb display server in the background
|
||||
Xvfb ${DISPLAY} -screen 0 1024x768x24 &
|
||||
|
||||
# Let it start up
|
||||
sleep 5
|
||||
|
||||
# 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
|
||||
|
|
Loading…
Add table
Reference in a new issue