2008-10-16 13:15:12 +11:00
#!/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 }
2009-02-03 17:48:05 +11:00
seticon -d ./templates/icon.icns ${ appname }
2008-10-16 13:15:12 +11:00
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."