1
0
skybolt-linux-docker/Dockerfile

72 lines
2.2 KiB
Docker

FROM debian:bullseye
## Dependencies
RUN apt update -y
RUN apt install -y git cmake make gcc g++ libboost-dev libgl-dev
RUN apt install -y libboost-date-time-dev libboost-thread-dev libboost-log-dev libboost-filesystem-dev libboost-program-options-dev libboost-regex-dev
RUN apt install -y libopenscenegraph-dev
RUN apt install -y qtbase5-dev
RUN apt install -y wget unzip
RUN apt install -y vim xterm mesa-utils # for debugging only
RUN apt install -y libgl1-mesa-glx # for intel gpu hardware acceleration
## OIS
WORKDIR /usr/src
RUN git clone https://github.com/wgois/OIS
WORKDIR /usr/src/OIS/build
RUN cmake ..
RUN make -j5
RUN make install
## CIGI CCL
WORKDIR /usr/src
RUN wget 'https://udomain.dl.sourceforge.net/project/cigi/CIGI%20Class%20Library%20%28CCL%29/CCL%20Version%204.0.6a/ccl_4_0%20rev6a.zip'
RUN unzip 'ccl_4_0 rev6a.zip' && cd 'ccl_4_0 rev6a' && sh ./configure && make -j5 && make install
## SkyboltDependenciesHeaderOnly
WORKDIR /usr/src
RUN git clone https://github.com/Piraxus/SkyboltDependenciesHeaderOnly
ENV SKYBOLT_DEPS=/usr/src/SkyboltDependenciesHeaderOnly
## Skybolt + patches
RUN echo patches against Skybolt master c662c1efbe62dbc20350dccddf20f43e072543a2
WORKDIR /usr/src
RUN git clone --depth=1 https://github.com/Piraxus/Skybolt.git
WORKDIR /usr/src/Skybolt/build
COPY patches/skybolt/*.patch ./
RUN \
git config --global user.email "you@example.com" && \
git config --global user.name "Your Name"
RUN git am --ignore-whitespace *.patch
RUN json_DIR=${SKYBOLT_DEPS}/json \
catch_DIR=${SKYBOLT_DEPS}/catch \
glm_DIR=${SKYBOLT_DEPS}/glm \
cxxtimer_DIR=${SKYBOLT_DEPS}/cxxtimer \
earcut_DIR=${SKYBOLT_DEPS}/earcut \
httplib_DIR=${SKYBOLT_DEPS}/httplib \
px_sched_DIR=${SKYBOLT_DEPS}/px_sched \
OGRE_DEPENDENCIES_DIR="/usr/local" \
cmake .. \
-D CMAKE_CXX_COMPILER=g++ \
-D CMAKE_CXX_FLAGS="-DBOOST_LOG_DYN_LINK -Wno-register" \
-D CMAKE_POSITION_INDEPENDENT_CODE=ON
# -D BUILD_CIGI_COMPONENT_PLUGIN=ON
RUN (cd src/Skybolt/SkyboltVisTests && ln -s ../../../.. Source)
RUN make -j5
## Asset packages
WORKDIR /usr/src/Skybolt/Assets
COPY Core_1_0_0.zip EarthMed_1_0_0.zip Seattle_1_0_0.zip ./
RUN unzip Core_1_0_0.zip && unzip EarthMed_1_0_0.zip && unzip Seattle_1_0_0.zip
WORKDIR /usr/src/Skybolt