|
229 | 229 | </copy>
|
230 | 230 |
|
231 | 231 | <!-- Unzip AVR tools -->
|
232 |
| - <!-- <unzip dest="macosx/work/Arduino.app/Contents/Resources/Java/hardware" src="macosx/dist/tools-universal.zip" overwrite="false"/> --> |
| 232 | + <antcall target="unzip-avr-toolchain"> |
| 233 | + <param name="file_arch" value="mac32" /> |
| 234 | + </antcall> |
233 | 235 |
|
| 236 | +<!-- |
234 | 237 | <exec executable="unzip">
|
235 | 238 | <arg value="-q" />
|
236 | 239 | <arg value="-n" />
|
|
239 | 242 | <arg value="macosx/dist/tools-universal.zip" />
|
240 | 243 | </exec>
|
241 | 244 |
|
| 245 | + <copy todir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr/include/avr"> |
| 246 | + <fileset file="macosx/dist/eeprom.h" /> |
| 247 | + </copy> |
| 248 | +--> |
| 249 | + |
242 | 250 | <copy todir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/">
|
243 | 251 | <fileset file="macosx/dist/bossac" />
|
244 | 252 | </copy>
|
245 | 253 |
|
246 | 254 | <chmod file="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/bossac" perm="+x" />
|
247 | 255 |
|
248 |
| - <copy todir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr/include/avr"> |
249 |
| - <fileset file="macosx/dist/eeprom.h" /> |
250 |
| - </copy> |
251 |
| - |
252 | 256 | <antcall target="assemble">
|
253 | 257 | <param name="target.path" value="macosx/work/Arduino.app/Contents/Resources/Java" />
|
254 | 258 | </antcall>
|
255 | 259 |
|
256 | 260 | <antcall target="unzip-arm-toolchain">
|
257 |
| - <param name="dist_file" value="gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz" /> |
258 |
| - <param name="dist_url" value="http://arduino.googlecode.com/files/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz" /> |
259 |
| - <param name="dist_check_file" value="g++_arm_none_eabi" /> |
| 261 | + <param name="dist_file" value="gcc-arm-none-eabi-4.8.3-2014q1-mac.tar.gz" /> |
| 262 | + <param name="dist_url" value="http://downloads.arduino.cc/gcc-arm-none-eabi-4.8.3-2014q1-mac.tar.gz" /> |
| 263 | + <param name="dist_check_file" value="gcc-arm-none-eabi-4.8.3-2014q1" /> |
260 | 264 | </antcall>
|
261 | 265 |
|
262 | 266 | <delete includeEmptyDirs="true" quiet="true">
|
|
341 | 345 | <chmod perm="+x">
|
342 | 346 | <fileset dir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin" includes="**/*" />
|
343 | 347 | <fileset dir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr/bin" includes="**/*" />
|
344 |
| - <fileset dir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr-3/bin" includes="**/*" /> |
345 |
| - <fileset dir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr-4/bin" includes="**/*" /> |
346 |
| - <fileset dir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/avr/libexec/gcc/avr/4.3.2/" includes="**/cc1*" /> |
| 348 | + <fileset dir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/avr/libexec/gcc/avr/4.8.1/" includes="*" /> |
347 | 349 | </chmod>
|
348 | 350 |
|
349 | 351 | <replace file="macosx/work/Arduino.app/Contents/Info.plist"
|
|
470 | 472 | <mkdir dir="linux/work/hardware/tools" />
|
471 | 473 | <copy file="linux/dist/tools/adk2install" todir="linux/work/hardware/tools" />
|
472 | 474 | <copy file="linux/dist/tools/adk2tool" todir="linux/work/hardware/tools" />
|
473 |
| - <copy file="linux/dist/tools/avrdude${arch-bits}" tofile="linux/work/hardware/tools/avrdude" /> |
474 |
| - <copy file="linux/dist/tools/avrdude.conf" todir="linux/work/hardware/tools" /> |
475 | 475 | <copy file="linux/dist/tools/bossac${arch-bits}" tofile="linux/work/hardware/tools/bossac" />
|
476 | 476 |
|
477 |
| - <chmod perm="755" file="linux/work/hardware/tools/avrdude" /> |
478 | 477 | <chmod perm="755" file="linux/work/hardware/tools/bossac" />
|
479 | 478 | <chmod perm="755" file="linux/work/hardware/tools/adk2tool" />
|
480 | 479 | <chmod perm="755" file="linux/work/hardware/tools/adk2install" />
|
|
491 | 490 | <target name="linux32-build" depends="linux-build" description="Build linux (32-bit) version">
|
492 | 491 | <!-- Unzip ARM tools -->
|
493 | 492 | <antcall target="unzip-arm-toolchain">
|
494 |
| - <param name="dist_file" value="gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz" /> |
495 |
| - <param name="dist_url" value="http://arduino.googlecode.com/files/gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz" /> |
496 |
| - <param name="dist_check_file" value="g++_arm_none_eabi" /> |
| 493 | + <param name="dist_file" value="gcc-arm-none-eabi-4.8.3-2014q1-linux32.tar.gz" /> |
| 494 | + <param name="dist_url" value="http://downloads.arduino.cc/gcc-arm-none-eabi-4.8.3-2014q1-linux32.tar.gz" /> |
| 495 | + <param name="dist_check_file" value="gcc-arm-none-eabi-4.8.3-2014q1" /> |
497 | 496 | </antcall>
|
498 | 497 |
|
499 | 498 | <!-- Unzip AVR tools -->
|
500 |
| - <exec executable="tar" dir="linux/work/hardware"> |
501 |
| - <arg value="-xjf"/> |
502 |
| - <arg value="../../avr_tools_linux32.tar.bz2"/> |
503 |
| - </exec> |
504 |
| - |
| 499 | + <antcall target="unzip-avr-toolchain"> |
| 500 | + <param name="file_arch" value="linux32" /> |
| 501 | + </antcall> |
505 | 502 | </target>
|
506 | 503 |
|
507 | 504 | <target name="linux64-build" depends="linux-build" description="Build linux (64-bit) version">
|
508 |
| - <copy tofile="linux/work/hardware/tools/avrdude" file="linux/dist/tools/avrdude64" overwrite="true" /> |
509 |
| - |
510 |
| - <chmod perm="755" file="linux/work/hardware/tools/avrdude" /> |
511 |
| - |
512 | 505 | <!-- Unzip ARM tools -->
|
513 |
| - <antcall target="unzip-arm-toolchain"> |
514 |
| - <param name="dist_file" value="gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz" /> |
515 |
| - <param name="dist_url" value="http://arduino.googlecode.com/files/gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz" /> |
516 |
| - <param name="dist_check_file" value="g++_arm_none_eabi" /> |
| 506 | + <antcall target="unzip-tool"> |
| 507 | + <param name="dist_file" value="gcc-arm-none-eabi-4.8.3-2014q1-linux64.tar.gz" /> |
| 508 | + <param name="dist_url" value="http://downloads.arduino.cc/gcc-arm-none-eabi-4.8.3-2014q1-linux64.tar.gz" /> |
| 509 | + <param name="dist_check_file" value="gcc-arm-none-eabi-4.8.3-2014q1" /> |
517 | 510 | </antcall>
|
518 | 511 |
|
519 | 512 | <!-- Unzip AVR tools -->
|
520 |
| - <exec executable="tar" dir="linux/work/hardware"> |
521 |
| - <arg value="-xjf"/> |
522 |
| - <arg value="../../avr_tools_linux64.tar.bz2"/> |
523 |
| - </exec> |
| 513 | + <antcall target="unzip-avr-toolchain"> |
| 514 | + <param name="file_arch" value="linux64" /> |
| 515 | + </antcall> |
524 | 516 | </target>
|
525 | 517 |
|
526 | 518 | <target name="linux32-run" depends="linux32-build" description="Run Linux (32-bit) version">
|
|
531 | 523 | <exec executable="./linux/work/arduino" spawn="false"/>
|
532 | 524 | </target>
|
533 | 525 |
|
| 526 | + <target name="unzip-avr-toolchain"> |
| 527 | + <get src="http://downloads.arduino.cc/avr-toolchain-${file_arch}-gcc-4.8.1.zip" dest="${staging_folder}" usetimestamp="true" ignoreerrors="true" verbose="true" /> |
| 528 | + |
| 529 | + <checksum file="${staging_folder}/avr-toolchain-${file_arch}-gcc-4.8.1.zip" algorithm="sha" fileext=".sha" verifyproperty="checksum.matches"/> |
| 530 | + <condition property="checksum.matches.fail"> |
| 531 | + <equals arg1="${checksum.matches}" arg2="false"/> |
| 532 | + </condition> |
| 533 | + <fail if="checksum.matches.fail">Checksum failed. |
| 534 | + |
| 535 | + File avr-toolchain-${file_arch}-gcc-4.8.1.zip failed checksum. |
| 536 | + Please remove "${staging_folder}/avr-toolchain-${file_arch}-gcc-4.8.1.zip" and download it again. |
| 537 | + </fail> |
| 538 | + |
| 539 | + <mkdir dir="${staging_folder}/work/${staging_hardware_folder}/tools/avr" /> |
| 540 | + <exec executable="unzip"> |
| 541 | + <arg value="-q" /> |
| 542 | + <arg value="-n" /> |
| 543 | + <arg value="-d" /> |
| 544 | + <arg value="${staging_folder}/work/${staging_hardware_folder}/tools/avr" /> |
| 545 | + <arg value="${staging_folder}/avr-toolchain-${file_arch}-gcc-4.8.1.zip" /> |
| 546 | + </exec> |
| 547 | + </target> |
| 548 | + |
| 549 | + |
| 550 | + |
| 551 | + <!-- Set '${dist_file}_available' property if toolchain dist_file is downloaded --> |
| 552 | + <!-- Set '${dist_file}_installed' property if toolchain is installed in working directory --> |
| 553 | + <!-- hardware/tools/${dist_check_file} is checked for existence --> |
| 554 | + <target name="check-tool"> |
| 555 | + <available file="${staging_folder}/dist/${dist_file}" property="${dist_file}_available" /> |
| 556 | + <available file="${staging_folder}/work/hardware/tools/${dist_check_file}" property="${dist_file}_installed" /> |
| 557 | + </target> |
| 558 | + |
| 559 | + <!-- Retrieve tool --> |
| 560 | + <target name="get-tool" depends="check-tool" unless="${dist_file}_available"> |
| 561 | + <get src="${dist_url}" dest="${staging_folder}/dist/${dist_file}" verbose="true" ignoreerrors="true" /> |
| 562 | + </target> |
| 563 | + |
| 564 | + <!-- Ensure that the tool is downloaded and test checksums, if everything's ok unzip it on the tools folder --> |
| 565 | + <target name="unzip-tool" depends="get-tool, check-tool" unless="${dist_file}_installed"> |
| 566 | + <echo>Testing checksum of "${staging_folder}/dist/${dist_file}"</echo> |
| 567 | + <checksum file="${staging_folder}/dist/${dist_file}" algorithm="sha" fileext=".sha" verifyproperty="checksum.matches"/> |
| 568 | + <condition property="checksum.matches.fail"> |
| 569 | + <equals arg1="${checksum.matches}" arg2="false"/> |
| 570 | + </condition> |
| 571 | + <fail if="checksum.matches.fail">Checksum failed. |
| 572 | + |
| 573 | + File ${dist_file} failed checksum. |
| 574 | + Please remove "${staging_folder}/dist/${dist_file}" to download it again. |
| 575 | + </fail> |
| 576 | + |
| 577 | + <!-- Unzip tool to the destination folder --> |
| 578 | + <echo>Unzipping into folder ${staging_folder}/dist/${dist_file}</echo> |
| 579 | + <exec executable="tar"> |
| 580 | + <arg value="xfz"/> |
| 581 | + <arg value="${staging_folder}/dist/${dist_file}"/> |
| 582 | + <arg value="--directory=${staging_folder}/work/${staging_hardware_folder}/tools/"/> |
| 583 | + </exec> |
| 584 | + </target> |
| 585 | + |
| 586 | + |
| 587 | + |
534 | 588 | <!-- Set 'arm_disfile_available' property if ARM toolchain dist_file is downloaded -->
|
535 | 589 | <!-- Set 'arm_toolchain_installed' property if ARM toolchain is installed in working directory -->
|
536 | 590 | <target name="check-arm-toolchain">
|
|
540 | 594 |
|
541 | 595 | <!-- Retrieve ARM toolchain -->
|
542 | 596 | <target name="get-arm-toolchain" depends="check-arm-toolchain" unless="arm_distfile_available">
|
543 |
| - <get src="${dist_url}" dest="${staging_folder}/dist/${dist_file}" verbose="true" /> |
| 597 | + <get src="${dist_url}" dest="${staging_folder}/dist/${dist_file}" verbose="true" ignoreerrors="true" /> |
544 | 598 | </target>
|
545 | 599 |
|
546 | 600 | <target name="unzip-arm-toolchain" depends="get-arm-toolchain, check-arm-toolchain"
|
|
684 | 738 | </copy>
|
685 | 739 |
|
686 | 740 | <!-- Unzip AVR tools -->
|
687 |
| - <get src="http://downloads.arduino.cc/WinAVR-20081205-arduino-2.zip" dest="windows" usetimestamp="true" skipexisting="true" verbose="true" /> |
688 |
| - <unzip dest="windows/work/hardware" src="windows/WinAVR-20081205-arduino-2.zip" overwrite="false"/> |
689 |
| - |
690 |
| - <copy todir="windows/work/hardware/tools/avr/avr/include/avr"> |
691 |
| - <fileset file="windows/eeprom.h" /> |
692 |
| - </copy> |
| 741 | + <antcall target="unzip-avr-toolchain"> |
| 742 | + <param name="file_arch" value="win32" /> |
| 743 | + </antcall> |
693 | 744 |
|
694 | 745 | <get src="http://downloads.arduino.cc/libastylej-2.03.zip" dest="windows" usetimestamp="true" skipexisting="true" />
|
695 | 746 | <unzip src="windows/libastylej-2.03.zip" dest="windows" overwrite="true"/>
|
|
732 | 783 |
|
733 | 784 | <!-- Unzip ARM toolchain -->
|
734 | 785 | <antcall target="unzip-arm-toolchain">
|
735 |
| - <param name="dist_file" value="gcc-arm-none-eabi-4.4.1-2010q1-188-win32.tar.gz" /> |
736 |
| - <param name="dist_url" value="http://arduino.googlecode.com/files/gcc-arm-none-eabi-4.4.1-2010q1-188-win32.tar.gz" /> |
737 |
| - <param name="dist_check_file" value="g++_arm_none_eabi" /> |
| 786 | + <param name="dist_file" value="gcc-arm-none-eabi-4.8.3-2014q1-windows.tar.gz" /> |
| 787 | + <param name="dist_url" value="http://downloads.arduino.cc/gcc-arm-none-eabi-4.8.3-2014q1-windows.tar.gz" /> |
| 788 | + <param name="dist_check_file" value="gcc-arm-none-eabi-4.8.3-2014q1" /> |
738 | 789 | </antcall>
|
739 | 790 |
|
740 | 791 | <delete includeEmptyDirs="true" quiet="true">
|
|
770 | 821 | prefix="arduino-${version}" />
|
771 | 822 | </zip>
|
772 | 823 |
|
773 |
| - <zip destfile="windows/arduino-${version}-${platform}-expert.zip" level="9"> |
774 |
| - <zipfileset dir="windows/work" |
775 |
| - prefix="arduino-${version}" |
776 |
| - excludes="java/**" /> |
777 |
| - </zip> |
778 |
| - |
779 | 824 | <echo>
|
780 | 825 | =======================================================
|
781 | 826 | Arduino for Windows was built. Grab the archive from
|
782 | 827 |
|
783 | 828 | windows/arduino-${version}-${platform}.zip
|
784 |
| - windows/arduino-${version}-${platform}-expert.zip |
785 | 829 | =======================================================
|
786 | 830 | </echo>
|
787 | 831 | </target>
|
|
0 commit comments