Add a script to make steam build of wesnoth using docker

This commit is contained in:
loonycyborg 2019-10-27 14:27:16 +03:00
parent df136fcc5b
commit f080886a83
3 changed files with 25 additions and 0 deletions

View file

@ -0,0 +1,5 @@
#!/bin/sh -xe
cd steamrt
docker build -t steamos-wesnoth .
docker run -it -v $(pwd)/../../..:/wesnoth -v $(pwd)/../steambuild:/output steamos-wesnoth

View file

@ -0,0 +1,15 @@
FROM steamrt_scout_amd64
ENV DEBIAN_FRONTEND=noninteractive
ARG BOOST_VERSION=1.66.0
ARG BOOST_VERSION_=1_66_0
RUN apt-get update && apt-get -y dist-upgrade && apt-get install -y scons libicu-dev libreadline-dev
RUN wget --max-redirect 3 https://dl.bintray.com/boostorg/release/${BOOST_VERSION}/source/boost_${BOOST_VERSION_}.tar.gz
RUN mkdir -p /src/boost && tar zxf boost_${BOOST_VERSION_}.tar.gz -C /src/boost --strip-components=1
RUN cd /src/boost && ./bootstrap.sh --with-libraries=iostreams,regex,system,filesystem,program_options,random,locale && ./b2 toolset=gcc-5 --layout=system link=static variant=release cxxflags='-fPIE -fstack-protector-strong' define=_FORTIFY_SOURCE=2 install
COPY start.sh /staging/start.sh
RUN cp /lib/libicu*.so.* /lib/x86_64-linux-gnu/libhistory.so.6 /staging/
ENTRYPOINT mkdir /build && cd /build && scons -j `nproc` ctool=gcc-5 cxxtool=g++-5 boostdir=/usr/local/include boostlibdir=/usr/local/lib extra_flags_config=-lrt -Y /wesnoth && cp /build/wesnoth /output/ && cp /staging/* /output/

View file

@ -0,0 +1,5 @@
#!/bin/bash
GAMEDIR=$(cd "${0%/*}" && echo $PWD)
cd "$GAMEDIR"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$GAMEDIR/lib64"
exec ./wesnoth "$@"