Skip to content

Commit 33544fc

Browse files
committed
Changing Mac OS X build to a .zip file (and adding OS name to archive).
http://code.google.com/p/arduino/issues/detail?id=645
1 parent 9af71ad commit 33544fc

File tree

2 files changed

+40
-11
lines changed

2 files changed

+40
-11
lines changed

build/build.xml

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,37 @@
217217
<exec executable="macosx/work/Arduino.app/Contents/MacOS/JavaApplicationStub" spawn="true"/>
218218
</target>
219219

220-
<target name="macosx-dist" if="macosx" depends="macosx-build" description="Create a .dmg of the Mac OS X version">
220+
<target name="macosx-dist" if="macosx" depends="macosx-build" description="Create a downloadable .zip for the Mac OS X version">
221+
<!-- The ant copy command does not preserve permissions. -->
222+
<chmod file="macosx/work/Arduino.app/Contents/MacOS/JavaApplicationStub" perm="+x" />
223+
<chmod perm="+x">
224+
<fileset dir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin" includes="**/*" />
225+
<fileset dir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr/bin" includes="**/*" />
226+
<fileset dir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr-3/bin" includes="**/*" />
227+
<fileset dir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr-4/bin" includes="**/*" />
228+
<fileset dir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/avr/libexec/gcc/avr/3.4.6/" includes="**/cc1*" />
229+
<fileset dir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/avr/libexec/gcc/avr/4.3.2/" includes="**/cc1*" />
230+
</chmod>
231+
232+
<replace file="macosx/work/Arduino.app/Contents/Info.plist"
233+
token="VERSION" value="${version}" />
234+
<replace file="macosx/work/Arduino.app/Contents/Info.plist"
235+
token="REVISION" value="${revision}" />
236+
237+
<exec executable="ditto" dir="macosx/work">
238+
<arg line="-c -k -rsrc . ../arduino-${version}-macosx.zip" />
239+
</exec>
240+
241+
<echo>
242+
=======================================================
243+
Arduino for Mac OS X was built. Grab the image from
244+
245+
macosx/arduino-${version}-macosx.zip
246+
=======================================================
247+
</echo>
248+
</target>
249+
250+
<target name="macosx-dist-old" if="macosx" depends="macosx-build" description="Create a .dmg of the Mac OS X version">
221251
<!-- now build the dmg -->
222252
<gunzip src="macosx/template.dmg.gz" dest="macosx/working.dmg" />
223253

@@ -270,7 +300,6 @@
270300
=======================================================
271301
</echo>
272302
</target>
273-
274303

275304
<!-- - - - - - - - -->
276305
<!-- Linux -->
@@ -352,7 +381,7 @@
352381
<tar compression="gzip" basedir="linux/work"
353382
destfile="linux/arduino-${version}.tgz" />
354383
-->
355-
<tar compression="gzip" destfile="linux/arduino-${version}.tgz">
384+
<tar compression="gzip" destfile="linux/arduino-${version}-linux.tgz">
356385
<tarfileset dir="linux/work"
357386
prefix="arduino-${version}"
358387
excludes="arduino,
@@ -368,7 +397,7 @@
368397
=======================================================
369398
Arduino for Linux was built. Grab the archive from
370399

371-
build/linux/arduino-${version}.tgz
400+
build/linux/arduino-${version}-linux.tgz
372401
=======================================================
373402
</echo>
374403
</target>
@@ -477,12 +506,12 @@
477506
excludes="java/**" />
478507
-->
479508

480-
<zip destfile="windows/arduino-${version}.zip">
509+
<zip destfile="windows/arduino-${version}-windows.zip">
481510
<zipfileset dir="windows/work"
482511
prefix="arduino-${version}" />
483512
</zip>
484513

485-
<zip destfile="windows/arduino-${version}-expert.zip">
514+
<zip destfile="windows/arduino-${version}-windows-expert.zip">
486515
<zipfileset dir="windows/work"
487516
prefix="arduino-${version}"
488517
excludes="java/**" />
@@ -492,8 +521,8 @@
492521
=======================================================
493522
Arduino for Windows was built. Grab the archive from
494523

495-
windows/arduino-${version}.zip
496-
windows/arduino-${version}-expert.zip
524+
windows/arduino-${version}-windows.zip
525+
windows/arduino-${version}-windows-expert.zip
497526
=======================================================
498527
</echo>
499528
</target>

build/macosx/template.app/Contents/Info.plist

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77

88
<!-- all these need to change for new releases -->
99
<key>CFBundleGetInfoString</key>
10-
<string>1.0-rc2</string>
10+
<string>VERSION</string>
1111
<key>CFBundleVersion</key>
12-
<string>0100</string>
12+
<string>REVISION</string>
1313
<key>CFBundleShortVersionString</key>
14-
<string>1.0-rc2</string>
14+
<string>VERSION</string>
1515
<!-- now stop changing things and get outta here -->
1616

1717
<key>CFBundleAllowMixedLocalizations</key>

0 commit comments

Comments
 (0)