20 lines
886 B
Bash
20 lines
886 B
Bash
|
#!/bin/sh
|
||
|
if [ `uname -s` != "Darwin" ]; then echo "Mac .app bundle generation is only available under OSX."; exit 1; fi; osverfull=`sw_vers | head -2 | tail -1 | cut -f 2`
|
||
|
osver=`echo ${osverfull} | sed -e 's/.[0-9]*$//'`
|
||
|
appname=RatCatcher-${osver}.app
|
||
|
zipname=RatCatcher-${osver}.zip
|
||
|
|
||
|
if [ -d ${appname} ]; then rm -fr ${appname} ; fi
|
||
|
if [ -e ${zipname} ]; then rm -f ${zipname} ; fi
|
||
|
# create staging area without svn files
|
||
|
echo "Creating staging area without svn files..."
|
||
|
rsync -rC data/ staging/data
|
||
|
echo "Creating .app..."
|
||
|
platypus -a rc -t shell -o TextWindow -R -u "Rob Pearce" -f staging/data -f rc scripts/run.sh ${appname}
|
||
|
seticon -d icon.icns ${appname}
|
||
|
echo "Relocating dylib symbols..."
|
||
|
dylibbundler -od -b -x ./${appname}/Contents/Resources/rc -d ./${appname}/Contents/libs/ -p @executable_path/../libs/
|
||
|
echo "Archiving..."
|
||
|
zip -r ${zipname} ${appname}
|
||
|
echo "Done."
|