mirror of
https://github.com/rehlds/testdemos.git
synced 2024-12-25 06:05:49 +03:00
e5c562f603
* fix cstrike gamedll for rehlds test * rename test script * Dockerfile: copy chmod too & fix chmod for files * remove unused test.sh --------- Co-authored-by: s1lentq <s1lentsk@yandex.ru>
74 lines
2.0 KiB
Docker
74 lines
2.0 KiB
Docker
FROM debian:stable-slim AS download_hlds_windows
|
|
|
|
LABEL creator="Sergey Shorokhov <wopox1337@ya.ru>"
|
|
|
|
# Install required packages
|
|
RUN set -x \
|
|
&& apt-get update \
|
|
&& apt-get install -y --install-recommends \
|
|
curl \
|
|
libarchive-tools \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Download and install DepotDownloader
|
|
ARG DepotDownloader_URL="https://github.com/SteamRE/DepotDownloader/releases/download/DepotDownloader_2.7.2/DepotDownloader-linux-x64.zip"
|
|
RUN curl -sSL ${DepotDownloader_URL} | bsdtar -xvf - -C /usr/local/bin/ \
|
|
&& chmod +x /usr/local/bin/DepotDownloader
|
|
|
|
ENV APPDIR=/opt/hlds
|
|
WORKDIR ${APPDIR}
|
|
|
|
ARG APPID=90
|
|
ARG APPBRANCH=steam_legacy
|
|
ARG OS=windows
|
|
ARG MOD=cstrike
|
|
|
|
RUN DepotDownloader -os ${OS} -dir ${APPDIR} -app ${APPID} -beta ${APPBRANCH} -depot 1
|
|
RUN DepotDownloader -os ${OS} -dir ${APPDIR} -app ${APPID} -beta ${APPBRANCH} -depot 5
|
|
RUN DepotDownloader -os ${OS} -dir ${APPDIR} -app ${APPID} -beta ${APPBRANCH} -depot 11
|
|
RUN DepotDownloader -os ${OS} -dir ${APPDIR} -app ${APPID} -beta ${APPBRANCH} -depot 1004
|
|
|
|
SHELL ["/bin/bash", "-c"]
|
|
|
|
# Fix first run crash and STEAM Validation rejected issue
|
|
RUN cp ${APPDIR}/${MOD}/steam_appid.txt ${APPDIR} \
|
|
&& touch ${APPDIR}/${MOD}/{banned,listip}.cfg
|
|
|
|
# Remove unnecessary files
|
|
RUN rm -rf linux64 .DepotDownloader utils/ \
|
|
&& find . \
|
|
\( \
|
|
-name '*.so' -o \
|
|
-name '*64.dll' -o \
|
|
-name '*.dylib' \
|
|
\) -exec rm -rf {} \;
|
|
|
|
# Remove *.bsp
|
|
# RUN find . -name '*.bsp' \
|
|
# \( \
|
|
# -not -name 'rehlds_*' \
|
|
# -not -name 'regamedll_*' \
|
|
# -not -name 'de_dust2*' \
|
|
# -not -name 'crossfire*' \
|
|
# \) \
|
|
# -delete
|
|
|
|
|
|
FROM debian:stable-slim AS test_runner
|
|
|
|
RUN dpkg --add-architecture i386 \
|
|
&& apt-get update \
|
|
&& apt-get install -y \
|
|
wine32 \
|
|
rsync \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
ENV WINEDEBUG=-all
|
|
ENV WINEDLLOVERRIDES=mshtml=
|
|
|
|
COPY --from=download_hlds_windows /opt/hlds /opt/HLDS
|
|
|
|
WORKDIR /opt/HLDS
|
|
# Add test depend files
|
|
COPY --chmod=755 testdemos_files .
|