c6edc9f3fe
allows also adding hlsdk libs to the image makes it easier to build, manage, and run
49 lines
1.4 KiB
Docker
49 lines
1.4 KiB
Docker
FROM ubuntu:24.04
|
|
|
|
# This cannot reference external dirs, unfortunately
|
|
ARG HALFLIFE_STEAM_FILES=./Half-Life
|
|
|
|
# Copy HL data files
|
|
RUN mkdir -p /opt/hl && chown ubuntu:ubuntu /opt/hl
|
|
COPY --chown=ubuntu:ubuntu ${HALFLIFE_STEAM_FILES}/valve /opt/hl/valve
|
|
COPY --chown=ubuntu:ubuntu ${HALFLIFE_STEAM_FILES}/valve_hd /opt/hl/valve_hd
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
# Install generic build dependencies
|
|
RUN apt-get update && apt-get install --no-install-recommends --no-install-suggests -y \
|
|
\
|
|
# Build essential utilities
|
|
ca-certificates \
|
|
wget \
|
|
build-essential \
|
|
pkg-config \
|
|
python3 \
|
|
git
|
|
|
|
# Build FWGS hlsdk game libs
|
|
ARG FWGS_HLSDK_REF=ae84bfc0c3598fcff605a7b3bb963abe8ec3e295
|
|
RUN mkdir -p /build && chown ubuntu:ubuntu /build
|
|
USER ubuntu
|
|
RUN cd /build && \
|
|
git version && \
|
|
# git > 2.49: git clone --depth 1 --revision ${FWGS_HLSDK_REF} https://github.com/FWGS/hlsdk-portable && \
|
|
mkdir -p hlsdk-portable && \
|
|
cd hlsdk-portable && \
|
|
git init && \
|
|
git remote add origin https://github.com/FWGS/hlsdk-portable && \
|
|
git fetch --depth 1 origin ${FWGS_HLSDK_REF} && \
|
|
git checkout FETCH_HEAD && \
|
|
./waf \
|
|
configure -8 -T release \
|
|
build \
|
|
install --destdir=/opt/hl
|
|
|
|
# Cleanup build files
|
|
RUN rm -rf /build/hlsdk-portable
|
|
|
|
# At this point there's:
|
|
# /opt/hl with
|
|
# ./valve
|
|
# {dlls, cl_dlls} with fwgs/hlsdk libs
|