diff --git a/source/misc/docker/Dockerfile.Ubuntu14.04build b/source/misc/docker/Dockerfile.Ubuntu14.04build index 7cdcdf3..a1172b0 100644 --- a/source/misc/docker/Dockerfile.Ubuntu14.04build +++ b/source/misc/docker/Dockerfile.Ubuntu14.04build @@ -1,6 +1,6 @@ FROM ubuntu:14.04 -RUN apt-get update && apt-get install -y build-essential libphysfs-dev libboost-dev cmake libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev libboost-program-options-dev libutfcpp-dev zip gettext +RUN apt-get update && apt install -yy build-essential libphysfs-dev libboost-dev cmake libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev libboost-program-options-dev libutfcpp-dev zip gettext RUN mkdir -p /staging/blockattack-game diff --git a/source/misc/docker/Dockerfile.Ubuntu14.04build_Standalone b/source/misc/docker/Dockerfile.Ubuntu14.04build_Standalone index 2c0f2f5..77f0097 100644 --- a/source/misc/docker/Dockerfile.Ubuntu14.04build_Standalone +++ b/source/misc/docker/Dockerfile.Ubuntu14.04build_Standalone @@ -1,6 +1,6 @@ FROM ubuntu:14.04 -RUN apt-get update && apt-get install -y build-essential libphysfs-dev libboost-dev cmake pkg-config libboost-program-options-dev libfreetype6-dev libvorbis-dev libgl1-mesa-dev libutfcpp-dev zip gettext +RUN apt-get update && apt-get install -y build-essential libboost-dev cmake pkg-config libboost-program-options-dev libfreetype6-dev libvorbis-dev libgl1-mesa-dev libutfcpp-dev zip gettext RUN mkdir -p /staging/deps && cd /staging/deps && curl https://libsdl.org/release/SDL2-2.0.5.tar.gz | tar -zx && cd SDL2-2.0.5 && ls -lrt RUN cd /staging/deps/SDL2-2.0.5 && ./configure --enable-shared --enable-static && make && make install @@ -18,6 +18,9 @@ RUN mkdir -p /staging/deps && cd /staging/deps && curl https://www.libsdl.org/pr RUN cd /staging/deps/SDL2_ttf-2.0.14 && ./configure --enable-shared --enable-static && make && make install RUN mkdir -p /staging/blockattack-game +RUN mkdir -p /staging/deps && cd /staging/deps && curl http://icculus.org/physfs/downloads/physfs-2.0.3.tar.bz2 | tar -jx && cd physfs-2.0.3 && ls -lrt +RUN cd /staging/deps/physfs-2.0.3 && cmake . && make && make install + COPY . /staging/blockattack-game ENV BLOCKATTACK_VERSION 2.1.0-SNAPSHOT diff --git a/source/misc/standalone/README.txt b/source/misc/standalone/README.txt new file mode 100644 index 0000000..1c7c03d --- /dev/null +++ b/source/misc/standalone/README.txt @@ -0,0 +1,7 @@ +Block Attack - Rise of the Blocks - Linux build + +This is the standalone version. It is precompiled and includes the neccecary libraries to run. + +Both a 32 bit and 64 bit version is provided. + +Check www.blockattack.net for more info. diff --git a/source/misc/standalone/build_standalone.sh b/source/misc/standalone/build_standalone.sh index c2a9013..981c404 100755 --- a/source/misc/standalone/build_standalone.sh +++ b/source/misc/standalone/build_standalone.sh @@ -1,23 +1,39 @@ #! /bin/bash set -e +if [ "$#" -ne 1 ]; then + echo "Must be called with $0 " + exit 1 +fi + +ARCHIVENAME=$1 + rm -rf staging -mkdir -p staging/x86_64 -cp blockattack_standalone_launcher staging/blockattack -chmod +x staging/blockattack +mkdir -p staging/$ARCHIVENAME/x86_64 +mkdir -p staging/$ARCHIVENAME/docs +cp blockattack_standalone_launcher staging/$ARCHIVENAME/blockattack +cp README.txt staging/$ARCHIVENAME/README +chmod +x staging/$ARCHIVENAME/blockattack cd ../../.. docker build -f source/misc/docker/Dockerfile.Ubuntu14.04build_Standalone . -t blockattack_test -echo Copying to: $(pwd)/source/misc/standalone/staging/ +echo Copying to: $(pwd)/source/misc/standalone/staging/$ARCHIVENAME -docker run -it --rm -v $(pwd)/source/misc/standalone/staging/:/output blockattack_test /bin/bash -c "cp /staging/blockattack-game/Game/blockattack /output/x86_64/ && \ -cp /staging/blockattack-game/Game/blockattack.data /output/ && \ +docker run -it --rm -v $(pwd)/source/misc/standalone/staging/$ARCHIVENAME/:/output blockattack_test /bin/bash -c "cp /staging/blockattack-game/Game/blockattack /output/x86_64/ && \ cp /usr/local/lib/libSDL2-2.0.so.0 /output/x86_64/ && \ -cp /usr/lib/x86_64-linux-gnu/libphysfs.so.1 /output/x86_64/ && \ +cp /usr/local/lib/libphysfs.so.1 /output/x86_64/ && \ cp /usr/local/lib/libSDL2_mixer-2.0.so.0 /output/x86_64/ && \ cp /usr/local/lib/libSDL2_ttf-2.0.so.0 /output/x86_64/ && \ cp /usr/lib/x86_64-linux-gnu/libfreetype.so.6 /output/x86_64/ && \ cp /lib/x86_64-linux-gnu/libpng12.so.0 /output/x86_64/ && \ cp /usr/local/lib/libSDL2_image-2.0.so.0 /output/x86_64/" + +docker run -it --rm -v $(pwd)/source/misc/standalone/staging/$ARCHIVENAME/:/output blockattack_test /bin/bash -c "cp -r /staging/blockattack-game/source/misc/translation/locale /output/ && \ +cp /staging/blockattack-game/Game/blockattack.data /output/ && \ +cp -r /staging/blockattack-game/source/misc/icons /output/ && \ +cp /staging/blockattack-game/COPYING /output/ && \ +cp /staging/blockattack-game/man/blockattack.man /output/docs/ && \ +cp /staging/blockattack-game/README.md /output/docs/README_ORG.md && \ +chown -R 1000 /output"