As of today, we have a release version! I can't believe it!

We no longer need to lower case the files.
Switch to the release server id.
Move rcon from the web container to the server container.
Handle .c files on a per-map basis.
Update per-map .c files.
This commit is contained in:
Daniel Ceregatti 2024-02-20 14:28:59 -08:00
parent 5918646eb0
commit 80adb60aa8
7 changed files with 15 additions and 20 deletions

View file

@ -21,13 +21,12 @@ blue="\e[34m"
magenta="\e[35m"
cyan="\e[36m"
# DayZ release server Steam app ID. USE ONE OR THE OTHER!!
# Presumably once the Linux server is released, the binaries will come from this ID.
# But more importantly, if we have a release-compatible binary, the base files must be installed from this id,
# even if the server binary and accompanying shared object don't come from it.
#release_server_appid=223350
# Without a release binary, we must use the experimental server app id for everything.
release_server_appid=1042420
# DayZ release server Steam app ID.
# Now that the Linux server is released, the binaries will come from this ID.
release_server_appid=223350
# Leaving the experimental server appid here to allow for the use of the experimental server.
#release_server_appid=1042420
# DayZ release client SteamID. This is for mods, as only the release client has them.
release_client_appid=221100

View file

@ -21,10 +21,13 @@ RUN apt-get update && apt-get -y upgrade && apt-get -y install --no-install-reco
locales \
nano \
patch \
python3 \
procps \
wget \
xmlstarlet
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.9 1
# Set the locale
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
ENV LANG en_US.UTF-8

View file

@ -231,7 +231,7 @@ mergexml(){
# These are merged directly into the upstream file, but are C
for var in "INIT"
do
if [ -f "${WORKSHOP_DIR}/${ID}/${var,,}.c" ]
if [ -f "${WORKSHOP_DIR}/${ID}/${var,,}.c.${MAP}" ]
then
if [[ ${FOUND} = 0 ]]
then
@ -241,7 +241,7 @@ mergexml(){
FOUND=1
fi
echo "Patch '${WORKSHOP_DIR}/${ID}/${var,,}.c(.diff)' -> '${MPMISSIONS}/${MAP}/${var,,}.c'"
patch -s -p0 ${MPMISSIONS}/${MAP}/${var,,}.c < ${WORKSHOP_DIR}/${ID}/${var,,}.c || (
patch -s -p0 ${MPMISSIONS}/${MAP}/${var,,}.c.${MAP} < ${WORKSHOP_DIR}/${ID}/${var,,}.c || (
echo "Patch failed!"
exit 1
)

View file

@ -22,15 +22,11 @@ RUN apt-get update && apt-get -y upgrade && apt-get -y install --no-install-reco
locales \
nano \
procps \
python3-pip \
wget \
rename \
steamcmd \
xmlstarlet
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.9 1
RUN update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1
# Set the locale
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
ENV LANG en_US.UTF-8
@ -57,9 +53,6 @@ RUN curl https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
ENV NODE_PATH $NVM_DIR/versions/node/v$NODE_VERSION/lib/node_modules
ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH
# Add py3rcon
RUN cd /usr/local && git clone https://github.com/indepth666/py3rcon.git
# Setup a non-privileged user
ARG USER_ID

View file

@ -121,8 +121,6 @@ add(){
# Get the name of the newly added mod
MODNAME=$(get_mod_name ${1})
symlink 1 ${1} "${MODNAME}"
# Lower case all the files in mod directories.
find "${WORKSHOP_DIR}/${1}" -depth -exec rename -f 's/(.*)\/([^\/]*)/$1\/\L$2/' {} \;
echo -e "Mod id ${1} - ${green}${MODNAME}${default} - added"
xml ${ID}
}
@ -134,11 +132,15 @@ remove(){
MODNAME=$(get_mod_name ${1})
echo "Removing directory ${WORKSHOP_DIR}/${1}"
rm -rf "${WORKSHOP_DIR}/${1}"
else
echo "Directory ${WORKSHOP_DIR}/${1} doesn't exist?"
fi
if [ -L "${SERVER_FILES}/@${MODNAME}" ]
then
echo "Removing symlink ${SERVER_FILES}/@${MODNAME}"
rm -f "${SERVER_FILES}/@${MODNAME}"
else
echo "Symlink ${SERVER_FILES}/@${MODNAME} doesn't exist?"
fi
echo -e "Mod id ${1} - ${red}${MODNAME}${default} - removed"
}
@ -245,8 +247,6 @@ modupdate(){
get_mods
${STEAMCMD} +force_install_dir ${SERVER_FILES} +login "${steamlogin}" ${workshoplist} +quit
# Updated files come in with mixed cases. Fix that.
echo -ne "\nFixing file names..."
find "${WORKSHOP_DIR}" -depth -exec rename -f 's/(.*)\/([^\/]*)/$1\/\L$2/' {} \;
echo "done"
echo
}