git repos / blockattack-game

blame: source/misc/standalone/build_standalone.sh

normal view · raw

195987de sago007 2017-09-02 12:26 1
#! /bin/bash
195987de sago007 2017-09-02 12:26 2
set -e
195987de sago007 2017-09-02 12:26 3
195987de sago007 2017-09-02 12:26 4
if [ "$#" -ne 1 ]; then
195987de sago007 2017-09-02 12:26 5
	echo "Must be called with $0 <archivename>"
195987de sago007 2017-09-02 12:26 6
	exit 1
195987de sago007 2017-09-02 12:26 7
fi
195987de sago007 2017-09-02 12:26 8
195987de sago007 2017-09-02 12:26 9
ARCHIVENAME=$1
195987de sago007 2017-09-02 12:26 10
195987de sago007 2017-09-02 12:26 11
rm -rf staging
195987de sago007 2017-09-02 12:26 12
mkdir -p staging/$ARCHIVENAME/x86_64
195987de sago007 2017-09-02 12:26 13
mkdir -p staging/$ARCHIVENAME/x86
195987de sago007 2017-09-02 12:26 14
mkdir -p staging/$ARCHIVENAME/docs
195987de sago007 2017-09-02 12:26 15
cp blockattack_standalone_launcher staging/$ARCHIVENAME/blockattack
195987de sago007 2017-09-02 12:26 16
cp README.txt staging/$ARCHIVENAME/README
195987de sago007 2017-09-02 12:26 17
chmod +x staging/$ARCHIVENAME/blockattack
195987de sago007 2017-09-02 12:26 18
195987de sago007 2017-09-02 12:26 19
cd ../../..
195987de sago007 2017-09-02 12:26 20
195987de sago007 2017-09-02 12:26 21
docker build -f source/misc/docker/Dockerfile.Ubuntu14.04build_Standalone . -t blockattack_test
195987de sago007 2017-09-02 12:26 22
195987de sago007 2017-09-02 12:26 23
echo Copying to: $(pwd)/source/misc/standalone/staging/$ARCHIVENAME
195987de sago007 2017-09-02 12:26 24
195987de sago007 2017-09-02 12:26 25
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/ && \
195987de sago007 2017-09-02 12:26 26
cp /usr/local/lib/libSDL2-2.0.so.0 /output/x86_64/ && \
195987de sago007 2017-09-02 12:26 27
cp /usr/local/lib/libphysfs.so.1  /output/x86_64/ && \
195987de sago007 2017-09-02 12:26 28
cp /usr/local/lib/libSDL2_mixer-2.0.so.0  /output/x86_64/ && \
195987de sago007 2017-09-02 12:26 29
cp /usr/local/lib/libSDL2_ttf-2.0.so.0  /output/x86_64/ && \
195987de sago007 2017-09-02 12:26 30
cp /usr/lib/x86_64-linux-gnu/libfreetype.so.6  /output/x86_64/ && \
195987de sago007 2017-09-02 12:26 31
cp /lib/x86_64-linux-gnu/libpng12.so.0  /output/x86_64/ && \
195987de sago007 2017-09-02 12:26 32
cp /usr/local/lib/libSDL2_image-2.0.so.0  /output/x86_64/"
195987de sago007 2017-09-02 12:26 33
195987de sago007 2017-09-02 12:26 34
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/ && \
195987de sago007 2017-09-02 12:26 35
cp /staging/blockattack-game/Game/blockattack.data /output/ && \
195987de sago007 2017-09-02 12:26 36
cp -r /staging/blockattack-game/source/misc/icons /output/ && \
195987de sago007 2017-09-02 12:26 37
cp /staging/blockattack-game/COPYING /output/ && \
195987de sago007 2017-09-02 12:26 38
cp /staging/blockattack-game/man/blockattack.man /output/docs/ && \
195987de sago007 2017-09-02 12:26 39
cp /staging/blockattack-game/README.md /output/docs/README_ORG.md && \
195987de sago007 2017-09-02 12:26 40
chown -R 1000 /output"
195987de sago007 2017-09-02 12:26 41
195987de sago007 2017-09-02 12:26 42
docker build -f source/misc/docker/Dockerfile.Ubuntu14.04build_Standalone32 . -t blockattack_test
195987de sago007 2017-09-02 12:26 43
195987de sago007 2017-09-02 12:26 44
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/ && \
195987de sago007 2017-09-02 12:26 45
cp /usr/local/lib/libSDL2-2.0.so.0 /output/x86/ && \
195987de sago007 2017-09-02 12:26 46
cp /usr/local/lib/libphysfs.so.1  /output/x86/ && \
195987de sago007 2017-09-02 12:26 47
cp /usr/local/lib/libSDL2_mixer-2.0.so.0  /output/x86/ && \
195987de sago007 2017-09-02 12:26 48
cp /usr/local/lib/libSDL2_ttf-2.0.so.0  /output/x86/ && \
195987de sago007 2017-09-02 12:26 49
cp /usr/lib/i386-linux-gnu/libfreetype.so.6 /output/x86/ && \
195987de sago007 2017-09-02 12:26 50
cp /lib/i386-linux-gnu/libpng12.so.0 /output/x86/ && \
195987de sago007 2017-09-02 12:26 51
cp /usr/local/lib/libSDL2_image-2.0.so.0  /output/x86/"
195987de sago007 2017-09-02 12:26 52
195987de sago007 2017-09-02 12:26 53
cd source/misc/standalone/staging/
195987de sago007 2017-09-02 12:26 54
tar -cvjSf "$ARCHIVENAME.tar.bz2" "$ARCHIVENAME"
1970-01-01 00:00 55