Skip to content

Commit 3492911

Browse files
committed
MacOSX code sign procedure
1 parent 3f105bc commit 3492911

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

build/build.xml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,45 @@
262262
</exec>
263263
</target>
264264

265+
<!-- - - - - - - - - - - - - - - - -->
266+
<!-- Sign application for MacOSX. -->
267+
<!-- - - - - - - - - - - - - - - - -->
268+
<target name="macosx-signed-dist" if="macosx" depends="macosx-singed-dist-check, dist"
269+
description="Create a downloadable and signed .zip for the Mac OS X version">
270+
<fail unless="version" message="Please set the property 'version' to correctly sign distribution file" />
271+
272+
<!-- Remove everything from working folder -->
273+
<delete dir="macosx/work/Arduino.app" />
274+
275+
<!-- Unzip unsigned app into working dir -->
276+
<unzip dest="macosx/work" src="macosx/arduino-${version}-${platform}.zip" overwrite="false"/>
277+
278+
<!-- Sign app -->
279+
<exec executable="codesign" dir="macosx/work" failonerror="true">
280+
<arg line="-s &quot;${macosx-sign-id}&quot; -v Arduino.app/" />
281+
</exec>
282+
283+
<!-- Create signed zip file -->
284+
<exec executable="zip" dir="macosx/work">
285+
<arg line="-q -r ../arduino-${version}-${platform}-signed.zip ." />
286+
</exec>
287+
288+
<echo>
289+
=======================================================
290+
Arduino for Mac OS X built and signed.
291+
292+
macosx/arduino-${version}-${platform}-signed.zip
293+
=======================================================
294+
</echo>
295+
</target>
296+
297+
<target name="macosx-singed-dist-check">
298+
<fail unless="macosx-sign-id" message="Please set the property 'macosx-sign-id' to correctly sign distribution file" />
299+
</target>
300+
301+
<!-- - - - - - - - - - - - - - - - - - - -->
302+
<!-- Build distribution file for MacOSX. -->
303+
<!-- - - - - - - - - - - - - - - - - - - -->
265304
<target name="macosx-dist" if="macosx" depends="macosx-build" description="Create a downloadable .zip for the Mac OS X version">
266305
<!-- The ant copy command does not preserve permissions. -->
267306
<chmod file="macosx/work/Arduino.app/Contents/MacOS/JavaApplicationStub" perm="+x" />

0 commit comments

Comments
 (0)