Lines 8-42
Link Here
|
8 |
<format property="BUILD_DATE" pattern="yyyy/MM/dd hh:mm"/> |
8 |
<format property="BUILD_DATE" pattern="yyyy/MM/dd hh:mm"/> |
9 |
</tstamp> |
9 |
</tstamp> |
10 |
|
10 |
|
11 |
<!-- Sets properties for macosx/windows/linux depending on current system --> |
11 |
<!-- Sets properties for linux depending on current system --> |
12 |
<condition property="platform" value="macosx-old"> |
|
|
13 |
<and> |
14 |
<os family="mac" /> |
15 |
<matches string="${os.version}" pattern="^10.[56]." /> |
16 |
</and> |
17 |
</condition> |
18 |
<condition property="platform" value="macosx"><os family="mac" /></condition> |
19 |
<condition property="platform" value="windows"><os family="windows" /></condition> |
20 |
<condition property="platform" value="linux32"><os family="unix" arch="i386" /></condition> |
12 |
<condition property="platform" value="linux32"><os family="unix" arch="i386" /></condition> |
21 |
<condition property="platform" value="linux64"><os family="unix" arch="amd64" /></condition> |
13 |
<condition property="platform" value="linux64"><os family="unix" arch="amd64" /></condition> |
22 |
|
14 |
|
23 |
<condition property="macosx"><equals arg1="${platform}" arg2="macosx-old" /></condition> |
|
|
24 |
<condition property="macosx"><equals arg1="${platform}" arg2="macosx" /></condition> |
25 |
<condition property="windows"><equals arg1="${platform}" arg2="windows" /></condition> |
26 |
<condition property="linux32"><equals arg1="${platform}" arg2="linux32" /></condition> |
15 |
<condition property="linux32"><equals arg1="${platform}" arg2="linux32" /></condition> |
27 |
<condition property="linux64"><equals arg1="${platform}" arg2="linux64" /></condition> |
16 |
<condition property="linux64"><equals arg1="${platform}" arg2="linux64" /></condition> |
28 |
<condition property="linux"><equals arg1="${platform}" arg2="linux32" /></condition> |
17 |
<condition property="linux"><equals arg1="${platform}" arg2="linux32" /></condition> |
29 |
<condition property="linux"><equals arg1="${platform}" arg2="linux64" /></condition> |
18 |
<condition property="linux"><equals arg1="${platform}" arg2="linux64" /></condition> |
30 |
|
19 |
|
31 |
<condition property="staging_folder" value="macosx"><equals arg1="${platform}" arg2="macosx" /></condition> |
|
|
32 |
<condition property="staging_folder" value="macosx"><equals arg1="${platform}" arg2="macosx-old" /></condition> |
33 |
<condition property="staging_folder" value="windows"><equals arg1="${platform}" arg2="windows" /></condition> |
34 |
<condition property="staging_folder" value="linux"><equals arg1="${platform}" arg2="linux32" /></condition> |
20 |
<condition property="staging_folder" value="linux"><equals arg1="${platform}" arg2="linux32" /></condition> |
35 |
<condition property="staging_folder" value="linux"><equals arg1="${platform}" arg2="linux64" /></condition> |
21 |
<condition property="staging_folder" value="linux"><equals arg1="${platform}" arg2="linux64" /></condition> |
36 |
|
22 |
|
37 |
<condition property="staging_hardware_folder" value="Arduino.app/Contents/Java/hardware"><equals arg1="${platform}" arg2="macosx" /></condition> |
|
|
38 |
<condition property="staging_hardware_folder" value="Arduino.app/Contents/Resources/Java/hardware"><equals arg1="${platform}" arg2="macosx-old" /></condition> |
39 |
<condition property="staging_hardware_folder" value="hardware"><equals arg1="${platform}" arg2="windows" /></condition> |
40 |
<condition property="staging_hardware_folder" value="hardware"><equals arg1="${platform}" arg2="linux32" /></condition> |
23 |
<condition property="staging_hardware_folder" value="hardware"><equals arg1="${platform}" arg2="linux32" /></condition> |
41 |
<condition property="staging_hardware_folder" value="hardware"><equals arg1="${platform}" arg2="linux64" /></condition> |
24 |
<condition property="staging_hardware_folder" value="hardware"><equals arg1="${platform}" arg2="linux64" /></condition> |
42 |
|
25 |
|
Lines 47-57
Link Here
|
47 |
<equals arg1="${platform}" arg2="linux64"/> |
30 |
<equals arg1="${platform}" arg2="linux64"/> |
48 |
</condition> |
31 |
</condition> |
49 |
|
32 |
|
50 |
<condition property="launch4j-download-unpack-target-name" value="launch4j-windows"><os family="windows" /></condition> |
|
|
51 |
<property name="launch4j-download-unpack-target-name" value="launch4j-linux"/> |
33 |
<property name="launch4j-download-unpack-target-name" value="launch4j-linux"/> |
52 |
|
34 |
|
53 |
<property name="MACOSX_BUNDLED_JVM" value="${java.home}/../"/> |
|
|
54 |
<property name="WINDOWS_BUNDLED_JVM" value="${java.home}"/> |
55 |
<property name="LINUX32_BUNDLED_JVM" value="none"/> |
35 |
<property name="LINUX32_BUNDLED_JVM" value="none"/> |
56 |
<property name="LINUX64_BUNDLED_JVM" value="none"/> |
36 |
<property name="LINUX64_BUNDLED_JVM" value="none"/> |
57 |
<condition property="linux-bundle-jvm-task" value="noop"> |
37 |
<condition property="linux-bundle-jvm-task" value="noop"> |
Lines 243-595
Link Here
|
243 |
</target> |
223 |
</target> |
244 |
|
224 |
|
245 |
<!-- - - - - - - - --> |
225 |
<!-- - - - - - - - --> |
246 |
<!-- Mac OS X --> |
|
|
247 |
<!-- - - - - - - - --> |
248 |
|
249 |
<target name="macosx-clean" depends="macosx-old-clean" description="Clean Mac OS X build"/> |
250 |
|
251 |
<target name="macosx-old-clean" depends="subprojects-clean" description="Clean Mac OS X build"> |
252 |
<delete dir="macosx/work" /> |
253 |
<delete dir="macosx/working_dir" /> |
254 |
<delete dir="macosx/working.dmg" /> |
255 |
<delete file="macosx/arduino-*.dmg" /> |
256 |
<delete> |
257 |
<fileset dir="macosx" includes="arduino-*macosx*.zip"/> |
258 |
</delete> |
259 |
</target> |
260 |
|
261 |
<target name="macosx-checkos" unless="macosx"> |
262 |
<echo> |
263 |
======================================================= |
264 |
Arduino for Mac OS X can only be built on Mac OS X. |
265 |
|
266 |
Bye. |
267 |
======================================================= |
268 |
</echo> |
269 |
<fail message="wrong platform (${os.name})" /> |
270 |
</target> |
271 |
|
272 |
<target name="macosx-old-build" if="macosx" depends="revision-check, macosx-checkos, subprojects-build" description="Build Mac OS X version"> |
273 |
<mkdir dir="macosx/work" /> |
274 |
<mkdir dir="macosx/work/${staging_hardware_folder}" /> |
275 |
|
276 |
<!-- assemble the pde --> |
277 |
<copy todir="macosx/work/Arduino.app"> |
278 |
<fileset dir="macosx/template.app" includes="**"/> |
279 |
</copy> |
280 |
|
281 |
<chmod file="macosx/work/Arduino.app/Contents/MacOS/JavaApplicationStub" perm="755" /> |
282 |
|
283 |
<copy todir="macosx/work/Arduino.app/Contents/Resources/Java" flatten="true"> |
284 |
<fileset refid="runtime.jars"/> |
285 |
</copy> |
286 |
|
287 |
<copy todir="macosx/work/Arduino.app/Contents/Resources/Java"> |
288 |
<fileset dir="shared" includes="lib/**" /> |
289 |
<fileset file="shared/revisions.txt" /> |
290 |
</copy> |
291 |
|
292 |
<antcall target="macosx-build-common"/> |
293 |
|
294 |
<replace file="macosx/work/Arduino.app/Contents/Info.plist" |
295 |
token="VERSION" value="${version}" /> |
296 |
<replace file="macosx/work/Arduino.app/Contents/Info.plist" |
297 |
token="REVISION" value="${revision}" /> |
298 |
|
299 |
</target> |
300 |
|
301 |
<target name="macosx-build" if="macosx" depends="revision-check, macosx-checkos, subprojects-build" description="Build Mac OS X version"> |
302 |
<fail unless="MACOSX_BUNDLED_JVM" message="MacOSX requires MACOSX_BUNDLED_JVM property set"/> |
303 |
<mkdir dir="${staging_folder}/work" /> |
304 |
|
305 |
<antcall target="unzip"> |
306 |
<param name="archive_file" value="${staging_folder}/appbundler-1.0ea-upstream1.jar.zip" /> |
307 |
<param name="archive_url" value="http://downloads.arduino.cc/appbundler-1.0ea-upstream1.jar.zip" /> |
308 |
<param name="final_folder" value="${staging_folder}/appbundler-1.0ea-upstream1" /> |
309 |
<param name="dest_folder" value="${staging_folder}/appbundler-1.0ea-upstream1" /> |
310 |
</antcall> |
311 |
|
312 |
<taskdef name="bundleapp" classname="com.oracle.appbundler.AppBundlerTask" classpath="${staging_folder}/appbundler-1.0ea-upstream1/appbundler-1.0ea-upstream1.jar"/> |
313 |
|
314 |
<bundleapp |
315 |
jvmRequired="1.8" |
316 |
outputdirectory="${staging_folder}/work" |
317 |
name="Arduino" |
318 |
displayname="Arduino" |
319 |
executablename="Arduino" |
320 |
identifier="cc.arduino.Arduino" |
321 |
shortversion="${version}" |
322 |
version="${revision}" |
323 |
signature="Pde1" |
324 |
icon="macosx/template.app/Contents/Resources/processing.icns" |
325 |
mainclassname="processing.app.Base" |
326 |
copyright="Arduino LLC" |
327 |
minimumsystemversion="10.7" |
328 |
highresolutioncapable="true"> |
329 |
|
330 |
<runtime dir="${MACOSX_BUNDLED_JVM}"/> |
331 |
|
332 |
<arch name="x86_64"/> |
333 |
<arch name="i386"/> |
334 |
|
335 |
<classpath refid="runtime.jars"/> |
336 |
|
337 |
<option value="-Dapple.awt.application.name=Arduino" /> |
338 |
<option value="-Dapple.laf.useScreenMenuBar=true"/> |
339 |
<option value="-Dcom.apple.macos.use-file-dialog-packages=true"/> |
340 |
<option value="-Dcom.apple.smallTabs=true"/> |
341 |
<option value="-Dcom.apple.macos.useScreenMenuBar=true" /> |
342 |
|
343 |
<!-- |
344 |
<option value="-Dapple.awt.showGrowBox=false"/> |
345 |
<option value="-Dapple.awt.Antialiasing=false"/> |
346 |
<option value="-Dapple.awt.TextAntialiasing=true"/> |
347 |
<option value="-Dcom.apple.hwaccel=true"/> |
348 |
<option value="-Dapple.awt.graphics.UseQuartz=true"/> |
349 |
--> |
350 |
|
351 |
<!--<option value="-Dcom.apple.macos.useScreenMenuBar=true"/>--> |
352 |
|
353 |
<!-- Workaround since the icon parameter for bundleapp doesn't work --> |
354 |
<option value="-Xdock:name=Arduino"/> |
355 |
<option value="-Dcom.apple.mrj.application.apple.menu.about.name=Arduino"/> |
356 |
<option value="-Dfile.encoding=UTF-8"/> |
357 |
|
358 |
<option value="-Xms128M"/> |
359 |
<option value="-Xmx512M"/> |
360 |
<option value="-splash:$APP_ROOT/Contents/Java/lib/splash.png"/> |
361 |
|
362 |
<bundledocument extensions="ino,c,cpp,h" |
363 |
icon="macosx/template.app/Contents/Resources/pde.icns" |
364 |
name="Arduino Source File" |
365 |
role="Editor" ispackage="false"> |
366 |
</bundledocument> |
367 |
|
368 |
</bundleapp> |
369 |
|
370 |
<mkdir dir="${staging_folder}/work/${staging_hardware_folder}" /> |
371 |
|
372 |
<copy todir="${staging_folder}/work/${staging_hardware_folder}/../"> |
373 |
<fileset dir="shared" includes="lib/**" /> |
374 |
<fileset file="shared/revisions.txt" /> |
375 |
</copy> |
376 |
|
377 |
<antcall target="macosx-build-common"/> |
378 |
|
379 |
</target> |
380 |
|
381 |
<target name="macosx-build-common"> |
382 |
<mkdir dir="${staging_folder}/work" /> |
383 |
<mkdir dir="${staging_folder}/work/${staging_hardware_folder}" /> |
384 |
|
385 |
<antcall target="macosx-build-common-avr-toolchain" /> |
386 |
|
387 |
<antcall target="package-library-index-json-bundle"/> |
388 |
|
389 |
<antcall target="assemble"> |
390 |
<param name="target.path" value="${staging_folder}/work/${staging_hardware_folder}/.." /> |
391 |
</antcall> |
392 |
|
393 |
<antcall target="unzip"> |
394 |
<param name="archive_file" value="./libastylej-2.05.zip" /> |
395 |
<param name="archive_url" value="http://downloads.arduino.cc/libastylej-2.05.zip" /> |
396 |
<param name="final_folder" value="${staging_folder}/libastylej" /> |
397 |
<param name="dest_folder" value="${staging_folder}" /> |
398 |
</antcall> |
399 |
<copy file="macosx/libastylej/libastylej.jnilib" todir="macosx/work/${staging_hardware_folder}/../lib/" /> |
400 |
<chmod perm="755" file="macosx/work/${staging_hardware_folder}/../lib/libastylej.jnilib" /> |
401 |
<copy file="macosx/libastylej/libastylej.jnilib" tofile="macosx/work/${staging_hardware_folder}/../lib/libastylej.dylib" /> |
402 |
<chmod perm="755" file="macosx/work/${staging_hardware_folder}/../lib/libastylej.dylib" /> |
403 |
|
404 |
</target> |
405 |
|
406 |
<!-- Unzip AVR tools --> |
407 |
<target name="macosx-build-common-avr-toolchain" unless="light_bundle"> |
408 |
<antcall target="avr-toolchain-bundle"> |
409 |
<param name="unpack_target" value="untar"/> |
410 |
<param name="gcc_archive_file" value="avr-gcc-4.8.1-arduino5-i386-apple-darwin11.tar.bz2"/> |
411 |
<param name="gcc_version" value="4.8.1-arduino5"/> |
412 |
<param name="avrdude_archive_file" value="avrdude-6.0.1-arduino5-i386-apple-darwin11.tar.bz2"/> |
413 |
<param name="avrdude_version" value="6.0.1-arduino5"/> |
414 |
</antcall> |
415 |
|
416 |
<chmod perm="+x"> |
417 |
<fileset dir="${staging_folder}/work/${staging_hardware_folder}/tools" includes="**/bin/*"/> |
418 |
<fileset dir="${staging_folder}/work/${staging_hardware_folder}/tools" includes="**/libexec/gcc/avr/4.8.1/*"/> |
419 |
</chmod> |
420 |
</target> |
421 |
|
422 |
<target name="macosx-old-run" depends="macosx-old-build" description="Run Mac OS X version"> |
423 |
<antcall target="macosx-run-common"/> |
424 |
</target> |
425 |
|
426 |
<target name="macosx-run" depends="build" description="Run Mac OS X version"> |
427 |
<antcall target="macosx-run-common"/> |
428 |
</target> |
429 |
|
430 |
<target name="macosx-old-debug" depends="macosx-old-build" description="Run Mac OS X version"> |
431 |
<antcall target="macosx-debug-common"/> |
432 |
</target> |
433 |
|
434 |
<target name="macosx-debug" depends="build" description="Run Mac OS X version"> |
435 |
<antcall target="macosx-debug-common"/> |
436 |
</target> |
437 |
|
438 |
<target name="macosx-run-common"> |
439 |
<exec executable="open" dir="macosx/work" failonerror="true"> |
440 |
<arg value="Arduino.app"/> |
441 |
</exec> |
442 |
</target> |
443 |
|
444 |
<target name="macosx-debug-common"> |
445 |
<exec executable="open" dir="macosx/work" spawn="false" failonerror="true"> |
446 |
<arg value="Arduino.app"/> |
447 |
</exec> |
448 |
</target> |
449 |
|
450 |
<!-- - - - - - - - - - - - - - - - --> |
451 |
<!-- Sign application for MacOSX. --> |
452 |
<!-- - - - - - - - - - - - - - - - --> |
453 |
<target name="macosx-signed-dist" if="macosx" depends="macosx-singed-dist-check, dist" |
454 |
description="Create a downloadable and signed .zip for the Mac OS X version"> |
455 |
<fail unless="version" message="Please set the property 'version' to correctly sign distribution file" /> |
456 |
|
457 |
<!-- Remove everything from working folder --> |
458 |
<delete dir="macosx/work/Arduino.app" /> |
459 |
|
460 |
<!-- Unzip unsigned app into working dir --> |
461 |
<exec executable="unzip" dir="macosx/work" failonerror="true"> |
462 |
<arg line="../arduino-${version}-${platform}.zip" /> |
463 |
</exec> |
464 |
|
465 |
<!-- Unlock keychain file --> |
466 |
<exec executable="security" dir="macosx/work" failonerror="true"> |
467 |
<arg line="unlock-keychain -p "${macosx-sign-keychain-pass}" "${macosx-sign-keychain}"" /> |
468 |
</exec> |
469 |
|
470 |
<!-- Sign app --> |
471 |
<exec executable="codesign" dir="macosx/work" failonerror="true"> |
472 |
<arg line="--keychain "${macosx-sign-keychain}" --force -s "${macosx-sign-id}" --deep -v Arduino.app/" /> |
473 |
</exec> |
474 |
|
475 |
<!-- Check for successful signing --> |
476 |
<exec executable="codesign" dir="macosx/work" failonerror="true"> |
477 |
<arg line="-vvvv Arduino.app/" /> |
478 |
</exec> |
479 |
|
480 |
<delete file="macosx/arduino-${version}-${platform}.zip" /> |
481 |
|
482 |
<!-- Create signed zip file --> |
483 |
<exec executable="zip" dir="macosx/work" failonerror="true"> |
484 |
<arg line="-q -r ../arduino-${version}-${platform}-signed.zip ." /> |
485 |
</exec> |
486 |
|
487 |
<echo> |
488 |
======================================================= |
489 |
Arduino for Mac OS X built and signed. |
490 |
|
491 |
macosx/arduino-${version}-${platform}-signed.zip |
492 |
======================================================= |
493 |
</echo> |
494 |
</target> |
495 |
|
496 |
<target name="macosx-singed-dist-check"> |
497 |
<fail unless="macosx-sign-keychain" message="Please set the property 'macosx-sign-keychain' to the correct keychain file" /> |
498 |
<fail unless="macosx-sign-keychain-pass" message="Please set the property 'macosx-sign-keychain-pass' with the password to unlock the keychain" /> |
499 |
<fail unless="macosx-sign-id" message="Please set the property 'macosx-sign-id' to the correct cert identifier" /> |
500 |
</target> |
501 |
|
502 |
<!-- - - - - - - - - - - - - - - - - - - --> |
503 |
<!-- Build distribution file for MacOSX. --> |
504 |
<!-- - - - - - - - - - - - - - - - - - - --> |
505 |
<target name="macosx-old-dist" if="macosx" depends="macosx-old-build" description="Create a downloadable .zip for the Mac OS X version"> |
506 |
<antcall target="macosx-dist-common"/> |
507 |
</target> |
508 |
|
509 |
<target name="macosx-dist" if="macosx" depends="build" description="Create a downloadable .zip for the Mac OS X version"> |
510 |
<antcall target="macosx-dist-common"/> |
511 |
</target> |
512 |
|
513 |
<target name="macosx-dist-common"> |
514 |
<exec executable="zip" dir="macosx/work" failonerror="true"> |
515 |
<arg line="-q -r ../arduino-${version}-${platform}.zip ." /> |
516 |
</exec> |
517 |
|
518 |
<echo> |
519 |
======================================================= |
520 |
Arduino for Mac OS X was built. Grab the image from |
521 |
|
522 |
macosx/arduino-${version}-${platform}.zip |
523 |
======================================================= |
524 |
</echo> |
525 |
</target> |
526 |
|
527 |
<!--<target name="macosx-dist-old" if="macosx" depends="macosx-build" description="Create a .dmg of the Mac OS X version">--> |
528 |
<!--<!– now build the dmg –>--> |
529 |
<!--<gunzip src="macosx/template.dmg.gz" dest="macosx/working.dmg" />--> |
530 |
|
531 |
<!--<mkdir dir="macosx/working_dir" />--> |
532 |
<!--<exec executable="hdiutil">--> |
533 |
<!--<arg line="attach macosx/working.dmg -noautoopen -mountpoint macosx/working_dir" />--> |
534 |
<!--<!–<arg line="attach macosx/working.dmg -noautoopen -quiet -mountpoint macosx/working_dir" />–>--> |
535 |
<!--</exec>--> |
536 |
|
537 |
<!--<copy todir="macosx/working_dir">--> |
538 |
<!--<fileset dir="macosx/work" />--> |
539 |
<!--</copy>--> |
540 |
|
541 |
<!--<!– The ant copy command does not preserve permissions. –>--> |
542 |
<!--<chmod file="macosx/working_dir/Arduino.app/Contents/MacOS/JavaApplicationStub" perm="+x" />--> |
543 |
<!--<chmod perm="+x">--> |
544 |
<!--<fileset dir="macosx/working_dir/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin" includes="**/*" />--> |
545 |
<!--<fileset dir="macosx/working_dir/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr/bin" includes="**/*" />--> |
546 |
<!--<fileset dir="macosx/working_dir/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr-3/bin" includes="**/*" />--> |
547 |
<!--<fileset dir="macosx/working_dir/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr-4/bin" includes="**/*" />--> |
548 |
<!--<fileset dir="macosx/working_dir/Arduino.app/Contents/Resources/Java/hardware/tools/avr/libexec/gcc/avr/3.4.6/" includes="**/cc1*" />--> |
549 |
<!--<fileset dir="macosx/working_dir/Arduino.app/Contents/Resources/Java/hardware/tools/avr/libexec/gcc/avr/4.3.2/" includes="**/cc1*" />--> |
550 |
<!--</chmod>--> |
551 |
|
552 |
<!--<!– Pause briefly for the OS to catch up with the DMG changes. --> |
553 |
<!--This prevents "hdiutil: couldn't eject "disk3" - Resource busy"--> |
554 |
<!--errors when ejecting the disk in the next step.--> |
555 |
<!--You may need to set this value higher for your system. –>--> |
556 |
<!--<sleep seconds="3" />--> |
557 |
|
558 |
<!--<exec executable="hdiutil">--> |
559 |
<!--<!–<arg line="detach macosx/working_dir -quiet -force" />–>--> |
560 |
<!--<arg line="detach macosx/working_dir" />--> |
561 |
<!--</exec>--> |
562 |
|
563 |
<!--<delete file="macosx/arduino-*.dmg" />--> |
564 |
<!--<exec executable="hdiutil">--> |
565 |
<!--<arg line="convert macosx/working.dmg -quiet -format UDZO -imagekey zlib-level=9 -o macosx/arduino-${version}.dmg" />--> |
566 |
<!--</exec>--> |
567 |
|
568 |
<!--<!– Clean up the interim files. –>--> |
569 |
<!--<delete file="macosx/working.dmg" />--> |
570 |
<!--<delete dir="macosx/working_dir" />--> |
571 |
|
572 |
<!--<echo>--> |
573 |
<!--=======================================================--> |
574 |
<!--Arduino for Mac OS X was built. Grab the image from--> |
575 |
|
576 |
<!--macosx/arduino-${version}.dmg--> |
577 |
<!--=======================================================--> |
578 |
<!--</echo>--> |
579 |
<!--</target>--> |
580 |
|
581 |
<!--<target name="macosx-dist-old-fix-perms" unless="light_bundle">--> |
582 |
<!--<chmod perm="+x">--> |
583 |
<!--<fileset dir="macosx/working_dir/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin" includes="**/*" />--> |
584 |
<!--<fileset dir="macosx/working_dir/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr/bin" includes="**/*" />--> |
585 |
<!--<fileset dir="macosx/working_dir/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr-3/bin" includes="**/*" />--> |
586 |
<!--<fileset dir="macosx/working_dir/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr-4/bin" includes="**/*" />--> |
587 |
<!--<fileset dir="macosx/working_dir/Arduino.app/Contents/Resources/Java/hardware/tools/avr/libexec/gcc/avr/3.4.6/" includes="**/cc1*" />--> |
588 |
<!--<fileset dir="macosx/working_dir/Arduino.app/Contents/Resources/Java/hardware/tools/avr/libexec/gcc/avr/4.3.2/" includes="**/cc1*" />--> |
589 |
<!--</chmod>--> |
590 |
<!--</target>--> |
591 |
|
592 |
<!-- - - - - - - - --> |
593 |
<!-- Linux --> |
226 |
<!-- Linux --> |
594 |
<!-- - - - - - - - --> |
227 |
<!-- - - - - - - - --> |
595 |
|
228 |
|
Lines 641-654
Link Here
|
641 |
<copy todir="linux/work" file="linux/dist/arduino" /> |
274 |
<copy todir="linux/work" file="linux/dist/arduino" /> |
642 |
<chmod perm="755" file="linux/work/arduino" /> |
275 |
<chmod perm="755" file="linux/work/arduino" /> |
643 |
|
276 |
|
644 |
<antcall target="unzip"> |
|
|
645 |
<param name="archive_file" value="./libastylej-2.05.zip" /> |
646 |
<param name="archive_url" value="http://downloads.arduino.cc/libastylej-2.05.zip" /> |
647 |
<param name="final_folder" value="${staging_folder}/libastylej" /> |
648 |
<param name="dest_folder" value="${staging_folder}" /> |
649 |
</antcall> |
650 |
<copy file="linux/libastylej/libastylej${arch-bits}.so" tofile="linux/work/lib/libastylej.so" /> |
651 |
<chmod perm="755" file="linux/work/lib/libastylej.so" /> |
652 |
</target> |
277 |
</target> |
653 |
|
278 |
|
654 |
<target name="linux32-build" depends="linux-build" description="Build linux (32-bit) version"> |
279 |
<target name="linux32-build" depends="linux-build" description="Build linux (32-bit) version"> |
Lines 656-669
Link Here
|
656 |
<param name="JVM" value="${LINUX32_BUNDLED_JVM}"/> |
281 |
<param name="JVM" value="${LINUX32_BUNDLED_JVM}"/> |
657 |
</antcall> |
282 |
</antcall> |
658 |
|
283 |
|
659 |
<antcall target="avr-toolchain-bundle"> |
|
|
660 |
<param name="unpack_target" value="untar"/> |
661 |
<param name="gcc_archive_file" value="avr-gcc-4.8.1-arduino5-i686-pc-linux-gnu.tar.bz2"/> |
662 |
<param name="gcc_version" value="4.8.1-arduino5"/> |
663 |
<param name="avrdude_archive_file" value="avrdude-6.0.1-arduino5-i686-pc-linux-gnu.tar.bz2"/> |
664 |
<param name="avrdude_version" value="6.0.1-arduino5"/> |
665 |
</antcall> |
666 |
|
667 |
<antcall target="package-library-index-json-bundle"/> |
284 |
<antcall target="package-library-index-json-bundle"/> |
668 |
</target> |
285 |
</target> |
669 |
|
286 |
|
Lines 672-685
Link Here
|
672 |
<param name="JVM" value="${LINUX64_BUNDLED_JVM}"/> |
289 |
<param name="JVM" value="${LINUX64_BUNDLED_JVM}"/> |
673 |
</antcall> |
290 |
</antcall> |
674 |
|
291 |
|
675 |
<antcall target="avr-toolchain-bundle"> |
|
|
676 |
<param name="unpack_target" value="untar"/> |
677 |
<param name="gcc_archive_file" value="avr-gcc-4.8.1-arduino5-x86_64-pc-linux-gnu.tar.bz2"/> |
678 |
<param name="gcc_version" value="4.8.1-arduino5"/> |
679 |
<param name="avrdude_archive_file" value="avrdude-6.0.1-arduino5-x86_64-pc-linux-gnu.tar.bz2"/> |
680 |
<param name="avrdude_version" value="6.0.1-arduino5"/> |
681 |
</antcall> |
682 |
|
683 |
<antcall target="package-library-index-json-bundle"/> |
292 |
<antcall target="package-library-index-json-bundle"/> |
684 |
</target> |
293 |
</target> |
685 |
|
294 |
|
Lines 788-956
Link Here
|
788 |
description="Build .tar.xz of linux version" /> |
397 |
description="Build .tar.xz of linux version" /> |
789 |
|
398 |
|
790 |
<!-- - - - - - - - --> |
399 |
<!-- - - - - - - - --> |
791 |
<!-- Windows --> |
|
|
792 |
<!-- - - - - - - - --> |
793 |
|
794 |
<target name="windows-clean" depends="subprojects-clean" |
795 |
description="Clean windows version"> |
796 |
<delete dir="windows/work" /> |
797 |
<delete> |
798 |
<fileset dir="windows" includes="arduino-*windows*.zip"/> |
799 |
</delete> |
800 |
</target> |
801 |
|
802 |
<target name="windows-checkos" unless="windows"> |
803 |
<echo> |
804 |
======================================================= |
805 |
Arduino for Windows can only be built on windows. |
806 |
|
807 |
Bye. |
808 |
======================================================= |
809 |
</echo> |
810 |
|
811 |
<fail message="wrong platform (${os.name})" /> |
812 |
</target> |
813 |
|
814 |
<target name="download-launch4j-windows"> |
815 |
<antcall target="unzip-with-ant-task"> |
816 |
<param name="archive_file" value="windows/launch4j-3.7-win32.zip"/> |
817 |
<param name="archive_url" value="http://downloads.sourceforge.net/project/launch4j/launch4j-3/3.7/launch4j-3.7-win32.zip"/> |
818 |
<param name="final_folder" value="windows/launcher/launch4j"/> |
819 |
<param name="dest_folder" value="windows/launcher/"/> |
820 |
</antcall> |
821 |
</target> |
822 |
|
823 |
<target name="download-launch4j-linux"> |
824 |
<antcall target="untar"> |
825 |
<param name="archive_file" value="windows/launch4j-3.7-linux.tgz"/> |
826 |
<param name="archive_url" value="http://downloads.sourceforge.net/project/launch4j/launch4j-3/3.7/launch4j-3.7-linux.tgz"/> |
827 |
<param name="final_folder" value="windows/launcher/launch4j"/> |
828 |
<param name="dest_folder" value="windows/launcher/"/> |
829 |
</antcall> |
830 |
</target> |
831 |
|
832 |
<target name="windows-build" |
833 |
depends="revision-check, windows-checkos, subprojects-build" |
834 |
description="Build windows version"> |
835 |
<mkdir dir="windows/work" /> |
836 |
<mkdir dir="windows/work/${staging_hardware_folder}" /> |
837 |
|
838 |
<!-- assemble the pde --> |
839 |
<mkdir dir="windows/work/lib" /> |
840 |
<copy todir="windows/work/lib" flatten="true"> |
841 |
<fileset refid="runtime.jars" /> |
842 |
</copy> |
843 |
|
844 |
<copy todir="windows/work"> |
845 |
<fileset dir="shared" includes="lib/**" /> |
846 |
<fileset file="shared/revisions.txt" /> |
847 |
</copy> |
848 |
|
849 |
<fixcrlf file="windows/work/revisions.txt" eol="dos"/> |
850 |
<fixcrlf file="windows/work/lib/formatter.conf" eol="dos"/> |
851 |
|
852 |
<copy todir="windows/work"> |
853 |
<fileset dir="windows/dist" includes="*.dll" /> |
854 |
</copy> |
855 |
|
856 |
<copy todir="windows/work"> |
857 |
<fileset dir="windows/dist" includes="drivers/**" /> |
858 |
</copy> |
859 |
|
860 |
<antcall target="windows-build-avr-toolchain" /> |
861 |
|
862 |
<antcall target="unzip"> |
863 |
<param name="archive_file" value="./libastylej-2.05.zip" /> |
864 |
<param name="archive_url" value="http://downloads.arduino.cc/libastylej-2.05.zip" /> |
865 |
<param name="final_folder" value="${staging_folder}/libastylej" /> |
866 |
<param name="dest_folder" value="${staging_folder}" /> |
867 |
</antcall> |
868 |
<copy file="windows/libastylej/AStylej.dll" todir="windows/work/lib" /> |
869 |
<copy file="windows/msvcp100.dll" todir="windows/work" /> |
870 |
<copy file="windows/msvcr100.dll" todir="windows/work" /> |
871 |
|
872 |
<!-- Copy listComPort.exe tool --> |
873 |
<copy todir="windows/work/hardware/tools"> |
874 |
<fileset file="windows/listComPorts.exe" /> |
875 |
</copy> |
876 |
<chmod perm="755"> |
877 |
<fileset file="windows/work/hardware/tools/listComPorts.exe" /> |
878 |
</chmod> |
879 |
|
880 |
<antcall target="assemble"> |
881 |
<param name="target.path" value="windows/work" /> |
882 |
</antcall> |
883 |
|
884 |
<delete dir="windows/launcher/launch4j"/> |
885 |
<antcall target="download-${launch4j-download-unpack-target-name}" /> |
886 |
|
887 |
<property name="launch4j.dir" value="windows/launcher/launch4j/" /> |
888 |
<taskdef name="launch4j" |
889 |
classname="net.sf.launch4j.ant.Launch4jTask" |
890 |
classpath="${launch4j.dir}/launch4j.jar; ${launch4j.dir}/lib/xstream.jar" /> |
891 |
|
892 |
<copy todir="windows/work"> |
893 |
<fileset dir="windows/launcher" |
894 |
includes="application.ico, config.xml, config_debug.xml, arduino.l4j.ini"/> |
895 |
</copy> |
896 |
<launch4j configFile="windows/work/config.xml" fileVersion="${revision}.0" txtFileVersion="${revision}" productVersion="${revision}.0" txtProductVersion="${revision}"/> |
897 |
<launch4j configFile="windows/work/config_debug.xml" fileVersion="${revision}.0" txtFileVersion="${revision}" productVersion="${revision}.0" txtProductVersion="${revision}"/> |
898 |
<delete dir="windows/work" includes="application.ico, config.xml, config_debug.xml" /> |
899 |
<copy file="windows/work/arduino.l4j.ini" tofile="windows/work/arduino_debug.l4j.ini" /> |
900 |
|
901 |
<!-- cygwin requires html, dll, and exe to have the +x flag --> |
902 |
<chmod perm="755"> |
903 |
<fileset dir="windows/work" includes="**/*.html, **/*.dll, **/*.exe" /> |
904 |
</chmod> |
905 |
|
906 |
<loadproperties srcfile="${WINDOWS_BUNDLED_JVM}/release" prefix="windows"/> |
907 |
|
908 |
<fail message="It looks like ${WINDOWS_BUNDLED_JVM} does not contain a Windows JVM"> |
909 |
<condition> |
910 |
<not> |
911 |
<equals arg1="${windows.OS_NAME}" arg2=""Windows""/> |
912 |
</not> |
913 |
</condition> |
914 |
</fail> |
915 |
|
916 |
<copy todir="${staging_folder}/work/java" includeemptydirs="true" preservelastmodified="true" overwrite="true" failonerror="true"> |
917 |
<fileset dir="${WINDOWS_BUNDLED_JVM}" includes="*/**"/> |
918 |
</copy> |
919 |
</target> |
920 |
|
921 |
<target name="windows-build-avr-toolchain"> |
922 |
<antcall target="avr-toolchain-bundle"> |
923 |
<param name="unpack_target" value="unzip"/> |
924 |
<param name="gcc_archive_file" value="avr-gcc-4.8.1-arduino5-i686-mingw32.zip"/> |
925 |
<param name="gcc_version" value="4.8.1-arduino5"/> |
926 |
<param name="avrdude_archive_file" value="avrdude-6.0.1-arduino5-i686-mingw32.zip"/> |
927 |
<param name="avrdude_version" value="6.0.1-arduino5"/> |
928 |
</antcall> |
929 |
|
930 |
<antcall target="package-library-index-json-bundle"/> |
931 |
</target> |
932 |
|
933 |
<target name="windows-run" depends="build" |
934 |
description="Run windows version"> |
935 |
<exec executable="windows/work/arduino.exe" dir="windows/work" failonerror="true"/> |
936 |
</target> |
937 |
|
938 |
<target name="windows-dist" depends="build" description="Create .zip files of windows version"> |
939 |
<zip destfile="windows/arduino-${version}-${platform}.zip" level="9"> |
940 |
<zipfileset dir="windows/work" prefix="arduino-${version}"/> |
941 |
</zip> |
942 |
|
943 |
<echo> |
944 |
======================================================= |
945 |
Arduino for Windows was built. Grab the archive from |
946 |
|
947 |
windows/arduino-${version}-${platform}.zip |
948 |
======================================================= |
949 |
</echo> |
950 |
</target> |
951 |
|
952 |
|
953 |
<!-- - - - - - - - --> |
954 |
<!-- Source --> |
400 |
<!-- Source --> |
955 |
<!-- - - - - - - - --> |
401 |
<!-- - - - - - - - --> |
956 |
|
402 |
|
Lines 965-972
Link Here
|
965 |
prefix="arduino-${version}" |
411 |
prefix="arduino-${version}" |
966 |
excludes="**/*.tgz, |
412 |
excludes="**/*.tgz, |
967 |
**/*.bz2, |
413 |
**/*.bz2, |
968 |
**/build/macosx/, |
|
|
969 |
**/build/windows/, |
970 |
**/work/, |
414 |
**/work/, |
971 |
**/.git/, |
415 |
**/.git/, |
972 |
**/*.class" |
416 |
**/*.class" |
Lines 988-1022
Link Here
|
988 |
<!-- - - - - - - - --> |
432 |
<!-- - - - - - - - --> |
989 |
|
433 |
|
990 |
<target name="clean" description="Perform a spring cleaning" |
434 |
<target name="clean" description="Perform a spring cleaning" |
991 |
depends="linux-clean, windows-clean, macosx-clean, subprojects-clean"> |
435 |
depends="linux-clean, subprojects-clean"> |
992 |
</target> |
|
|
993 |
|
994 |
<target name="avr-toolchain-bundle" unless="light_bundle"> |
995 |
<!-- Unzip AVR tools --> |
996 |
<mkdir dir="${staging_folder}/work/${staging_hardware_folder}/tmp/gcc"/> |
997 |
|
998 |
<antcall target="${unpack_target}"> |
999 |
<param name="archive_file" value="${staging_folder}/${gcc_archive_file}"/> |
1000 |
<param name="archive_url" value="http://downloads.arduino.cc/tools/${gcc_archive_file}"/> |
1001 |
<param name="final_folder" value="${staging_folder}/work/${staging_hardware_folder}/tmp/gcc/${gcc_version}/"/> |
1002 |
<param name="dest_folder" value="${staging_folder}/work/${staging_hardware_folder}/tmp/gcc/"/> |
1003 |
</antcall> |
1004 |
|
1005 |
<mkdir dir="${staging_folder}/work/${staging_hardware_folder}/tmp/avrdude"/> |
1006 |
|
1007 |
<antcall target="${unpack_target}"> |
1008 |
<param name="archive_file" value="${staging_folder}/${avrdude_archive_file}"/> |
1009 |
<param name="archive_url" value="http://downloads.arduino.cc/tools/${avrdude_archive_file}"/> |
1010 |
<param name="final_folder" value="${staging_folder}/work/${staging_hardware_folder}/tmp/avrdude/${avrdude_version}"/> |
1011 |
<param name="dest_folder" value="${staging_folder}/work/${staging_hardware_folder}/tmp/avrdude/"/> |
1012 |
</antcall> |
1013 |
|
1014 |
<move file="${staging_folder}/work/${staging_hardware_folder}/tmp/gcc/avr" tofile="${staging_folder}/work/${staging_hardware_folder}/tools/avr"/> |
1015 |
<move file="${staging_folder}/work/${staging_hardware_folder}/tmp/avrdude/avrdude-6.0.1" tofile="${staging_folder}/work/${staging_hardware_folder}/tools/avr"/> |
1016 |
<antcall target="macosx-fix-bundled-toolchain-missing-symlinks"/> |
1017 |
|
1018 |
<echo append="true" file="${staging_folder}/work/${staging_hardware_folder}/tools/avr/builtin_tools_versions.txt" message="arduino.avrdude=${avrdude_version}${line.separator}"/> |
1019 |
<echo append="true" file="${staging_folder}/work/${staging_hardware_folder}/tools/avr/builtin_tools_versions.txt" message="arduino.avr-gcc=${gcc_version}${line.separator}"/> |
1020 |
</target> |
436 |
</target> |
1021 |
|
437 |
|
1022 |
<target name="package-library-index-json-bundle"> |
438 |
<target name="package-library-index-json-bundle"> |
Lines 1035-1051
Link Here
|
1035 |
<delete dir="${staging_folder}/work/${staging_hardware_folder}/tmp"/> |
451 |
<delete dir="${staging_folder}/work/${staging_hardware_folder}/tmp"/> |
1036 |
</target> |
452 |
</target> |
1037 |
|
453 |
|
1038 |
<target name="macosx-fix-bundled-toolchain-missing-symlinks" if="macosx"> |
|
|
1039 |
<exec executable="mv" failonerror="true"> |
1040 |
<arg value="${staging_folder}/work/${staging_hardware_folder}/tmp/avrdude/avrdude-6.0.1/lib/libusb.dylib"/> |
1041 |
<arg value="${staging_folder}/work/${staging_hardware_folder}/tools/avr/lib/"/> |
1042 |
</exec> |
1043 |
<exec executable="mv" failonerror="true"> |
1044 |
<arg value="${staging_folder}/work/${staging_hardware_folder}/tmp/avrdude/avrdude-6.0.1/lib/libusb-1.0.dylib"/> |
1045 |
<arg value="${staging_folder}/work/${staging_hardware_folder}/tools/avr/lib/"/> |
1046 |
</exec> |
1047 |
</target> |
1048 |
|
1049 |
<target name="generate-hourly-build-txt" if="hourly"> |
454 |
<target name="generate-hourly-build-txt" if="hourly"> |
1050 |
<echo file="${staging_folder}/work/${staging_hardware_folder}/../lib/hourlyBuild.txt">${BUILD_DATE}</echo> |
455 |
<echo file="${staging_folder}/work/${staging_hardware_folder}/../lib/hourlyBuild.txt">${BUILD_DATE}</echo> |
1051 |
</target> |
456 |
</target> |