-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #987 from splewis/sm_1.11
Compile with SM 1.11
- Loading branch information
Showing
22 changed files
with
303 additions
and
252 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,21 @@ | ||
FROM debian:11 | ||
MAINTAINER Alexander Volz (Alexander@volzit.de) | ||
FROM debian:11-slim | ||
ENV SMVERSION 1.11 | ||
|
||
ENV SMVERSION 1.10 | ||
RUN apt-get update -y \ | ||
&& apt-get install -y wget git lib32stdc++6 \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
||
ENV _clean="rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*" | ||
ENV _apt_clean="eval apt-get clean && $_clean" | ||
|
||
# Install support pkgs | ||
RUN apt-get update -qqy && DEBIAN_FRONTEND=noninteractive apt-get install -y \ | ||
curl wget nano net-tools gnupg2 git lib32stdc++6 python \ | ||
tar bash && $_apt_clean | ||
# Install pip2 | ||
RUN wget https://bootstrap.pypa.io/pip/2.7/get-pip.py && python2 get-pip.py | ||
|
||
RUN mkdir /get5 | ||
RUN mkdir /runscripts | ||
RUN mkdir /get5src | ||
RUN mkdir /runscripts /get5 /get5_src /get5_build | ||
COPY dockerrunscript.sh /runscripts | ||
WORKDIR /get5 | ||
|
||
RUN git clone https://github.com/splewis/sm-builder | ||
WORKDIR /get5/sm-builder | ||
RUN pip install --user -r requirements.txt | ||
RUN python setup.py install --prefix=~/.local | ||
WORKDIR /get5 | ||
|
||
ENV SMPACKAGE http://sourcemod.net/latest.php?os=linux&version=${SMVERSION} | ||
RUN wget -q ${SMPACKAGE} | ||
RUN tar xfz $(basename ${SMPACKAGE}) | ||
RUN wget ${SMPACKAGE} -O - | tar -xz | ||
RUN chmod +x /get5/addons/sourcemod/scripting/spcomp | ||
ENV PATH "$PATH:/get5/addons/sourcemod/scripting:/root/.local/bin" | ||
ENV PATH "$PATH:/get5/addons/sourcemod/scripting" | ||
WORKDIR /get5/addons/sourcemod/scripting/include | ||
RUN wget https://raw.githubusercontent.com/PhlexPlexico/SteamWorks/master/Pawn/includes/SteamWorks.inc | ||
RUN wget https://raw.githubusercontent.com/hexa-core-eu/SteamWorks/main/Pawn/includes/SteamWorks.inc | ||
WORKDIR /get5 | ||
|
||
VOLUME /get5/builds | ||
VOLUME /get5src | ||
CMD ["/runscripts/dockerrunscript.sh"] | ||
ENTRYPOINT ["/runscripts/dockerrunscript.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,41 @@ | ||
#!/bin/bash | ||
cd /get5src && git submodule update --init | ||
cp -rf /get5src/* /get5/ | ||
cd /get5 | ||
cp -r ./dependencies/sm-json/addons/sourcemod/scripting/include/* ./addons/sourcemod/scripting/include | ||
smbuilder --flags='-E' | ||
set -e | ||
|
||
WORKING_ROOT=/get5 | ||
SM_INCLUDE_PATH=$WORKING_ROOT/addons/sourcemod/scripting/include | ||
|
||
SRC_ROOT=/get5_src | ||
SM_JSON_ROOT=$SRC_ROOT/dependencies/sm-json | ||
|
||
BUILD_ROOT=/get5_build | ||
GET5_OUTPUT_ROOT=$BUILD_ROOT/get5 | ||
PLUGINS_OUTPUT_ROOT=$BUILD_ROOT/plugins | ||
SM_OUTPUT_ROOT=$GET5_OUTPUT_ROOT/addons/sourcemod | ||
SM_OUTPUT_PLUGINS=$SM_OUTPUT_ROOT/plugins | ||
|
||
if [ ! -d "$SM_JSON_ROOT" ]; then | ||
echo "Error: sm-json dependency not found; please run 'git submodule update --init' from the repository root." | ||
exit 1; | ||
fi | ||
|
||
echo "Copying source files from host..." | ||
# Copy the mounted source files into the /get5 working directory, overwriting any files | ||
cp -rf $SRC_ROOT/scripting $WORKING_ROOT/scripting | ||
# Move the sm-json includes into the SM include directory | ||
echo "Copying sm-json includes..." | ||
cp -rf $SM_JSON_ROOT/addons/sourcemod/scripting/include/* $SM_INCLUDE_PATH | ||
mkdir -p $SM_OUTPUT_PLUGINS | ||
for file in "$@" | ||
do | ||
echo "Compiling '$file'.sp..."; | ||
spcomp -v0 -i $SM_INCLUDE_PATH -E -o $SM_OUTPUT_PLUGINS/$file.smx $WORKING_ROOT/scripting/$file.sp | ||
done | ||
echo "Copying source files and translations..." | ||
# Copy translations, configs and cfg to their correct destination | ||
cp -rf $SRC_ROOT/translations $SM_OUTPUT_ROOT | ||
cp -rf $SRC_ROOT/configs $SM_OUTPUT_ROOT | ||
cp -rf $SRC_ROOT/cfg $SRC_ROOT/LICENSE $SRC_ROOT/README.md $GET5_OUTPUT_ROOT | ||
# Copy the compiled .smx files to /plugins of the build output as well: | ||
mkdir -p $PLUGINS_OUTPUT_ROOT | ||
cp -f $SM_OUTPUT_PLUGINS/*.smx $PLUGINS_OUTPUT_ROOT | ||
echo "Build completed." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.