Merge lp:~roederhr/revager/dmgbuild into lp:revager

Proposed by Holger Röder
Status: Merged
Merged at revision: not available
Proposed branch: lp:~roederhr/revager/dmgbuild
Merge into: lp:revager
Diff against target: 231 lines (+94/-12)
9 files modified
build-revager.xml (+68/-5)
src/neos/resi/resources/build/macosx/dmg_setlayout.applescript (+19/-0)
src/neos/resi/resources/build/windows/launch4j-revager.xml (+1/-1)
src/neos/resi/resources/help/de/aspects_management.html (+1/-1)
src/neos/resi/resources/help/de/attendees_management.html (+1/-1)
src/neos/resi/resources/help/de/meetings_management.html (+1/-1)
src/neos/resi/resources/help/en/aspects_management.html (+1/-1)
src/neos/resi/resources/help/en/attendees_management.html (+1/-1)
src/neos/resi/resources/help/en/meetings_management.html (+1/-1)
To merge this branch: bzr merge lp:~roederhr/revager/dmgbuild
Reviewer Review Type Date Requested Status
Holger Röder (community) Needs Information
Johannes Wettinger schreibtischtest Needs Fixing
Review via email: mp+16637@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Holger Röder (roederhr) wrote :

Adds a DMG build target to the RevAger build file

Revision history for this message
Johannes Wettinger (jojow) wrote :

I've tried the build script on Mac OS X Leopard. At first glance it seems to work very well, so you get a functional DMG file. The problem is that you get a usual DMG without the artwork. I don't know what exactly the problem is, but there is an error concerning Finder and the "RevAger" disk. Here you can see the output of Ant:

build-dmg:
   [delete] Could not find file /Users/jojo/Desktop/dmgbuild/dist/RevAger_1.2.dmg to delete.
     [exec] created: /Users/jojo/Desktop/dmgbuild/dist/RevAger-tmp.dmg
     [exec] /dev/disk1 Apple_partition_scheme
     [exec] /dev/disk1s1 Apple_partition_map
     [exec] /dev/disk1s2 Apple_HFS /tmp/RevAger
    [mkdir] Created dir: /tmp/RevAger/.background
     [copy] Copying 1 file to /tmp/RevAger/.background
     [exec] /Users/jojo/Desktop/dmgbuild/src/neos/resi/resources/build/macosx/dmg_setlayout.applescript:167:171: execution error: Finder got an error: Can’t get disk "RevAger". (-1728)
     [exec] Result: 1
     [exec] "disk1" unmounted.
     [exec] "disk1" ejected.
     [exec] Image-Funktion vorbereiten …
     [exec] Driver Descriptor Map (DDM : 0) lesen …
     [exec] (CRC32 $136CED08: Driver Descriptor Map (DDM : 0))
     [exec] Apple (Apple_partition_map : 1) lesen …
     [exec] (CRC32 $E1D68E7C: Apple (Apple_partition_map : 1))
     [exec] disk image (Apple_HFS : 2) lesen …
     [exec] (CRC32 $9044734A: disk image (Apple_HFS : 2))
     [exec] (Apple_Free : 3) lesen …
     [exec] (CRC32 $00000000: (Apple_Free : 3))
     [exec] Ressourcen hinzufügen …
     [exec] Dauer: 863.429ms
     [exec] Dateigröße: 8617544 Bytes, Prüfsumme: CRC32 $1C7850D3
     [exec] Bearbeitete Sektoren: 37906, 34977 komprimiert
     [exec] Geschwindigkeit: 19.8M Bytes/Sek
     [exec] Ersparnis: 55.6 %
     [exec] created: /Users/jojo/Desktop/dmgbuild/dist/RevAger_1.2.dmg
   [delete] Deleting: /Users/jojo/Desktop/dmgbuild/dist/RevAger-tmp.dmg

BUILD SUCCESSFUL
Total time: 20 seconds

review: Needs Fixing (schreibtischtest)
Revision history for this message
Holger Röder (roederhr) wrote :

Apparently the applescript cannot access the "RevAger" disk which should have been mounted in the previous build step (line 220).

Unfortunately I cannot reproduce this problem. I did a clean checkout of lp:~roederhr/revager/dmgbuild, and the build script worked fine (created the DMG with correct layout!).

Could you please try the following:
- Clean /tmp (or whatever you use as ${dir.build.dmg.mount})
- Make sure *no* "RevAger" disk is mounted when running the build script

review: Needs Information
Revision history for this message
Johannes Wettinger (jojow) wrote :

I've tested it with a clean checkout of lp:~roederhr/revager/dmgbuild
again. I cleaned up /tmp as well and there was definitely no RevAger
disk mounted when I ran the build script.

After the build script created the DMG file (without the artwork), I
mounted this DMG file manually and ran the applescript. With this method
the first part of the applescript was executed correctly, as you can see
from the screenshot attached to this message. But unfortunately I got a
new error.

Holger Röder wrote:
> Review: Needs Information
> Apparently the applescript cannot access the "RevAger" disk which should have been mounted in the previous build step (line 220).
>
> Unfortunately I cannot reproduce this problem. I did a clean checkout of lp:~roederhr/revager/dmgbuild, and the build script worked fine (created the DMG with correct layout!).
>
> Could you please try the following:
> - Clean /tmp (or whatever you use as ${dir.build.dmg.mount})
> - Make sure *no* "RevAger" disk is mounted when running the build script

Revision history for this message
Johannes Wettinger (jojow) wrote :

I suggest to merge this branch into trunk now because we're going to do some structural changes inside the trunk branch (rename main package to "org.revager", customize the paths etc.).
If there are no objections, I'm going to merge this branch into trunk and open a new bug report regarding the existing problem on Mac OS X Tiger. Generally the DMG building process is working very well.

Revision history for this message
Holger Röder (roederhr) wrote :

Huh, you're using Tiger? You should have told me! :)

Anyway, I agree, go ahead and merge.

Revision history for this message
Johannes Wettinger (jojow) wrote :

> Huh, you're using Tiger? You should have told me! :)

Sorry Holger, since I'm not an active user of Mac OS X, I've just mixed up the codenames! I'm using Mac OS X 10.5 aka Leopard as mentioned above. So, forget about the old Tiger! ;-)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'build-revager.xml'
2--- build-revager.xml 2009-12-18 14:35:44 +0000
3+++ build-revager.xml 2009-12-29 11:25:25 +0000
4@@ -16,6 +16,11 @@
5 <property name="dir.dist" location="dist" />
6 <property name="dir.build.test" location="${dir.build}/neos/resi/test" />
7
8+ <!-- Directory where build resources (images etc.) can be found -->
9+ <property name="dir.build.resources" value="${dir.src}/neos/resi/resources/build" />
10+ <!-- Directory where DMG images can be temporarily mounted -->
11+ <property name="dir.build.dmg.mount" value="/tmp"/>
12+
13 <property name="lib.derby" location="${dir.lib}/derby.jar" />
14 <property name="lib.iText" location="${dir.lib}/iText-2.1.7.jar" />
15 <property name="lib.junit" location="${dir.lib.dev}/junit-4.7.jar" />
16@@ -177,7 +182,7 @@
17
18 <target name="build-launch4j" if="isLaunch4jAvailable" description="generate runnable .exe file for MS Windows">
19 <property name="dir.launch4j" location="${dir.lib.dev}/launch4j/launch4j" />
20- <property name="conf.launch4j" location="launch4j-revager.xml" />
21+ <property name="conf.launch4j" location="${dir.build.resources}/windows/launch4j-revager.xml" />
22 <taskdef name="launch4j" classname="net.sf.launch4j.ant.Launch4jTask" classpath="${dir.launch4j}/launch4j.jar
23 :${dir.launch4j}/lib/xstream.jar" />
24
25@@ -188,10 +193,67 @@
26 <target name="build-jarbundler" if="isMacOSX" description="generate runnable app file for Mac OS X">
27 <taskdef name="jarbundler" classname="net.sourceforge.jarbundler.JarBundler" classpath="${dir.lib.dev}/jarbundler-2.1.0.jar" />
28
29- <jarbundler dir="${dir.dist}" name="RevAger" mainclass="neos.resi.Main" jar="${dir.dist}/revager_${appVersion}.jar" build="${appBuild}" version="${appVersion}" bundleid="neos.resi" icon="${dir.build}/neos/resi/gui/icons/frameIcon_128x128.icns" jvmversion="1.6+" shortname="RevAger" />
30- </target>
31-
32-
33+ <jarbundler dir="${dir.dist}" name="${appName}" mainclass="neos.resi.Main" jar="${dir.dist}/revager_${appVersion}.jar" build="${appBuild}" version="${appVersion}" bundleid="neos.resi" icon="${dir.build}/neos/resi/gui/icons/frameIcon_128x128.icns" jvmversion="1.6+" shortname="${appName}" />
34+ </target>
35+
36+ <!-- MacOS X DMG build script adapted from Romain Kuntz (http://www.rkuntz.org/pmwiki.php?n=Code.AntDiskImage) -->
37+ <target name="build-dmg" if="isMacOSX" description="build DMG image for MacOS X (requires hdiutil, thus only works on MacOS X)">
38+
39+ <!-- Delete previously created DMG -->
40+ <delete file="${dir.dist}/${appName}_${appVersion}.dmg" verbose="true" failonerror="false"/>
41+
42+ <!-- Create a temporary disk image -->
43+ <exec executable="/usr/bin/hdiutil" os="Mac OS X" failonerror="true">
44+ <arg value="create"/>
45+ <arg value="-srcfolder"/>
46+ <arg value="${dir.dist}/${appName}.app"/>
47+ <arg value="-volname"/>
48+ <arg value="${appName}"/>
49+ <arg value="-ov"/>
50+ <arg value="${dir.dist}/${appName}-tmp.dmg"/>
51+ <arg value="-format"/>
52+ <arg value="UDRW"/>
53+ <arg value="-nospotlight"/>
54+ </exec>
55+
56+ <!-- Attach the temporary image -->
57+ <exec executable="/usr/bin/hdiutil" os="Mac OS X" failonerror="true">
58+ <arg value="attach"/>
59+ <arg value="${dir.dist}/${appName}-tmp.dmg"/>
60+ <arg value="-mountroot"/>
61+ <arg value="${dir.build.dmg.mount}/"/>
62+ </exec>
63+
64+ <!-- Copy the background file -->
65+ <mkdir dir="${dir.build.dmg.mount}/${appName}/.background"/>
66+ <copy file="${dir.build.resources}/macosx/dmg_background.png" tofile="${dir.build.dmg.mount}/${appName}/.background/background.png" overwrite="true"/>
67+
68+ <!-- Layout Finder window (Set size, set background, arrange icons etc.) -->
69+ <exec executable="/usr/bin/osascript" os="Mac OS X">
70+ <arg value="${dir.build.resources}/macosx/dmg_setlayout.applescript" />
71+ </exec>
72+
73+ <!-- Detach the temporary image -->
74+ <exec executable="/usr/bin/hdiutil" os="Mac OS X" failonerror="true">
75+ <arg value="detach"/>
76+ <arg value="${dir.build.dmg.mount}/${appName}"/>
77+ </exec>
78+
79+ <!-- Compress it to a new image -->
80+ <exec executable="/usr/bin/hdiutil" os="Mac OS X" failonerror="true">
81+ <arg value="convert"/>
82+ <arg value="${dir.dist}/${appName}-tmp.dmg"/>
83+ <arg value="-format"/>
84+ <arg value="UDZO"/>
85+ <arg value="-o"/>
86+ <arg value="${dir.dist}/${appName}_${appVersion}.dmg"/>
87+ </exec>
88+
89+ <!-- Delete the temporary image -->
90+ <delete file="${dir.dist}/${appName}-tmp.dmg" verbose="true" failonerror="false"/>
91+
92+ </target>
93+
94 <target name="release" description="generate a full release">
95 <antcall target="dist" />
96
97@@ -199,6 +261,7 @@
98 <antcall target="build-launch4j" />
99
100 <antcall target="build-jarbundler" />
101+ <antcall target="build-dmg"/>
102 </target>
103
104 </project>
105\ No newline at end of file
106
107=== added directory 'src/neos/resi/resources/build'
108=== added directory 'src/neos/resi/resources/build/macosx'
109=== added file 'src/neos/resi/resources/build/macosx/dmg_background.png'
110Binary files src/neos/resi/resources/build/macosx/dmg_background.png 1970-01-01 00:00:00 +0000 and src/neos/resi/resources/build/macosx/dmg_background.png 2009-12-29 11:25:25 +0000 differ
111=== added file 'src/neos/resi/resources/build/macosx/dmg_setlayout.applescript'
112--- src/neos/resi/resources/build/macosx/dmg_setlayout.applescript 1970-01-01 00:00:00 +0000
113+++ src/neos/resi/resources/build/macosx/dmg_setlayout.applescript 2009-12-29 11:25:25 +0000
114@@ -0,0 +1,19 @@
115+-- This script prepares the Finder window of 'RevAger'
116+-- (Set window size, set background image, arrange icons etc.)
117+tell application "Finder"
118+ tell disk "RevAger"
119+ open
120+ set current view of container window to icon view
121+ set toolbar visible of container window to false
122+ set statusbar visible of container window to false
123+ set the bounds of container window to {200, 100, 800, 360}
124+ set theViewOptions to the icon view options of container window
125+ set arrangement of theViewOptions to not arranged
126+ set icon size of theViewOptions to 48
127+ set background picture of theViewOptions to file ".background:background.png"
128+ make new alias file at container window to POSIX file "/Applications" with properties {name:"Applications"}
129+ set position of item "RevAger" of container window to {310, 90}
130+ set position of item "Applications" of container window to {520, 150}
131+ update without registering applications
132+ end tell
133+end tell
134\ No newline at end of file
135
136=== added directory 'src/neos/resi/resources/build/windows'
137=== renamed file 'launch4j-revager.xml' => 'src/neos/resi/resources/build/windows/launch4j-revager.xml'
138--- launch4j-revager.xml 2009-12-13 10:04:32 +0000
139+++ src/neos/resi/resources/build/windows/launch4j-revager.xml 2009-12-29 11:25:25 +0000
140@@ -12,7 +12,7 @@
141 <customProcName>false</customProcName>
142 <stayAlive>false</stayAlive>
143 <manifest></manifest>
144- <icon>./src/neos/resi/gui/icons/frameIcon_128x128.ico</icon>
145+ <icon>../../../gui/icons/frameIcon_128x128.ico</icon>
146 <jre>
147 <path></path>
148 <minVersion>1.6.0</minVersion>
149
150=== modified file 'src/neos/resi/resources/help/de/aspects_management.html'
151--- src/neos/resi/resources/help/de/aspects_management.html 2009-11-21 03:26:57 +0000
152+++ src/neos/resi/resources/help/de/aspects_management.html 2009-12-29 11:25:25 +0000
153@@ -73,7 +73,7 @@
154 Fragenkatalog des Prüfaspekts festlegen können.</p>
155 <p></p>
156
157- <p><IMG src="resources/help/de/images/pruefaspekt_hinzufügen.png"></p>
158+ <p><IMG src="resources/help/de/images/pruefaspekt_hinzufuegen.png"></p>
159 <h4>Abb.Neuen Prüfaspekt erstellen</h4>
160
161
162
163=== modified file 'src/neos/resi/resources/help/de/attendees_management.html'
164--- src/neos/resi/resources/help/de/attendees_management.html 2009-11-21 03:26:57 +0000
165+++ src/neos/resi/resources/help/de/attendees_management.html 2009-12-29 11:25:25 +0000
166@@ -25,7 +25,7 @@
167 <br>Das Fenster <em>"Teilnehmer hinzufügen"</em> erscheint.</p>
168 <p></p>
169
170- <p><IMG src="resources/help/de/images/teilnehmer_hinzufügen.png"
171+ <p><IMG src="resources/help/de/images/teilnehmer_hinzufuegen.png"
172 alt="Abb.y"> <A name="Abb.y"></A></p>
173 <h4>Abb.Teilnehmer hinzufügen/bearbeiten</h4>
174
175
176=== renamed file 'src/neos/resi/resources/help/de/images/pruefaspekt_hinzufügen.png' => 'src/neos/resi/resources/help/de/images/pruefaspekt_hinzufuegen.png'
177=== renamed file 'src/neos/resi/resources/help/de/images/sitzung_hinzufügen.png' => 'src/neos/resi/resources/help/de/images/sitzung_hinzufuegen.png'
178=== renamed file 'src/neos/resi/resources/help/de/images/teilnehmer_hinzufügen.png' => 'src/neos/resi/resources/help/de/images/teilnehmer_hinzufuegen.png'
179=== modified file 'src/neos/resi/resources/help/de/meetings_management.html'
180--- src/neos/resi/resources/help/de/meetings_management.html 2009-11-21 03:26:57 +0000
181+++ src/neos/resi/resources/help/de/meetings_management.html 2009-12-29 11:25:25 +0000
182@@ -25,7 +25,7 @@
183 <p>Es erscheint das Fenster <em>"Sitzung hinzufügen"</em>.</p>
184 <p></p>
185
186- <p><IMG src="resources/help/de/images/sitzung_hinzufügen.png"
187+ <p><IMG src="resources/help/de/images/sitzung_hinzufuegen.png"
188 alt="Abb.y"> <A name="Abb.y"></A></p>
189 <h4 align="center">Abb.Sitzung hinzufügen/bearbeiten</h4>
190
191
192=== modified file 'src/neos/resi/resources/help/en/aspects_management.html'
193--- src/neos/resi/resources/help/en/aspects_management.html 2009-11-21 03:26:57 +0000
194+++ src/neos/resi/resources/help/en/aspects_management.html 2009-12-29 11:25:25 +0000
195@@ -73,7 +73,7 @@
196 Fragenkatalog des Prüfaspekts festlegen können.</p>
197 <p></p>
198
199- <p><IMG src="resources/help/de/images/pruefaspekt_hinzufügen.png"></p>
200+ <p><IMG src="resources/help/de/images/pruefaspekt_hinzufuegen.png"></p>
201 <h4>Abb.Neuen Prüfaspekt erstellen</h4>
202
203
204
205=== modified file 'src/neos/resi/resources/help/en/attendees_management.html'
206--- src/neos/resi/resources/help/en/attendees_management.html 2009-11-21 03:26:57 +0000
207+++ src/neos/resi/resources/help/en/attendees_management.html 2009-12-29 11:25:25 +0000
208@@ -25,7 +25,7 @@
209 <br>Das Fenster <em>"Teilnehmer hinzufügen"</em> erscheint.</p>
210 <p></p>
211
212- <p><IMG src="resources/help/de/images/teilnehmer_hinzufügen.png"
213+ <p><IMG src="resources/help/de/images/teilnehmer_hinzufuegen.png"
214 alt="Abb.y"> <A name="Abb.y"></A></p>
215 <h4>Abb.Teilnehmer hinzufügen/bearbeiten</h4>
216
217
218=== renamed file 'src/neos/resi/resources/help/en/images/pruefaspekt_hinzufügen.png' => 'src/neos/resi/resources/help/en/images/pruefaspekt_hinzufuegen.png'
219=== renamed file 'src/neos/resi/resources/help/en/images/sitzung_hinzufügen.png' => 'src/neos/resi/resources/help/en/images/sitzung_hinzufuegen.png'
220=== renamed file 'src/neos/resi/resources/help/en/images/teilnehmer_hinzufügen.png' => 'src/neos/resi/resources/help/en/images/teilnehmer_hinzufuegen.png'
221=== modified file 'src/neos/resi/resources/help/en/meetings_management.html'
222--- src/neos/resi/resources/help/en/meetings_management.html 2009-11-21 03:26:57 +0000
223+++ src/neos/resi/resources/help/en/meetings_management.html 2009-12-29 11:25:25 +0000
224@@ -25,7 +25,7 @@
225 <p>Es erscheint das Fenster <em>"Sitzung hinzufügen"</em>.</p>
226 <p></p>
227
228- <p><IMG src="resources/help/de/images/sitzung_hinzufügen.png"
229+ <p><IMG src="resources/help/de/images/sitzung_hinzufuegen.png"
230 alt="Abb.y"> <A name="Abb.y"></A></p>
231 <h4 align="center">Abb.Sitzung hinzufügen/bearbeiten</h4>
232

Subscribers

People subscribed via source and target branches