Skip to content

Commit

Permalink
Mac OS X package
Browse files Browse the repository at this point in the history
  • Loading branch information
grakic committed Sep 25, 2014
1 parent 996dda9 commit a040c40
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 0 deletions.
30 changes: 30 additions & 0 deletions eidviewer/packages/dmg/build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="eidviewer" default="default" basedir=".">

<property environment="env" />

<taskdef name="bundleapp"
classname="com.oracle.appbundler.AppBundlerTask"
classpath="lib/appbundler-1.0.jar" />

<target name="appbundle">
<bundleapp outputdirectory="../../target"
name="JFreesteel eID Viewer"
displayname="JFreesteel eID Viewer"
icon="eidviewer.icns"
identifier="net.devbase.jfreesteel.viewer"
shortversion="1.0"
applicationCategory="public.app-category.utilities"
mainclassname="net.devbase.jfreesteel.viewer.EidViewer">

<classpath file="../../target/eidviewer-1.0.jar"/>
<!--
<runtime dir="${env.JAVA_HOME}" />
<classpath dir="../../target">
<include name="dependency/**"/>
</classpath>
<option value="-Xdock:icon=Contents/Resources/eidviewer.icns"/>
-->
</bundleapp>
</target>
</project>
Binary file added eidviewer/packages/dmg/dmg_background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions eidviewer/packages/dmg/dmg_template/Applications
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Replace with appbundle
Binary file added eidviewer/packages/dmg/eidviewer.icns
Binary file not shown.
Binary file added eidviewer/packages/dmg/lib/appbundler-1.0.jar
Binary file not shown.
23 changes: 23 additions & 0 deletions eidviewer/packages/makedmg
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

cd dmg
APP="../../target/JFreesteel eID Viewer.app"

# FIXME: sign with Apple Developer ID
ALIAS="Open Source Developer, Goran Rakic"

# build app
ant appbundle
cp -r ../../target/dependency "$APP/Contents/Java/"

# sign app: content and launcher
find "$APP" -type f \( -name '*.dylib' -or -name '*.jar' \) -exec codesign -d -vv --timestamp -f -s "$ALIAS" {} \;
codesign -d -vv --timestamp -f -s "$ALIAS" "$APP"

# FIXME: automate?
echo "use iDMG and create read-write dmg file from dmg_template, with 'JFreesteel eID Viewer' label"
echo "mount it to add background, hide toolbar, resize window and adjust icon locations"

# build dmg
hdiutil convert -format UDZO -o ../../target/jfreesteel-eidviewer-1.0.dmg dmg_template.dmg

0 comments on commit a040c40

Please sign in to comment.