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="macosx-old"><equals arg1="${platform}" arg2="macosx-old" /></condition> |
19 |
<fail if="macosx-old" message="MacOSX older than 10.7 are not supported"/> |
20 |
|
21 |
<condition property="platform" value="macosx"><os family="mac" /></condition> |
22 |
<condition property="platform" value="windows"><os family="windows" /></condition> |
23 |
<condition property="platform" value="linux32"><os family="unix" arch="i386" /></condition> |
12 |
<condition property="platform" value="linux32"><os family="unix" arch="i386" /></condition> |
24 |
<condition property="platform" value="linux64"><os family="unix" arch="amd64" /></condition> |
13 |
<condition property="platform" value="linux64"><os family="unix" arch="amd64" /></condition> |
25 |
|
14 |
|
26 |
<condition property="macosx"><equals arg1="${platform}" arg2="macosx" /></condition> |
|
|
27 |
<condition property="windows"><equals arg1="${platform}" arg2="windows" /></condition> |
28 |
<condition property="linux32"><equals arg1="${platform}" arg2="linux32" /></condition> |
15 |
<condition property="linux32"><equals arg1="${platform}" arg2="linux32" /></condition> |
29 |
<condition property="linux64"><equals arg1="${platform}" arg2="linux64" /></condition> |
16 |
<condition property="linux64"><equals arg1="${platform}" arg2="linux64" /></condition> |
30 |
<condition property="linux"><equals arg1="${platform}" arg2="linux32" /></condition> |
17 |
<condition property="linux"><equals arg1="${platform}" arg2="linux32" /></condition> |
31 |
<condition property="linux"><equals arg1="${platform}" arg2="linux64" /></condition> |
18 |
<condition property="linux"><equals arg1="${platform}" arg2="linux64" /></condition> |
32 |
|
19 |
|
33 |
<condition property="staging_folder" value="macosx"><equals arg1="${platform}" arg2="macosx" /></condition> |
|
|
34 |
<condition property="staging_folder" value="windows"><equals arg1="${platform}" arg2="windows" /></condition> |
35 |
<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> |
36 |
<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> |
37 |
|
22 |
|
38 |
<condition property="staging_hardware_folder" value="Arduino.app/Contents/Java/hardware"><equals arg1="${platform}" arg2="macosx" /></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-53
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}/../"/> |
35 |
<property name="MACOSX_BUNDLED_JVM" value="${java.home}/../"/> |
Lines 259-504
Link Here
|
259 |
</target> |
241 |
</target> |
260 |
|
242 |
|
261 |
<!-- - - - - - - - --> |
243 |
<!-- - - - - - - - --> |
262 |
<!-- Mac OS X --> |
|
|
263 |
<!-- - - - - - - - --> |
264 |
<target name="macosx-clean" depends="subprojects-clean" description="Clean Mac OS X build"> |
265 |
<delete dir="macosx/work" /> |
266 |
<delete dir="macosx/working_dir" /> |
267 |
<delete dir="macosx/working.dmg" /> |
268 |
<delete file="macosx/arduino-*.dmg" /> |
269 |
<delete> |
270 |
<fileset dir="macosx" includes="arduino-*macosx*.zip"/> |
271 |
</delete> |
272 |
</target> |
273 |
|
274 |
<target name="macosx-checkos" unless="macosx"> |
275 |
<echo> |
276 |
======================================================= |
277 |
Arduino for Mac OS X can only be built on Mac OS X. |
278 |
|
279 |
Bye. |
280 |
======================================================= |
281 |
</echo> |
282 |
<fail message="wrong platform (${os.name})" /> |
283 |
</target> |
284 |
|
285 |
<target name="macosx-build" if="macosx" depends="revision-check, macosx-checkos, subprojects-build" description="Build Mac OS X version"> |
286 |
<fail unless="MACOSX_BUNDLED_JVM" message="MacOSX requires MACOSX_BUNDLED_JVM property set"/> |
287 |
<mkdir dir="${staging_folder}/work" /> |
288 |
|
289 |
<antcall target="unzip"> |
290 |
<param name="archive_file" value="${staging_folder}/appbundler-1.0ea-arduino4.jar.zip" /> |
291 |
<param name="archive_url" value="http://downloads.arduino.cc/appbundler-1.0ea-arduino4.jar.zip" /> |
292 |
<param name="final_folder" value="${staging_folder}/appbundler-1.0ea-arduino4" /> |
293 |
<param name="dest_folder" value="${staging_folder}/appbundler-1.0ea-arduino4" /> |
294 |
</antcall> |
295 |
|
296 |
<taskdef name="bundleapp" classname="com.oracle.appbundler.AppBundlerTask" classpath="${staging_folder}/appbundler-1.0ea-arduino4/appbundler-1.0ea-arduino4.jar"/> |
297 |
|
298 |
<bundleapp |
299 |
jvmRequired="1.8" |
300 |
jrepreferred="true" |
301 |
outputdirectory="${staging_folder}/work" |
302 |
name="Arduino" |
303 |
displayname="Arduino" |
304 |
executablename="Arduino" |
305 |
identifier="cc.arduino.Arduino" |
306 |
shortversion="${version}" |
307 |
version="${revision}" |
308 |
signature="Pde1" |
309 |
icon="macosx/processing.icns" |
310 |
mainclassname="processing.app.Base" |
311 |
copyright="Arduino LLC" |
312 |
applicationCategory="public.app-category.education" |
313 |
minimumsystemversion="10.7" |
314 |
highresolutioncapable="true"> |
315 |
|
316 |
<runtime dir="${MACOSX_BUNDLED_JVM}"/> |
317 |
|
318 |
<arch name="x86_64"/> |
319 |
<arch name="i386"/> |
320 |
|
321 |
<classpath refid="runtime.jars"/> |
322 |
|
323 |
<option value="-Dapple.awt.application.name=Arduino"/> |
324 |
<option value="-Dapple.laf.useScreenMenuBar=true"/> |
325 |
<option value="-Dcom.apple.macos.use-file-dialog-packages=true"/> |
326 |
<option value="-Dcom.apple.smallTabs=true"/> |
327 |
<option value="-Dcom.apple.macos.useScreenMenuBar=true"/> |
328 |
<option value="-DAPP_DIR=$APP_ROOT/Contents/Java"/> |
329 |
<option value="-Djava.ext.dirs=$JVM_RUNTIME/Contents/Home/lib/ext/:$JVM_RUNTIME/Contents/Home/jre/lib/ext/"/> |
330 |
|
331 |
<!-- |
332 |
<option value="-Dapple.awt.showGrowBox=false"/> |
333 |
<option value="-Dapple.awt.Antialiasing=false"/> |
334 |
<option value="-Dapple.awt.TextAntialiasing=true"/> |
335 |
<option value="-Dcom.apple.hwaccel=true"/> |
336 |
<option value="-Dapple.awt.graphics.UseQuartz=true"/> |
337 |
--> |
338 |
|
339 |
<!--<option value="-Dcom.apple.macos.useScreenMenuBar=true"/>--> |
340 |
|
341 |
<!-- Workaround since the icon parameter for bundleapp doesn't work --> |
342 |
<option value="-Xdock:name=Arduino"/> |
343 |
<option value="-Dcom.apple.mrj.application.apple.menu.about.name=Arduino"/> |
344 |
<option value="-Dfile.encoding=UTF-8"/> |
345 |
|
346 |
<option value="-Xms128M"/> |
347 |
<option value="-Xmx512M"/> |
348 |
<option value="-splash:$APP_ROOT/Contents/Java/lib/splash.png"/> |
349 |
|
350 |
<bundledocument extensions="ino,c,cpp,h" |
351 |
icon="macosx/pde.icns" |
352 |
name="Arduino Source File" |
353 |
role="Editor" ispackage="false"> |
354 |
</bundledocument> |
355 |
|
356 |
</bundleapp> |
357 |
|
358 |
<mkdir dir="${staging_folder}/work/${staging_hardware_folder}" /> |
359 |
|
360 |
<copy todir="${staging_folder}/work/${staging_hardware_folder}/../"> |
361 |
<fileset dir="shared" includes="lib/**" /> |
362 |
<fileset file="shared/revisions.txt" /> |
363 |
</copy> |
364 |
|
365 |
<mkdir dir="${staging_folder}/work" /> |
366 |
<mkdir dir="${staging_folder}/work/${staging_hardware_folder}" /> |
367 |
|
368 |
<antcall target="macosx-build-avr-toolchain" /> |
369 |
|
370 |
<antcall target="package-library-index-json-bundle"/> |
371 |
|
372 |
<antcall target="assemble"> |
373 |
<param name="target.path" value="${staging_folder}/work/${staging_hardware_folder}/.." /> |
374 |
</antcall> |
375 |
|
376 |
<antcall target="unzip"> |
377 |
<param name="archive_file" value="./libastylej-2.05.1.zip" /> |
378 |
<param name="archive_url" value="http://downloads.arduino.cc/libastylej-2.05.1.zip" /> |
379 |
<param name="final_folder" value="${staging_folder}/libastylej-2.05.1" /> |
380 |
<param name="dest_folder" value="${staging_folder}" /> |
381 |
</antcall> |
382 |
<copy file="macosx/libastylej-2.05.1/libastylej.jnilib" todir="macosx/work/${staging_hardware_folder}/../lib/" /> |
383 |
<chmod perm="755" file="macosx/work/${staging_hardware_folder}/../lib/libastylej.jnilib" /> |
384 |
<copy file="macosx/libastylej-2.05.1/libastylej.jnilib" tofile="macosx/work/${staging_hardware_folder}/../lib/libastylej.dylib" /> |
385 |
<chmod perm="755" file="macosx/work/${staging_hardware_folder}/../lib/libastylej.dylib" /> |
386 |
|
387 |
<delete dir="${staging_folder}/arduino-builder-macosx" includeemptydirs="true"/> |
388 |
<mkdir dir="${staging_folder}/arduino-builder-macosx"/> |
389 |
<antcall target="untar"> |
390 |
<param name="archive_file" value="./arduino-builder-macosx-${ARDUINO-BUILDER-VERSION}.tar.bz2" /> |
391 |
<param name="archive_url" value="http://downloads.arduino.cc/tools/arduino-builder-macosx-${ARDUINO-BUILDER-VERSION}.tar.bz2" /> |
392 |
<param name="final_folder" value="${staging_folder}/arduino-builder-macosx/arduino-builder" /> |
393 |
<param name="dest_folder" value="${staging_folder}/arduino-builder-macosx" /> |
394 |
</antcall> |
395 |
<copy file="${staging_folder}/arduino-builder-macosx/arduino-builder" tofile="macosx/work/${staging_hardware_folder}/../arduino-builder" /> |
396 |
<chmod perm="755" file="macosx/work/${staging_hardware_folder}/../arduino-builder" /> |
397 |
<move file="${staging_folder}/arduino-builder-macosx/tools" tofile="macosx/work/${staging_hardware_folder}/../tools-builder"/> |
398 |
<copy todir="macosx/work/${staging_hardware_folder}" overwrite="true"> |
399 |
<fileset dir="${staging_folder}/arduino-builder-macosx/hardware" includes="*.txt"/> |
400 |
</copy> |
401 |
<delete dir="${staging_folder}/arduino-builder-macosx" includeemptydirs="true"/> |
402 |
|
403 |
</target> |
404 |
|
405 |
<!-- Unzip AVR tools --> |
406 |
<target name="macosx-build-avr-toolchain" unless="light_bundle"> |
407 |
<antcall target="avr-toolchain-bundle"> |
408 |
<param name="unpack_target" value="untar"/> |
409 |
<param name="gcc_archive_file" value="avr-gcc-4.8.1-arduino5-i386-apple-darwin11.tar.bz2"/> |
410 |
<param name="gcc_version" value="4.8.1-arduino5"/> |
411 |
<param name="avrdude_archive_file" value="avrdude-6.0.1-arduino5-r2-i386-apple-darwin11.tar.bz2"/> |
412 |
<param name="avrdude_version" value="6.0.1-arduino5"/> |
413 |
</antcall> |
414 |
|
415 |
<chmod perm="+x"> |
416 |
<fileset dir="${staging_folder}/work/${staging_hardware_folder}/tools" includes="**/bin/*"/> |
417 |
<fileset dir="${staging_folder}/work/${staging_hardware_folder}/tools" includes="**/libexec/gcc/avr/4.8.1/*"/> |
418 |
</chmod> |
419 |
|
420 |
<!-- macosx gatekeeper workaround. See https://github.com/arduino/Arduino/issues/3468 --> |
421 |
<chmod perm="-x"> |
422 |
<fileset dir="${staging_folder}/work/${staging_hardware_folder}/tools" includes="**/bin/avrdude_bin" /> |
423 |
</chmod> |
424 |
</target> |
425 |
|
426 |
<target name="macosx-run" depends="build,start"/> |
427 |
|
428 |
<target name="macosx-start"> |
429 |
<exec executable="macosx/work/Arduino.app/Contents/MacOS/Arduino" spawn="false" failonerror="true"/> |
430 |
</target> |
431 |
|
432 |
<!-- - - - - - - - - - - - - - - - --> |
433 |
<!-- Sign application for MacOSX. --> |
434 |
<!-- - - - - - - - - - - - - - - - --> |
435 |
<target name="macosx-signed-dist" if="macosx" depends="macosx-singed-dist-check, dist" |
436 |
description="Create a downloadable and signed .zip for the Mac OS X version"> |
437 |
<fail unless="version" message="Please set the property 'version' to correctly sign distribution file" /> |
438 |
|
439 |
<!-- Remove everything from working folder --> |
440 |
<delete dir="macosx/work/Arduino.app" /> |
441 |
|
442 |
<!-- Unzip unsigned app into working dir --> |
443 |
<exec executable="unzip" dir="macosx/work" failonerror="true"> |
444 |
<arg line="../arduino-${version}-${platform}.zip" /> |
445 |
</exec> |
446 |
|
447 |
<!-- Unlock keychain file --> |
448 |
<exec executable="security" dir="macosx/work" failonerror="true"> |
449 |
<arg line="unlock-keychain -p "${macosx-sign-keychain-pass}" "${macosx-sign-keychain}"" /> |
450 |
</exec> |
451 |
|
452 |
<!-- Sign app --> |
453 |
<exec executable="codesign" dir="macosx/work" failonerror="true"> |
454 |
<arg line="--keychain "${macosx-sign-keychain}" --force -s "${macosx-sign-id}" --deep -v Arduino.app/" /> |
455 |
</exec> |
456 |
|
457 |
<!-- Check for successful signing --> |
458 |
<exec executable="codesign" dir="macosx/work" failonerror="true"> |
459 |
<arg line="-vvvv Arduino.app/" /> |
460 |
</exec> |
461 |
|
462 |
<delete file="macosx/arduino-${version}-${platform}.zip" /> |
463 |
|
464 |
<!-- Create signed zip file --> |
465 |
<exec executable="zip" dir="macosx/work" failonerror="true"> |
466 |
<arg line="-q -r ../arduino-${version}-${platform}-signed.zip ." /> |
467 |
</exec> |
468 |
|
469 |
<echo> |
470 |
======================================================= |
471 |
Arduino for Mac OS X built and signed. |
472 |
|
473 |
macosx/arduino-${version}-${platform}-signed.zip |
474 |
======================================================= |
475 |
</echo> |
476 |
</target> |
477 |
|
478 |
<target name="macosx-singed-dist-check"> |
479 |
<fail unless="macosx-sign-keychain" message="Please set the property 'macosx-sign-keychain' to the correct keychain file" /> |
480 |
<fail unless="macosx-sign-keychain-pass" message="Please set the property 'macosx-sign-keychain-pass' with the password to unlock the keychain" /> |
481 |
<fail unless="macosx-sign-id" message="Please set the property 'macosx-sign-id' to the correct cert identifier" /> |
482 |
</target> |
483 |
|
484 |
<!-- - - - - - - - - - - - - - - - - - - --> |
485 |
<!-- Build distribution file for MacOSX. --> |
486 |
<!-- - - - - - - - - - - - - - - - - - - --> |
487 |
<target name="macosx-dist" if="macosx" depends="build" description="Create a downloadable .zip for the Mac OS X version"> |
488 |
<exec executable="zip" dir="macosx/work" failonerror="true"> |
489 |
<arg line="-q -r ../arduino-${version}-${platform}.zip ." /> |
490 |
</exec> |
491 |
|
492 |
<echo> |
493 |
======================================================= |
494 |
Arduino for Mac OS X was built. Grab the image from |
495 |
|
496 |
macosx/arduino-${version}-${platform}.zip |
497 |
======================================================= |
498 |
</echo> |
499 |
</target> |
500 |
|
501 |
<!-- - - - - - - - --> |
502 |
<!-- Linux --> |
244 |
<!-- Linux --> |
503 |
<!-- - - - - - - - --> |
245 |
<!-- - - - - - - - --> |
504 |
|
246 |
|
Lines 584-597
Link Here
|
584 |
</copy> |
326 |
</copy> |
585 |
<delete dir="${staging_folder}/arduino-builder-linux32" includeemptydirs="true"/> |
327 |
<delete dir="${staging_folder}/arduino-builder-linux32" includeemptydirs="true"/> |
586 |
|
328 |
|
587 |
<antcall target="avr-toolchain-bundle"> |
|
|
588 |
<param name="unpack_target" value="untar"/> |
589 |
<param name="gcc_archive_file" value="avr-gcc-4.8.1-arduino5-i686-pc-linux-gnu.tar.bz2"/> |
590 |
<param name="gcc_version" value="4.8.1-arduino5"/> |
591 |
<param name="avrdude_archive_file" value="avrdude-6.0.1-arduino5-i686-pc-linux-gnu.tar.bz2"/> |
592 |
<param name="avrdude_version" value="6.0.1-arduino5"/> |
593 |
</antcall> |
594 |
|
595 |
<antcall target="package-library-index-json-bundle"/> |
329 |
<antcall target="package-library-index-json-bundle"/> |
596 |
</target> |
330 |
</target> |
597 |
|
331 |
|
Lines 616-629
Link Here
|
616 |
</copy> |
350 |
</copy> |
617 |
<delete dir="${staging_folder}/arduino-builder-linux64" includeemptydirs="true"/> |
351 |
<delete dir="${staging_folder}/arduino-builder-linux64" includeemptydirs="true"/> |
618 |
|
352 |
|
619 |
<antcall target="avr-toolchain-bundle"> |
|
|
620 |
<param name="unpack_target" value="untar"/> |
621 |
<param name="gcc_archive_file" value="avr-gcc-4.8.1-arduino5-x86_64-pc-linux-gnu.tar.bz2"/> |
622 |
<param name="gcc_version" value="4.8.1-arduino5"/> |
623 |
<param name="avrdude_archive_file" value="avrdude-6.0.1-arduino5-x86_64-pc-linux-gnu.tar.bz2"/> |
624 |
<param name="avrdude_version" value="6.0.1-arduino5"/> |
625 |
</antcall> |
626 |
|
627 |
<antcall target="package-library-index-json-bundle"/> |
353 |
<antcall target="package-library-index-json-bundle"/> |
628 |
</target> |
354 |
</target> |
629 |
|
355 |
|
Lines 736-924
Link Here
|
736 |
description="Build .tar.xz of linux version" /> |
462 |
description="Build .tar.xz of linux version" /> |
737 |
|
463 |
|
738 |
<!-- - - - - - - - --> |
464 |
<!-- - - - - - - - --> |
739 |
<!-- Windows --> |
|
|
740 |
<!-- - - - - - - - --> |
741 |
|
742 |
<target name="windows-clean" depends="subprojects-clean" |
743 |
description="Clean windows version"> |
744 |
<delete dir="windows/work" /> |
745 |
<delete> |
746 |
<fileset dir="windows" includes="arduino-*windows*.zip"/> |
747 |
</delete> |
748 |
</target> |
749 |
|
750 |
<target name="windows-checkos" unless="windows"> |
751 |
<echo> |
752 |
======================================================= |
753 |
Arduino for Windows can only be built on windows. |
754 |
|
755 |
Bye. |
756 |
======================================================= |
757 |
</echo> |
758 |
|
759 |
<fail message="wrong platform (${os.name})" /> |
760 |
</target> |
761 |
|
762 |
<target name="download-launch4j-windows"> |
763 |
<antcall target="unzip-with-ant-task"> |
764 |
<param name="archive_file" value="windows/launch4j-3.7-win32.zip"/> |
765 |
<param name="archive_url" value="http://downloads.sourceforge.net/project/launch4j/launch4j-3/3.7/launch4j-3.7-win32.zip"/> |
766 |
<param name="final_folder" value="windows/launcher/launch4j"/> |
767 |
<param name="dest_folder" value="windows/launcher/"/> |
768 |
</antcall> |
769 |
</target> |
770 |
|
771 |
<target name="download-launch4j-linux"> |
772 |
<antcall target="untar"> |
773 |
<param name="archive_file" value="windows/launch4j-3.7-linux.tgz"/> |
774 |
<param name="archive_url" value="http://downloads.sourceforge.net/project/launch4j/launch4j-3/3.7/launch4j-3.7-linux.tgz"/> |
775 |
<param name="final_folder" value="windows/launcher/launch4j"/> |
776 |
<param name="dest_folder" value="windows/launcher/"/> |
777 |
</antcall> |
778 |
</target> |
779 |
|
780 |
<target name="windows-build" |
781 |
depends="revision-check, windows-checkos, subprojects-build" |
782 |
description="Build windows version"> |
783 |
<mkdir dir="windows/work" /> |
784 |
<mkdir dir="windows/work/${staging_hardware_folder}" /> |
785 |
|
786 |
<!-- assemble the pde --> |
787 |
<mkdir dir="windows/work/lib" /> |
788 |
<copy todir="windows/work/lib" flatten="true"> |
789 |
<fileset refid="runtime.jars" /> |
790 |
</copy> |
791 |
|
792 |
<copy todir="windows/work"> |
793 |
<fileset dir="shared" includes="lib/**" /> |
794 |
<fileset file="shared/revisions.txt" /> |
795 |
</copy> |
796 |
|
797 |
<fixcrlf file="windows/work/revisions.txt" eol="dos"/> |
798 |
<fixcrlf file="windows/work/lib/formatter.conf" eol="dos"/> |
799 |
|
800 |
<copy todir="windows/work"> |
801 |
<fileset dir="windows/dist" includes="*.dll" /> |
802 |
</copy> |
803 |
|
804 |
<copy todir="windows/work"> |
805 |
<fileset dir="windows/dist" includes="drivers/**" /> |
806 |
</copy> |
807 |
|
808 |
<antcall target="windows-build-avr-toolchain" /> |
809 |
|
810 |
<antcall target="unzip"> |
811 |
<param name="archive_file" value="./libastylej-2.05.1.zip" /> |
812 |
<param name="archive_url" value="http://downloads.arduino.cc/libastylej-2.05.1.zip" /> |
813 |
<param name="final_folder" value="${staging_folder}/libastylej-2.05.1" /> |
814 |
<param name="dest_folder" value="${staging_folder}" /> |
815 |
</antcall> |
816 |
<copy file="windows/libastylej-2.05.1/AStylej.dll" todir="windows/work/lib" /> |
817 |
<copy file="windows/msvcp100.dll" todir="windows/work" /> |
818 |
<copy file="windows/msvcr100.dll" todir="windows/work" /> |
819 |
|
820 |
<!-- Copy listComPort.exe tool --> |
821 |
<copy todir="windows/work/hardware/tools"> |
822 |
<fileset file="windows/listComPorts.exe" /> |
823 |
</copy> |
824 |
<chmod perm="755"> |
825 |
<fileset file="windows/work/hardware/tools/listComPorts.exe" /> |
826 |
</chmod> |
827 |
|
828 |
<delete dir="${staging_folder}/arduino-builder-windows" includeemptydirs="true"/> |
829 |
<mkdir dir="${staging_folder}/arduino-builder-windows"/> |
830 |
<antcall target="unzip-with-ant-task"> |
831 |
<param name="archive_file" value="./arduino-builder-windows-${ARDUINO-BUILDER-VERSION}.zip" /> |
832 |
<param name="archive_url" value="http://downloads.arduino.cc/tools/arduino-builder-windows-${ARDUINO-BUILDER-VERSION}.zip" /> |
833 |
<param name="final_folder" value="${staging_folder}/arduino-builder-windows/arduino-builder.exe" /> |
834 |
<param name="dest_folder" value="${staging_folder}/arduino-builder-windows" /> |
835 |
</antcall> |
836 |
<copy file="${staging_folder}/arduino-builder-windows/arduino-builder.exe" tofile="windows/work/arduino-builder.exe" /> |
837 |
<chmod perm="755" file="windows/work/arduino-builder.exe" /> |
838 |
<move file="${staging_folder}/arduino-builder-windows/tools" tofile="windows/work/tools-builder"/> |
839 |
<chmod perm="755" file="windows/work/tools-builder/ctags/5.8-arduino2/ctags.exe" /> |
840 |
<copy todir="windows/work/hardware" overwrite="true"> |
841 |
<fileset dir="${staging_folder}/arduino-builder-windows/hardware" includes="*.txt"/> |
842 |
</copy> |
843 |
<delete dir="${staging_folder}/arduino-builder-windows" includeemptydirs="true"/> |
844 |
|
845 |
<antcall target="assemble"> |
846 |
<param name="target.path" value="windows/work" /> |
847 |
</antcall> |
848 |
|
849 |
<delete dir="windows/launcher/launch4j"/> |
850 |
<antcall target="download-${launch4j-download-unpack-target-name}" /> |
851 |
|
852 |
<property name="launch4j.dir" value="windows/launcher/launch4j/" /> |
853 |
<taskdef name="launch4j" |
854 |
classname="net.sf.launch4j.ant.Launch4jTask" |
855 |
classpath="${launch4j.dir}/launch4j.jar; ${launch4j.dir}/lib/xstream.jar" /> |
856 |
|
857 |
<copy todir="windows/work"> |
858 |
<fileset dir="windows/launcher" |
859 |
includes="application.ico, config.xml, config_debug.xml, arduino.l4j.ini"/> |
860 |
</copy> |
861 |
<launch4j configFile="windows/work/config.xml" fileVersion="${revision}.0" txtFileVersion="${revision}" productVersion="${revision}.0" txtProductVersion="${revision}"/> |
862 |
<launch4j configFile="windows/work/config_debug.xml" fileVersion="${revision}.0" txtFileVersion="${revision}" productVersion="${revision}.0" txtProductVersion="${revision}"/> |
863 |
<delete dir="windows/work" includes="application.ico, config.xml, config_debug.xml" /> |
864 |
<copy file="windows/work/arduino.l4j.ini" tofile="windows/work/arduino_debug.l4j.ini" /> |
865 |
|
866 |
<!-- cygwin requires html, dll, and exe to have the +x flag --> |
867 |
<chmod perm="755"> |
868 |
<fileset dir="windows/work" includes="**/*.html, **/*.dll, **/*.exe" /> |
869 |
</chmod> |
870 |
|
871 |
<!-- For JVM within JDK, release file is in parent directory --> |
872 |
<property file="${WINDOWS_BUNDLED_JVM}/release" prefix="windows"/> |
873 |
<property file="${WINDOWS_BUNDLED_JVM}/../release" prefix="windows"/> |
874 |
|
875 |
<fail message="It looks like ${WINDOWS_BUNDLED_JVM} does not contain a Windows JVM"> |
876 |
<condition> |
877 |
<not> |
878 |
<equals arg1="${windows.OS_NAME}" arg2=""Windows""/> |
879 |
</not> |
880 |
</condition> |
881 |
</fail> |
882 |
|
883 |
<copy todir="${staging_folder}/work/java" includeemptydirs="true" preservelastmodified="true" overwrite="true" failonerror="true"> |
884 |
<fileset dir="${WINDOWS_BUNDLED_JVM}" includes="*/**"/> |
885 |
</copy> |
886 |
</target> |
887 |
|
888 |
<target name="windows-build-avr-toolchain"> |
889 |
<antcall target="avr-toolchain-bundle"> |
890 |
<param name="unpack_target" value="unzip"/> |
891 |
<param name="gcc_archive_file" value="avr-gcc-4.8.1-arduino5-i686-mingw32.zip"/> |
892 |
<param name="gcc_version" value="4.8.1-arduino5"/> |
893 |
<param name="avrdude_archive_file" value="avrdude-6.0.1-arduino5-i686-mingw32.zip"/> |
894 |
<param name="avrdude_version" value="6.0.1-arduino5"/> |
895 |
</antcall> |
896 |
|
897 |
<antcall target="package-library-index-json-bundle"/> |
898 |
</target> |
899 |
|
900 |
<target name="windows-run" depends="build,start"/> |
901 |
|
902 |
<target name="windows-start"> |
903 |
<exec executable="windows/work/arduino.exe" dir="windows/work" spawn="false" failonerror="true"/> |
904 |
</target> |
905 |
|
906 |
<target name="windows-dist" depends="build" description="Create .zip files of windows version"> |
907 |
<zip destfile="windows/arduino-${version}-${platform}.zip" level="9"> |
908 |
<zipfileset dir="windows/work" prefix="arduino-${version}"/> |
909 |
</zip> |
910 |
|
911 |
<echo> |
912 |
======================================================= |
913 |
Arduino for Windows was built. Grab the archive from |
914 |
|
915 |
windows/arduino-${version}-${platform}.zip |
916 |
======================================================= |
917 |
</echo> |
918 |
</target> |
919 |
|
920 |
|
921 |
<!-- - - - - - - - --> |
922 |
<!-- Source --> |
465 |
<!-- Source --> |
923 |
<!-- - - - - - - - --> |
466 |
<!-- - - - - - - - --> |
924 |
|
467 |
|
Lines 933-940
Link Here
|
933 |
prefix="arduino-${version}" |
476 |
prefix="arduino-${version}" |
934 |
excludes="**/*.tgz, |
477 |
excludes="**/*.tgz, |
935 |
**/*.bz2, |
478 |
**/*.bz2, |
936 |
**/build/macosx/, |
|
|
937 |
**/build/windows/, |
938 |
**/work/, |
479 |
**/work/, |
939 |
**/.git/, |
480 |
**/.git/, |
940 |
**/*.class" |
481 |
**/*.class" |
Lines 956-990
Link Here
|
956 |
<!-- - - - - - - - --> |
497 |
<!-- - - - - - - - --> |
957 |
|
498 |
|
958 |
<target name="clean" description="Perform a spring cleaning" |
499 |
<target name="clean" description="Perform a spring cleaning" |
959 |
depends="linux-clean, windows-clean, macosx-clean, subprojects-clean"> |
500 |
depends="linux-clean, subprojects-clean"> |
960 |
</target> |
|
|
961 |
|
962 |
<target name="avr-toolchain-bundle" unless="light_bundle"> |
963 |
<!-- Unzip AVR tools --> |
964 |
<mkdir dir="${staging_folder}/work/${staging_hardware_folder}/tmp/gcc"/> |
965 |
|
966 |
<antcall target="${unpack_target}"> |
967 |
<param name="archive_file" value="${staging_folder}/${gcc_archive_file}"/> |
968 |
<param name="archive_url" value="http://downloads.arduino.cc/tools/${gcc_archive_file}"/> |
969 |
<param name="final_folder" value="${staging_folder}/work/${staging_hardware_folder}/tmp/gcc/${gcc_version}/"/> |
970 |
<param name="dest_folder" value="${staging_folder}/work/${staging_hardware_folder}/tmp/gcc/"/> |
971 |
</antcall> |
972 |
|
973 |
<mkdir dir="${staging_folder}/work/${staging_hardware_folder}/tmp/avrdude"/> |
974 |
|
975 |
<antcall target="${unpack_target}"> |
976 |
<param name="archive_file" value="${staging_folder}/${avrdude_archive_file}"/> |
977 |
<param name="archive_url" value="http://downloads.arduino.cc/tools/${avrdude_archive_file}"/> |
978 |
<param name="final_folder" value="${staging_folder}/work/${staging_hardware_folder}/tmp/avrdude/${avrdude_version}"/> |
979 |
<param name="dest_folder" value="${staging_folder}/work/${staging_hardware_folder}/tmp/avrdude/"/> |
980 |
</antcall> |
981 |
|
982 |
<move file="${staging_folder}/work/${staging_hardware_folder}/tmp/gcc/avr" tofile="${staging_folder}/work/${staging_hardware_folder}/tools/avr"/> |
983 |
<move file="${staging_folder}/work/${staging_hardware_folder}/tmp/avrdude/avrdude-6.0.1" tofile="${staging_folder}/work/${staging_hardware_folder}/tools/avr"/> |
984 |
<antcall target="macosx-fix-bundled-toolchain-missing-symlinks"/> |
985 |
|
986 |
<echo append="true" file="${staging_folder}/work/${staging_hardware_folder}/tools/avr/builtin_tools_versions.txt" message="arduino.avrdude=${avrdude_version}${line.separator}"/> |
987 |
<echo append="true" file="${staging_folder}/work/${staging_hardware_folder}/tools/avr/builtin_tools_versions.txt" message="arduino.avr-gcc=${gcc_version}${line.separator}"/> |
988 |
</target> |
501 |
</target> |
989 |
|
502 |
|
990 |
<target name="package-library-index-json-bundle"> |
503 |
<target name="package-library-index-json-bundle"> |
Lines 1003-1019
Link Here
|
1003 |
<delete dir="${staging_folder}/work/${staging_hardware_folder}/tmp"/> |
516 |
<delete dir="${staging_folder}/work/${staging_hardware_folder}/tmp"/> |
1004 |
</target> |
517 |
</target> |
1005 |
|
518 |
|
1006 |
<target name="macosx-fix-bundled-toolchain-missing-symlinks" if="macosx"> |
|
|
1007 |
<exec executable="mv" failonerror="true"> |
1008 |
<arg value="${staging_folder}/work/${staging_hardware_folder}/tmp/avrdude/avrdude-6.0.1/lib/libusb.dylib"/> |
1009 |
<arg value="${staging_folder}/work/${staging_hardware_folder}/tools/avr/lib/"/> |
1010 |
</exec> |
1011 |
<exec executable="mv" failonerror="true"> |
1012 |
<arg value="${staging_folder}/work/${staging_hardware_folder}/tmp/avrdude/avrdude-6.0.1/lib/libusb-1.0.dylib"/> |
1013 |
<arg value="${staging_folder}/work/${staging_hardware_folder}/tools/avr/lib/"/> |
1014 |
</exec> |
1015 |
</target> |
1016 |
|
1017 |
<target name="generate-hourly-build-txt" if="hourly"> |
519 |
<target name="generate-hourly-build-txt" if="hourly"> |
1018 |
<echo file="${staging_folder}/work/${staging_hardware_folder}/../lib/hourlyBuild.txt">${BUILD_DATE}</echo> |
520 |
<echo file="${staging_folder}/work/${staging_hardware_folder}/../lib/hourlyBuild.txt">${BUILD_DATE}</echo> |
1019 |
</target> |
521 |
</target> |