2017-02-25 04:30:55 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
VERSION=$1
|
|
|
|
|
|
|
|
if [ -z "$VERSION" ]; then
|
|
|
|
echo "usage: ./archive-macos.sh <version>"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
2017-03-16 04:16:52 +00:00
|
|
|
rm -rf bin/
|
2017-02-25 04:30:55 +00:00
|
|
|
|
2017-03-16 04:16:52 +00:00
|
|
|
make clean
|
2017-02-25 04:30:55 +00:00
|
|
|
cmake -DCMAKE_BUILD_TYPE=Release -DLINK_STATICALLY=true .
|
|
|
|
make -j4
|
|
|
|
|
|
|
|
DIRNAME="musikbox_macos_$VERSION"
|
|
|
|
OUTPATH="bin/dist/$DIRNAME"
|
|
|
|
|
|
|
|
rm -rf "$OUTPATH"
|
|
|
|
|
|
|
|
mkdir -p "$OUTPATH/plugins"
|
2017-03-16 04:10:28 +00:00
|
|
|
mkdir -p "$OUTPATH/locales"
|
|
|
|
mkdir -p "$OUTPATH/themes"
|
2017-02-25 04:30:55 +00:00
|
|
|
cp bin/musikbox "$OUTPATH"
|
|
|
|
cp bin/plugins/*.dylib "$OUTPATH/plugins"
|
2017-03-16 04:10:28 +00:00
|
|
|
cp bin/locales/*.json "$OUTPATH/locales"
|
|
|
|
cp bin/themes/*.json "$OUTPATH/themes"
|
2017-02-25 04:30:55 +00:00
|
|
|
|
2017-03-16 04:16:52 +00:00
|
|
|
strip bin/musikbox
|
|
|
|
strip bin/plugins/*.dylib
|
|
|
|
|
2017-02-25 04:30:55 +00:00
|
|
|
pushd bin/dist
|
2017-03-27 03:53:05 +00:00
|
|
|
tar cvf musikbox_macos_$VERSION.tar $DIRNAME
|
|
|
|
bzip2 musikbox_macos_$VERSION.tar
|
2017-02-25 04:30:55 +00:00
|
|
|
popd
|