xca/mac-package.sh
Geoff Beier 909b6c309c [PATCH] mac build fixes and minor usability improvements
This patchset adds:
- configure.mac now looks for qmake, backs up xcode project, uses xca.pro to generate a new one, generates a different local.h
- mac-package.sh generates a standalone .app bundle for distribution using deployqt from trolltech labs, packages up manual, COPYRIGHT, etc into a .dmg
- mac packaging niceties in the qmake project
- mac icon file
- usability fixes for OS X:
	- look for user configured oids and such in ~/Library/Preferences/xca if it exists
	- look for original ones in app bundle/Contents/Resources (it tried to do this before...)
	- more robust code for getting bundle location (less likely to be broken by Apple in OS revisions)
	- start browsing for files in ~/Documents
	- fix wildcards on mac so files without extensions will be opened
	- fix save behavior for .xdb files so that it's hard to get one that doesn't end in .xdb, as this causes difficulty w/Qt

Notes:
	- one of the compilation fixes was in the new revocation data function that replaced the old macros... I didn't have time to verify that my fix doesn't break when used with 0.9.8.
	- QStringToAsn1() is clearly incorrect but I haven't yet determined what callers expect, so I just called it out in a comment and did not yet fix it
	- I added some code that I haven't tested on Windows because I thought it might be a nice function to have there too. I have not added anything to call that function, however, since I don't currently have a machine I can test on :). The code is clearly marked in comments.
2008-01-06 13:48:39 +01:00

57 lines
1.7 KiB
Bash

#!/bin/sh
VERSION=$(cat VERSION)
echo "Creating distribution disk image for xca $VERSION"
QTDEPLOY=misc/deployqt
if [ -x "`which deployqt`" ]
then
QTDEPLOY=`which deployqt`
fi
if [ -x "$QTDEPLOY" ]
then
echo "$QTDEPLOY will be used for packaging qt into release builds of the application bundle"
else
echo "No copy of qtdeploy could be found. qtdeploy is highly recommended for building release versions of xca intended for redistribution."
echo "The command"
echo "curl http://e42.us/binaries/deployqt.bz2 |bzcat - >misc/deployqt && chmod +x misc/deployqt"
echo "will fetch a pre-built copy. Otherwise, download and build from here: "
echo "http://labs.trolltech.com/blogs/2007/08/23/deploying-mac-applications-without-the-hassle/"
fi
if [ ! -d "build/Release/xca.app" ]
then
echo "No release build was found. This script only makes sense for packaging release builds."
exit
fi
DMGSTAGELOC=dmgstage/xca
rm -rf $DMGSTAGELOC
mkdir -p $DMGSTAGELOC
if ! cp -r build/Release/xca.app $DMGSTAGELOC
then
echo "Could not copy the release build into directory dmgstage."
exit
fi
if [ -x "$QTDEPLOY" ]
echo "Warning: this release package will require users to have installed Qt on their systems."
then $QTDEPLOY $DMGSTAGELOC/xca.app
fi
cp COPYRIGHT dmgstage
if [ -e "doc/xca.html" ]
then
mkdir $DMGSTAGELOC/manual
# copy the manual onto the disk image so that users can read it without launching the app
cp doc/xc*.html $DMGSTAGELOC/manual
# also copy the manual into the bundle so that help works
cp doc/xc*.html $DMGSTAGELOC/xca.app/Contents/Resources
else
echo "Warning: No manual will be included on the disk image and help will be unavailable."
fi
hdiutil create -srcfolder $DMGSTAGELOC xca-$VERSION.dmg