|
252 | 252 | <param name="target.path" value="macosx/work/Arduino.app/Contents/Resources/Java" />
|
253 | 253 | </antcall>
|
254 | 254 |
|
255 |
| - <antcall target="untar-tool"> |
256 |
| - <param name="dist_file" value="gcc-arm-none-eabi-4.8.3-2014q1-mac.tar.gz" /> |
257 |
| - <param name="dist_url" value="http://downloads.arduino.cc/gcc-arm-none-eabi-4.8.3-2014q1-mac.tar.gz" /> |
258 |
| - <param name="dist_check_file" value="gcc-arm-none-eabi-4.8.3-2014q1" /> |
| 255 | + <antcall target="untar"> |
| 256 | + <param name="archive_file" value="${staging_folder}/dist/gcc-arm-none-eabi-4.8.3-2014q1-mac.tar.gz" /> |
| 257 | + <param name="archive_url" value="http://downloads.arduino.cc/gcc-arm-none-eabi-4.8.3-2014q1-mac.tar.gz" /> |
| 258 | + <param name="final_folder" value="${staging_folder}/work/${staging_hardware_folder}/tools/gcc-arm-none-eabi-4.8.3-2014q1" /> |
| 259 | + <param name="dest_folder" value="${staging_folder}/work/${staging_hardware_folder}/tools/" /> |
259 | 260 | </antcall>
|
260 | 261 |
|
261 | 262 | <delete includeEmptyDirs="true" quiet="true">
|
|
486 | 487 |
|
487 | 488 | <target name="linux32-build" depends="linux-build" description="Build linux (32-bit) version">
|
488 | 489 | <!-- Unzip ARM tools -->
|
489 |
| - <antcall target="untar-tool"> |
490 |
| - <param name="dist_file" value="gcc-arm-none-eabi-4.8.3-2014q1-linux32.tar.gz" /> |
491 |
| - <param name="dist_url" value="http://downloads.arduino.cc/gcc-arm-none-eabi-4.8.3-2014q1-linux32.tar.gz" /> |
492 |
| - <param name="dist_check_file" value="gcc-arm-none-eabi-4.8.3-2014q1" /> |
| 490 | + <antcall target="untar"> |
| 491 | + <param name="archive_file" value="${staging_folder}/dist/gcc-arm-none-eabi-4.8.3-2014q1-linux32.tar.gz" /> |
| 492 | + <param name="archive_url" value="http://downloads.arduino.cc/gcc-arm-none-eabi-4.8.3-2014q1-linux32.tar.gz" /> |
| 493 | + <param name="final_folder" value="${staging_folder}/work/${staging_hardware_folder}/tools/gcc-arm-none-eabi-4.8.3-2014q1" /> |
| 494 | + <param name="dest_folder" value="${staging_folder}/work/${staging_hardware_folder}/tools/" /> |
493 | 495 | </antcall>
|
494 | 496 |
|
495 | 497 | <!-- Unzip AVR tools -->
|
|
500 | 502 |
|
501 | 503 | <target name="linux64-build" depends="linux-build" description="Build linux (64-bit) version">
|
502 | 504 | <!-- Unzip ARM tools -->
|
503 |
| - <antcall target="untar-tool"> |
504 |
| - <param name="dist_file" value="gcc-arm-none-eabi-4.8.3-2014q1-linux64.tar.gz" /> |
505 |
| - <param name="dist_url" value="http://downloads.arduino.cc/gcc-arm-none-eabi-4.8.3-2014q1-linux64.tar.gz" /> |
506 |
| - <param name="dist_check_file" value="gcc-arm-none-eabi-4.8.3-2014q1" /> |
| 505 | + <antcall target="untar"> |
| 506 | + <param name="archive_file" value="${staging_folder}/dist/gcc-arm-none-eabi-4.8.3-2014q1-linux64.tar.gz" /> |
| 507 | + <param name="archive_url" value="http://downloads.arduino.cc/gcc-arm-none-eabi-4.8.3-2014q1-linux64.tar.gz" /> |
| 508 | + <param name="final_folder" value="${staging_folder}/work/${staging_hardware_folder}/tools/gcc-arm-none-eabi-4.8.3-2014q1" /> |
| 509 | + <param name="dest_folder" value="${staging_folder}/work/${staging_hardware_folder}/tools/" /> |
507 | 510 | </antcall>
|
508 | 511 |
|
509 | 512 | <!-- Unzip AVR tools -->
|
|
562 | 565 | <!-- Set '${dist_file}_available' property if toolchain dist_file is downloaded -->
|
563 | 566 | <!-- Set '${dist_file}_installed' property if toolchain is installed in working directory -->
|
564 | 567 | <!-- hardware/tools/${dist_check_file} is checked for existence -->
|
565 |
| - <target name="check-tool"> |
566 |
| - <available file="${staging_folder}/dist/${dist_file}" property="${dist_file}_available" /> |
567 |
| - <available file="${staging_folder}/work/hardware/tools/${dist_check_file}" property="${dist_file}_installed" /> |
| 568 | + <target name="untar-unzip-check"> |
| 569 | + <available file="${archive_file}" property="${archive_file}_available" /> |
| 570 | + <available file="${final_folder}" property="${archive_file}_installed" /> |
568 | 571 | </target>
|
569 | 572 |
|
570 | 573 | <!-- Retrieve tool -->
|
571 |
| - <target name="get-tool" depends="check-tool" unless="${dist_file}_available"> |
572 |
| - <get src="${dist_url}" dest="${staging_folder}/dist/${dist_file}" verbose="true" ignoreerrors="true" /> |
| 574 | + <target name="untar-unzip-download" depends="untar-unzip-check" unless="${archive_file}_available"> |
| 575 | + <get src="${archive_url}" dest="${archive_file}" verbose="true" ignoreerrors="true" /> |
573 | 576 | </target>
|
574 | 577 |
|
575 | 578 | <!-- Ensure that the tool is downloaded and test checksums, if everything's ok unzip it on the tools folder -->
|
576 |
| - <target name="untar-tool" depends="get-tool, check-tool" unless="${dist_file}_installed"> |
577 |
| - <echo>Testing checksum of "${staging_folder}/dist/${dist_file}"</echo> |
578 |
| - <checksum file="${staging_folder}/dist/${dist_file}" algorithm="sha" fileext=".sha" verifyproperty="checksum.matches"/> |
| 579 | + <target name="untar" depends="untar-unzip-download" unless="${dist_file}_installed"> |
| 580 | + <echo>Testing checksum of "${archive_file}"</echo> |
| 581 | + <checksum file="${archive_file}" algorithm="sha" fileext=".sha" verifyproperty="checksum.matches"/> |
579 | 582 | <condition property="checksum.matches.fail">
|
580 | 583 | <equals arg1="${checksum.matches}" arg2="false"/>
|
581 | 584 | </condition>
|
582 | 585 | <fail if="checksum.matches.fail">Checksum failed.
|
583 | 586 |
|
584 |
| - File ${dist_file} failed checksum. |
585 |
| - Please remove "${staging_folder}/dist/${dist_file}" to download it again. |
| 587 | + File ${archive_file} failed checksum. |
| 588 | + Please remove "${archive_file}" to download it again. |
586 | 589 | </fail>
|
587 | 590 |
|
588 | 591 | <!-- Unzip tool to the destination folder -->
|
589 |
| - <echo>Unzipping into folder ${staging_folder}/dist/${dist_file}</echo> |
| 592 | + <echo>Unzipping into folder ${dest_folder}</echo> |
590 | 593 | <exec executable="tar">
|
591 | 594 | <arg value="xfz"/>
|
592 |
| - <arg value="${staging_folder}/dist/${dist_file}"/> |
593 |
| - <arg value="--directory=${staging_folder}/work/${staging_hardware_folder}/tools/"/> |
| 595 | + <arg value="${archive_file}"/> |
| 596 | + <arg value="--directory=${dest_folder}"/> |
594 | 597 | </exec>
|
595 | 598 | </target>
|
596 | 599 |
|
|
771 | 774 | </chmod>
|
772 | 775 |
|
773 | 776 | <!-- Unzip ARM toolchain -->
|
774 |
| - <antcall target="untar-tool"> |
775 |
| - <param name="dist_file" value="gcc-arm-none-eabi-4.8.3-2014q1-windows.tar.gz" /> |
776 |
| - <param name="dist_url" value="http://downloads.arduino.cc/gcc-arm-none-eabi-4.8.3-2014q1-windows.tar.gz" /> |
777 |
| - <param name="dist_check_file" value="gcc-arm-none-eabi-4.8.3-2014q1" /> |
| 777 | + <antcall target="untar"> |
| 778 | + <param name="archive_file" value="${staging_folder}/dist/gcc-arm-none-eabi-4.8.3-2014q1-windows.tar.gz" /> |
| 779 | + <param name="archive_url" value="http://downloads.arduino.cc/gcc-arm-none-eabi-4.8.3-2014q1-windows.tar.gz" /> |
| 780 | + <param name="final_folder" value="${staging_folder}/work/${staging_hardware_folder}/tools/gcc-arm-none-eabi-4.8.3-2014q1" /> |
| 781 | + <param name="dest_folder" value="${staging_folder}/work/${staging_hardware_folder}/tools/" /> |
778 | 782 | </antcall>
|
779 | 783 |
|
780 | 784 | <delete includeEmptyDirs="true" quiet="true">
|
|
0 commit comments