|
223 | 223 | </copy> |
224 | 224 |
|
225 | 225 | <!-- Unzip AVR tools --> |
226 | | - <!-- <unzip dest="macosx/work/Arduino.app/Contents/Resources/Java/hardware" src="macosx/dist/tools-universal.zip" overwrite="false"/> --> |
| 226 | + <antcall target="unzip-avr-toolchain"> |
| 227 | + <param name="file_arch" value="mac32" /> |
| 228 | + </antcall> |
227 | 229 |
|
| 230 | +<!-- |
228 | 231 | <exec executable="unzip"> |
229 | 232 | <arg value="-q" /> |
230 | 233 | <arg value="-n" /> |
|
233 | 236 | <arg value="macosx/dist/tools-universal.zip" /> |
234 | 237 | </exec> |
235 | 238 |
|
| 239 | + <copy todir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr/include/avr"> |
| 240 | + <fileset file="macosx/dist/eeprom.h" /> |
| 241 | + </copy> |
| 242 | +--> |
| 243 | + |
236 | 244 | <copy todir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/"> |
237 | 245 | <fileset file="macosx/dist/bossac" /> |
238 | 246 | </copy> |
239 | 247 |
|
240 | 248 | <chmod file="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/bossac" perm="+x" /> |
241 | 249 |
|
242 | | - <copy todir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr/include/avr"> |
243 | | - <fileset file="macosx/dist/eeprom.h" /> |
244 | | - </copy> |
245 | | - |
246 | 250 | <antcall target="assemble"> |
247 | 251 | <param name="target.path" value="macosx/work/Arduino.app/Contents/Resources/Java" /> |
248 | 252 | </antcall> |
|
260 | 264 | <fileset dir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools" includes="**/man"/> |
261 | 265 | </delete> |
262 | 266 |
|
263 | | - <get src="http://downloads.arduino.cc/libastylej-2.03.zip" dest="macosx" usetimestamp="true" /> |
| 267 | + <get src="http://downloads.arduino.cc/libastylej-2.03.zip" dest="macosx" usetimestamp="true" ignoreerrors="true" /> |
264 | 268 | <unzip src="macosx/libastylej-2.03.zip" dest="macosx" overwrite="true"/> |
265 | 269 | <copy file="macosx/libastylej/libastylej.jnilib" todir="macosx/work/Arduino.app/Contents/Resources/Java/lib/" /> |
266 | 270 | <chmod perm="755" file="macosx/work/Arduino.app/Contents/Resources/Java/lib/libastylej.jnilib" /> |
|
335 | 339 | <chmod perm="+x"> |
336 | 340 | <fileset dir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin" includes="**/*" /> |
337 | 341 | <fileset dir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr/bin" includes="**/*" /> |
338 | | - <fileset dir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr-3/bin" includes="**/*" /> |
339 | | - <fileset dir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr-4/bin" includes="**/*" /> |
340 | | - <fileset dir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/avr/libexec/gcc/avr/4.3.2/" includes="**/cc1*" /> |
| 342 | + <fileset dir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/avr/libexec/gcc/avr/4.3.2/" includes="*" /> |
341 | 343 | </chmod> |
342 | 344 |
|
343 | 345 | <replace file="macosx/work/Arduino.app/Contents/Info.plist" |
|
464 | 466 | <mkdir dir="linux/work/hardware/tools" /> |
465 | 467 | <copy file="linux/dist/tools/adk2install" todir="linux/work/hardware/tools" /> |
466 | 468 | <copy file="linux/dist/tools/adk2tool" todir="linux/work/hardware/tools" /> |
467 | | - <copy file="linux/dist/tools/avrdude${arch-bits}" tofile="linux/work/hardware/tools/avrdude" /> |
468 | | - <copy file="linux/dist/tools/avrdude.conf" todir="linux/work/hardware/tools" /> |
469 | 469 | <copy file="linux/dist/tools/bossac${arch-bits}" tofile="linux/work/hardware/tools/bossac" /> |
470 | 470 |
|
471 | | - <chmod perm="755" file="linux/work/hardware/tools/avrdude" /> |
472 | 471 | <chmod perm="755" file="linux/work/hardware/tools/bossac" /> |
473 | 472 | <chmod perm="755" file="linux/work/hardware/tools/adk2tool" /> |
474 | 473 | <chmod perm="755" file="linux/work/hardware/tools/adk2install" /> |
475 | 474 |
|
476 | 475 | <copy todir="linux/work" file="linux/dist/arduino" /> |
477 | 476 | <chmod perm="755" file="linux/work/arduino" /> |
478 | 477 |
|
479 | | - <get src="http://downloads.arduino.cc/libastylej-2.03.zip" dest="linux" usetimestamp="true" /> |
| 478 | + <get src="http://downloads.arduino.cc/libastylej-2.03.zip" dest="linux" usetimestamp="true" ignoreerrors="true" /> |
480 | 479 | <unzip src="linux/libastylej-2.03.zip" dest="linux" overwrite="true"/> |
481 | 480 | <copy file="linux/libastylej/libastylej${arch-bits}.so" tofile="linux/work/lib/libastylej.so" /> |
482 | 481 | <chmod perm="755" file="linux/work/lib/libastylej.so" /> |
|
491 | 490 | </antcall> |
492 | 491 |
|
493 | 492 | <!-- Unzip AVR tools --> |
494 | | - <exec executable="tar" dir="linux/work/hardware"> |
495 | | - <arg value="-xjf"/> |
496 | | - <arg value="../../avr_tools_linux32.tar.bz2"/> |
497 | | - </exec> |
498 | | - |
| 493 | + <antcall target="unzip-avr-toolchain"> |
| 494 | + <param name="file_arch" value="linux32" /> |
| 495 | + </antcall> |
499 | 496 | </target> |
500 | 497 |
|
501 | 498 | <target name="linux64-build" depends="linux-build" description="Build linux (64-bit) version"> |
502 | | - <copy tofile="linux/work/hardware/tools/avrdude" file="linux/dist/tools/avrdude64" overwrite="true" /> |
503 | | - |
504 | | - <chmod perm="755" file="linux/work/hardware/tools/avrdude" /> |
505 | | - |
506 | 499 | <!-- Unzip ARM tools --> |
507 | 500 | <antcall target="unzip-arm-toolchain"> |
508 | 501 | <param name="dist_file" value="gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz" /> |
|
511 | 504 | </antcall> |
512 | 505 |
|
513 | 506 | <!-- Unzip AVR tools --> |
514 | | - <exec executable="tar" dir="linux/work/hardware"> |
515 | | - <arg value="-xjf"/> |
516 | | - <arg value="../../avr_tools_linux64.tar.bz2"/> |
517 | | - </exec> |
| 507 | + <antcall target="unzip-avr-toolchain"> |
| 508 | + <param name="file_arch" value="linux64" /> |
| 509 | + </antcall> |
518 | 510 | </target> |
519 | 511 |
|
520 | 512 | <target name="linux32-run" depends="linux32-build" description="Run Linux (32-bit) version"> |
|
525 | 517 | <exec executable="./linux/work/arduino" spawn="false"/> |
526 | 518 | </target> |
527 | 519 |
|
| 520 | + <target name="unzip-avr-toolchain"> |
| 521 | + <get src="http://downloads.arduino.cc/avr-toolchain-${file_arch}-gcc-4.3.2.zip" dest="${staging_folder}" usetimestamp="true" ignoreerrors="true" /> |
| 522 | + |
| 523 | + <checksum file="${staging_folder}/avr-toolchain-${file_arch}-gcc-4.3.2.zip" algorithm="sha" fileext=".sha" verifyproperty="checksum.matches"/> |
| 524 | + <condition property="checksum.matches.fail"> |
| 525 | + <equals arg1="${checksum.matches}" arg2="false"/> |
| 526 | + </condition> |
| 527 | + <fail if="checksum.matches.fail">Checksum failed. |
| 528 | + |
| 529 | + File avr-toolchain-${file_arch}-gcc-4.3.2.zip failed checksum. |
| 530 | + Please remove "${staging_folder}/avr-toolchain-${file_arch}-gcc-4.3.2.zip" and download it again. |
| 531 | + </fail> |
| 532 | + |
| 533 | + <mkdir dir="${staging_folder}/work/${staging_hardware_folder}/tools/avr" /> |
| 534 | + <exec executable="unzip"> |
| 535 | + <arg value="-q" /> |
| 536 | + <arg value="-n" /> |
| 537 | + <arg value="-d" /> |
| 538 | + <arg value="${staging_folder}/work/${staging_hardware_folder}/tools/avr" /> |
| 539 | + <arg value="${staging_folder}/avr-toolchain-${file_arch}-gcc-4.3.2.zip" /> |
| 540 | + </exec> |
| 541 | + </target> |
| 542 | + |
528 | 543 | <!-- Set 'arm_disfile_available' property if ARM toolchain dist_file is downloaded --> |
529 | 544 | <!-- Set 'arm_toolchain_installed' property if ARM toolchain is installed in working directory --> |
530 | 545 | <target name="check-arm-toolchain"> |
|
534 | 549 |
|
535 | 550 | <!-- Retrieve ARM toolchain --> |
536 | 551 | <target name="get-arm-toolchain" depends="check-arm-toolchain" unless="arm_distfile_available"> |
537 | | - <get src="${dist_url}" dest="${staging_folder}/dist/${dist_file}" verbose="true" /> |
| 552 | + <get src="${dist_url}" dest="${staging_folder}/dist/${dist_file}" verbose="true" ignoreerrors="true" /> |
538 | 553 | </target> |
539 | 554 |
|
540 | 555 | <target name="unzip-arm-toolchain" depends="get-arm-toolchain, check-arm-toolchain" |
|
664 | 679 | </copy> |
665 | 680 |
|
666 | 681 | <!-- Unzip AVR tools --> |
667 | | - <get src="http://downloads.arduino.cc/WinAVR-20081205-arduino-2.zip" dest="windows" usetimestamp="true" skipexisting="true" verbose="true" /> |
668 | | - <unzip dest="windows/work/hardware" src="windows/WinAVR-20081205-arduino-2.zip" overwrite="false"/> |
669 | | - |
670 | | - <copy todir="windows/work/hardware/tools/avr/avr/include/avr"> |
671 | | - <fileset file="windows/eeprom.h" /> |
672 | | - </copy> |
| 682 | + <antcall target="unzip-avr-toolchain"> |
| 683 | + <param name="file_arch" value="win32" /> |
| 684 | + </antcall> |
673 | 685 |
|
674 | | - <get src="http://downloads.arduino.cc/libastylej-2.03.zip" dest="windows" usetimestamp="true" /> |
| 686 | + <get src="http://downloads.arduino.cc/libastylej-2.03.zip" dest="windows" usetimestamp="true" ignoreerrors="true" /> |
675 | 687 | <unzip src="windows/libastylej-2.03.zip" dest="windows" overwrite="true"/> |
676 | 688 | <copy file="windows/libastylej/AStylej.dll" todir="windows/work/lib" /> |
677 | 689 |
|
|
728 | 740 | <target name="windows-dist" depends="windows-build" |
729 | 741 | description="Create .zip files of windows version"> |
730 | 742 |
|
731 | | - <get src="http://downloads.arduino.cc/jre_7u40_windows_i586.zip" dest="windows/jre.zip" usetimestamp="true" /> |
| 743 | + <get src="http://downloads.arduino.cc/jre_7u40_windows_i586.zip" dest="windows/jre.zip" usetimestamp="true" ignoreerrors="true" /> |
732 | 744 |
|
733 | 745 | <unzip dest="windows/work" src="windows/jre.zip" overwrite="false"/> |
734 | 746 |
|
|
747 | 759 | prefix="arduino-${version}" /> |
748 | 760 | </zip> |
749 | 761 |
|
750 | | - <zip destfile="windows/arduino-${version}-${platform}-expert.zip" level="9"> |
751 | | - <zipfileset dir="windows/work" |
752 | | - prefix="arduino-${version}" |
753 | | - excludes="java/**" /> |
754 | | - </zip> |
755 | | - |
756 | 762 | <echo> |
757 | 763 | ======================================================= |
758 | 764 | Arduino for Windows was built. Grab the archive from |
759 | 765 |
|
760 | 766 | windows/arduino-${version}-${platform}.zip |
761 | | - windows/arduino-${version}-${platform}-expert.zip |
762 | 767 | ======================================================= |
763 | 768 | </echo> |
764 | 769 | </target> |
|
0 commit comments