|
276 | 276 | </exec>
|
277 | 277 | </target>
|
278 | 278 |
|
| 279 | + <!-- - - - - - - - - - - - - - - - --> |
| 280 | + <!-- Sign application for MacOSX. --> |
| 281 | + <!-- - - - - - - - - - - - - - - - --> |
| 282 | + <target name="macosx-signed-dist" if="macosx" depends="macosx-singed-dist-check, dist" |
| 283 | + description="Create a downloadable and signed .zip for the Mac OS X version"> |
| 284 | + <fail unless="version" message="Please set the property 'version' to correctly sign distribution file" /> |
| 285 | + |
| 286 | + <!-- Remove everything from working folder --> |
| 287 | + <delete dir="macosx/work/Arduino.app" /> |
| 288 | + |
| 289 | + <!-- Unzip unsigned app into working dir --> |
| 290 | + <unzip dest="macosx/work" src="macosx/arduino-${version}-${platform}.zip" overwrite="false"/> |
| 291 | + |
| 292 | + <!-- Unlock keychain file --> |
| 293 | + <exec executable="security" dir="macosx/work"> |
| 294 | + <arg line="unlock-keychain -p "${macosx-sign-keychain-pass}" "${macosx-sign-keychain}"" /> |
| 295 | + </exec> |
| 296 | + |
| 297 | + <!-- Sign app --> |
| 298 | + <exec executable="codesign" dir="macosx/work" failonerror="true"> |
| 299 | + <arg line="--keychain "${macosx-sign-keychain}" -s "${macosx-sign-id}" -v Arduino.app/" /> |
| 300 | + </exec> |
| 301 | + |
| 302 | + <!-- Create signed zip file --> |
| 303 | + <exec executable="zip" dir="macosx/work"> |
| 304 | + <arg line="-q -r ../arduino-${version}-${platform}-signed.zip ." /> |
| 305 | + </exec> |
| 306 | + |
| 307 | + <echo> |
| 308 | + ======================================================= |
| 309 | + Arduino for Mac OS X built and signed. |
| 310 | + |
| 311 | + macosx/arduino-${version}-${platform}-signed.zip |
| 312 | + ======================================================= |
| 313 | + </echo> |
| 314 | + </target> |
| 315 | + |
| 316 | + <target name="macosx-singed-dist-check"> |
| 317 | + <fail unless="macosx-sign-keychain" message="Please set the property 'macosx-sign-keychain' to the correct keychain file" /> |
| 318 | + <fail unless="macosx-sign-keychain-pass" message="Please set the property 'macosx-sign-keychain-pass' with the password to unlock the keychain" /> |
| 319 | + <fail unless="macosx-sign-id" message="Please set the property 'macosx-sign-id' to the correct cert identifier" /> |
| 320 | + </target> |
| 321 | + |
| 322 | + <!-- - - - - - - - - - - - - - - - - - - --> |
| 323 | + <!-- Build distribution file for MacOSX. --> |
| 324 | + <!-- - - - - - - - - - - - - - - - - - - --> |
279 | 325 | <target name="macosx-dist" if="macosx" depends="macosx-build" description="Create a downloadable .zip for the Mac OS X version">
|
280 | 326 | <!-- The ant copy command does not preserve permissions. -->
|
281 | 327 | <chmod file="macosx/work/Arduino.app/Contents/MacOS/JavaApplicationStub" perm="+x" />
|
|
0 commit comments