MacOSX code sign procedure

This commit is contained in:
Cristian Maglie 2013-02-01 23:51:50 +01:00
parent 3f105bcd00
commit 3492911527
1 changed files with 39 additions and 0 deletions

View File

@ -262,6 +262,45 @@
</exec>
</target>
<!-- - - - - - - - - - - - - - - - -->
<!-- Sign application for MacOSX. -->
<!-- - - - - - - - - - - - - - - - -->
<target name="macosx-signed-dist" if="macosx" depends="macosx-singed-dist-check, dist"
description="Create a downloadable and signed .zip for the Mac OS X version">
<fail unless="version" message="Please set the property 'version' to correctly sign distribution file" />
<!-- Remove everything from working folder -->
<delete dir="macosx/work/Arduino.app" />
<!-- Unzip unsigned app into working dir -->
<unzip dest="macosx/work" src="macosx/arduino-${version}-${platform}.zip" overwrite="false"/>
<!-- Sign app -->
<exec executable="codesign" dir="macosx/work" failonerror="true">
<arg line="-s &quot;${macosx-sign-id}&quot; -v Arduino.app/" />
</exec>
<!-- Create signed zip file -->
<exec executable="zip" dir="macosx/work">
<arg line="-q -r ../arduino-${version}-${platform}-signed.zip ." />
</exec>
<echo>
=======================================================
Arduino for Mac OS X built and signed.
macosx/arduino-${version}-${platform}-signed.zip
=======================================================
</echo>
</target>
<target name="macosx-singed-dist-check">
<fail unless="macosx-sign-id" message="Please set the property 'macosx-sign-id' to correctly sign distribution file" />
</target>
<!-- - - - - - - - - - - - - - - - - - - -->
<!-- Build distribution file for MacOSX. -->
<!-- - - - - - - - - - - - - - - - - - - -->
<target name="macosx-dist" if="macosx" depends="macosx-build" description="Create a downloadable .zip for the Mac OS X version">
<!-- The ant copy command does not preserve permissions. -->
<chmod file="macosx/work/Arduino.app/Contents/MacOS/JavaApplicationStub" perm="+x" />