summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main
diff options
context:
space:
mode:
authortkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:30:59 +0000
committertkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:30:59 +0000
commit9b34e45d009cdb4416b8864acbbc2c62864e8346 (patch)
treeb7609325b6937d6613f9de2f355e0ae7b78a4b3c /pdf-over-gui/src/main
parent06ff7c7b5e0657c8ce12d8cca73a4483550b8c45 (diff)
downloadmocca-9b34e45d009cdb4416b8864acbbc2c62864e8346.tar.gz
mocca-9b34e45d009cdb4416b8864acbbc2c62864e8346.tar.bz2
mocca-9b34e45d009cdb4416b8864acbbc2c62864e8346.zip
Move contents on mac to app
Unfortunately, the uninstaller condition doesn't seem to work, so the uninstaller dir is left over git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@360 174cde9d-5d70-4d2a-aa98-46368bc2aaf7
Diffstat (limited to 'pdf-over-gui/src/main')
-rw-r--r--pdf-over-gui/src/main/resources/izpack/install.xml2
-rw-r--r--pdf-over-gui/src/main/resources/scripts/postinstall_mac.sh18
2 files changed, 14 insertions, 6 deletions
diff --git a/pdf-over-gui/src/main/resources/izpack/install.xml b/pdf-over-gui/src/main/resources/izpack/install.xml
index ec27f294..19199100 100644
--- a/pdf-over-gui/src/main/resources/izpack/install.xml
+++ b/pdf-over-gui/src/main/resources/izpack/install.xml
@@ -10,7 +10,7 @@
<authors>
<author name="A-SIT (Secure Information Technology Center - Austria)" email="" />
</authors>
- <uninstaller />
+ <uninstaller condition="!izpack.macinstall" />
<url>http://www.a-sit.at/</url>
<pack200 />
<!--run-privileged condition="izpack.windowsinstall.vista|izpack.windowsinstall.7" /-->
diff --git a/pdf-over-gui/src/main/resources/scripts/postinstall_mac.sh b/pdf-over-gui/src/main/resources/scripts/postinstall_mac.sh
index 5597e888..404e92ce 100644
--- a/pdf-over-gui/src/main/resources/scripts/postinstall_mac.sh
+++ b/pdf-over-gui/src/main/resources/scripts/postinstall_mac.sh
@@ -1,8 +1,16 @@
#!/bin/sh
-BASEDIR=$(cd "$(dirname "$0")"; pwd)
+SCRIPTDIR=$(cd "$(dirname "$0")"; pwd)
+BASEDIR=$(cd "$(dirname "$0")/.."; pwd)
export LC_CTYPE="UTF-8"
-cd "$BASEDIR"
+cd "$SCRIPTDIR"
chmod a+x pdf-over_mac.sh
-cd ..
-osacompile -e "do shell script \"$BASEDIR/pdf-over_mac.sh\"" -x -o PDF-Over.app
-cp -f icons/icon.icns PDF-Over.app/Contents/Resources/applet.icns
+cd "$BASEDIR"
+if [ -d "$BASEDIR.app" ]; then
+ osacompile -e "do shell script \"$SCRIPTDIR/pdf-over_mac.sh\"" -x -o PDF-Over.app
+ cp -f icons/icon.icns PDF-Over.app/Contents/Resources/applet.icns
+else
+ osacompile -e "do shell script \"$BASEDIR.app/Contents/scripts/pdf-over_mac.sh\"" -x -o "$BASEDIR.app"
+ cp -f icons/icon.icns "$BASEDIR.app"/Contents/Resources/applet.icns
+ mv "$BASEDIR"/* "$BASEDIR.app"/Contents/
+ rmdir "$BASEDIR"
+fi