git repos / blockattack-game

commit c6306f93

branches: v2.1.X

sago007 · 2017-10-28 11:52
c6306f9326bf4306fa31b23cd27db571542f7cd4 patch · browse files
parent 32da6f0c2b142a2916e405941842c07fc029310d

Now builds with Ubuntu12.04.

Changed files

A source/misc/docker/Dockerfile.Ubuntu12.04build_Standalone
M source/misc/standalone/build_standalone.sh before
M source/misc/standalone/compile_requirements.sh before
A source/misc/standalone/install_requirements.sh
diff --git a/source/misc/docker/Dockerfile.Ubuntu12.04build_Standalone b/source/misc/docker/Dockerfile.Ubuntu12.04build_Standalone new file mode 100644 index 0000000..638d728 --- /dev/null +++ b/source/misc/docker/Dockerfile.Ubuntu12.04build_Standalone
@@ -0,0 +1,25 @@
+FROM ubuntu:12.04
+
+RUN apt-get update && apt-get install -y build-essential cmake pkg-config libfreetype6-dev libvorbis-dev libgl1-mesa-dev libpulse-dev libpng12-dev zip gettext
+
+RUN apt-get update && apt-get install -y python-software-properties && \
+add-apt-repository ppa:ubuntu-toolchain-r/test && \
+apt-get update && \
+apt-get install -y gcc-4.8 g++-4.8 && \
+update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50 && \
+update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50
+
+COPY source/misc/standalone/compile_requirements.sh /
+RUN /compile_requirements.sh
+
+
+
+COPY . /staging/blockattack-game
+
+ENV BLOCKATTACK_VERSION 2.1.2
+
+RUN cd /staging/blockattack-game && \
+./packdata.sh && \
+cp source/misc/travis_help/utf8_v2_3_4/source/utf8.h source/code/ && \
+cp -r source/misc/travis_help/utf8_v2_3_4/source/utf8 source/code/ && \
+cmake -D Boost_USE_STATIC_LIBS=ON -D INSTALL_DATA_DIR=. -D CMAKE_INSTALL_PREFIX=. -D STANDALONE=1 . && make
diff --git a/source/misc/standalone/build_standalone.sh b/source/misc/standalone/build_standalone.sh index 0f23e47..d5b8d18 100755 --- a/source/misc/standalone/build_standalone.sh +++ b/source/misc/standalone/build_standalone.sh
@@ -18,7 +18,7 @@ chmod +x staging/$ARCHIVENAME/blockattack
cd ../../..
-docker build -f source/misc/docker/Dockerfile.Ubuntu14.04build_Standalone . -t blockattack_test
+docker build -f source/misc/docker/Dockerfile.Ubuntu12.04build_Standalone . -t blockattack_test
echo Copying to: $(pwd)/source/misc/standalone/staging/$ARCHIVENAME
@@ -39,7 +39,34 @@ cp /staging/blockattack-game/man/blockattack.man /output/docs/ && \
cp /staging/blockattack-game/README.md /output/docs/README_ORG.md && \
chown -R 1000 /output"
-docker build -f source/misc/docker/Dockerfile.Ubuntu14.04build_Standalone32 . -t blockattack_test
+scp source/misc/standalone/compile_requirements.sh blockattack_build:/
+scp source/misc/standalone/install_requirements.sh blockattack_build:/
+ssh blockattack_build /install_requirements.sh
+ssh blockattack_build /compile_requirements.sh
+ssh blockattack_build rm -rf /staging/blockattack-game
+scp -r . blockattack_build:/staging/blockattack-game
+ssh blockattack_build rm -f /staging/blockattack-game/CMakeCache.txt
+
+ssh blockattack_build "BLOCKATTACK_VERSION=2.1.2 && cd /staging/blockattack-game && \
+./packdata.sh && \
+cp source/misc/travis_help/utf8_v2_3_4/source/utf8.h source/code/ && \
+cp -r source/misc/travis_help/utf8_v2_3_4/source/utf8 source/code/ && \
+cmake -D Boost_USE_STATIC_LIBS=ON -D INSTALL_DATA_DIR=. -D CMAKE_INSTALL_PREFIX=. -D STANDALONE=1 . && make clean && make"
+
+OUTPUT=$(pwd)/source/misc/standalone/staging/$ARCHIVENAME/
+
+scp blockattack_build:/staging/blockattack-game/Game/blockattack $OUTPUT/x86/ && \
+scp blockattack_build:/usr/local/lib/libSDL2-2.0.so.0 $OUTPUT/x86/ && \
+scp blockattack_build:/usr/local/lib/libphysfs.so.1 $OUTPUT/x86/ && \
+scp blockattack_build:/usr/local/lib/libSDL2_mixer-2.0.so.0 $OUTPUT/x86/ && \
+scp blockattack_build:/usr/local/lib/libSDL2_ttf-2.0.so.0 $OUTPUT/x86/ && \
+scp blockattack_build:/usr/lib/i386-linux-gnu/libfreetype.so.6 $OUTPUT/x86/ && \
+scp blockattack_build:/lib/i386-linux-gnu/libpng12.so.0 $OUTPUT/x86/ && \
+scp blockattack_build:/usr/local/lib/libSDL2_image-2.0.so.0 $OUTPUT/x86/
+
+exit 0
+
+docker build -f source/misc/docker/Dockerfile.Ubuntu12.04build_Standalone32 . -t blockattack_test
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/ && \
cp /usr/local/lib/libSDL2-2.0.so.0 /output/x86/ && \
diff --git a/source/misc/standalone/compile_requirements.sh b/source/misc/standalone/compile_requirements.sh index 8267a62..53e8c62 100755 --- a/source/misc/standalone/compile_requirements.sh +++ b/source/misc/standalone/compile_requirements.sh
@@ -20,3 +20,14 @@ mkdir -p /staging/blockattack-game
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
cd /staging/deps/physfs-2.0.3 && cmake . && make && make install
+
+# boost
+cd ~
+mkdir -p Downloads
+cd Downloads
+curl https://files.poulsander.com/~poul19/public_files/boost_1_65_1.tar.bz2 -O
+tar xvfj boost_1_65_1.tar.bz2
+pushd boost_1_65_1
+./bootstrap.sh --with-libraries=program_options
+./b2 install -j 2 --prefix=/usr link=static
+popd
diff --git a/source/misc/standalone/install_requirements.sh b/source/misc/standalone/install_requirements.sh new file mode 100755 index 0000000..2e26c8a --- /dev/null +++ b/source/misc/standalone/install_requirements.sh
@@ -0,0 +1,10 @@
+#! /bin/bash
+set -e
+apt-get update && apt-get install -y build-essential cmake pkg-config libfreetype6-dev libvorbis-dev libgl1-mesa-dev libpulse-dev libpng12-dev zip gettext
+
+apt-get update && apt-get install -y python-software-properties
+add-apt-repository ppa:ubuntu-toolchain-r/test
+apt-get update
+apt-get install -y gcc-4.8 g++-4.8
+update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50
+update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50