|
5 | 5 | <!--echo message="os.version = ${os.version}" /-->
|
6 | 6 |
|
7 | 7 | <!-- Sets properties for macosx/windows/linux depending on current system -->
|
8 |
| - <condition property="macosx"><os family="mac" /></condition> |
9 |
| - <condition property="windows"><os family="windows" /></condition> |
10 |
| - <condition property="linux"><os family="unix" /></condition> |
11 |
| - <condition property="linux32"><os family="unix" arch="i386" /></condition> |
12 |
| - <condition property="linux64"><os family="unix" arch="amd64" /></condition> |
13 |
| - |
14 |
| - <condition property="platform" |
15 |
| - value="macosx"><os family="mac" /></condition> |
16 |
| - <condition property="platform" |
17 |
| - value="windows"><os family="windows" /></condition> |
18 |
| - <condition property="platform" |
19 |
| - value="linux32"><os family="unix" arch="i386" /></condition> |
20 |
| - <condition property="platform" |
21 |
| - value="linux64"><os family="unix" arch="amd64" /></condition> |
| 8 | + <condition property="platform" value="macosx"><os family="mac" /></condition> |
| 9 | + <condition property="platform" value="windows"><os family="windows" /></condition> |
| 10 | + <condition property="platform" value="linux32"><os family="unix" arch="i386" /></condition> |
| 11 | + <condition property="platform" value="linux64"><os family="unix" arch="amd64" /></condition> |
| 12 | + |
| 13 | + <condition property="macosx"><equals arg1="${platform}" arg2="macosx" /></condition> |
| 14 | + <condition property="windows"><equals arg1="${platform}" arg2="windows" /></condition> |
| 15 | + <condition property="linux32"><equals arg1="${platform}" arg2="linux32" /></condition> |
| 16 | + <condition property="linux64"><equals arg1="${platform}" arg2="linux64" /></condition> |
| 17 | + <condition property="linux"><equals arg1="${platform}" arg2="linux32" /></condition> |
| 18 | + <condition property="linux"><equals arg1="${platform}" arg2="linux64" /></condition> |
| 19 | + |
| 20 | + <condition property="staging_folder" value="macosx"><equals arg1="${platform}" arg2="macosx" /></condition> |
| 21 | + <condition property="staging_folder" value="windows"><equals arg1="${platform}" arg2="windows" /></condition> |
| 22 | + <condition property="staging_folder" value="linux"><equals arg1="${platform}" arg2="linux32" /></condition> |
| 23 | + <condition property="staging_folder" value="linux"><equals arg1="${platform}" arg2="linux64" /></condition> |
| 24 | + |
| 25 | + <condition property="staging_hardware_folder" value="Arduino.app/Contents/Resources/Java/hardware"><equals arg1="${platform}" arg2="macosx" /></condition> |
| 26 | + <condition property="staging_hardware_folder" value="hardware"><equals arg1="${platform}" arg2="windows" /></condition> |
| 27 | + <condition property="staging_hardware_folder" value="hardware"><equals arg1="${platform}" arg2="linux32" /></condition> |
| 28 | + <condition property="staging_hardware_folder" value="hardware"><equals arg1="${platform}" arg2="linux64" /></condition> |
22 | 29 |
|
23 | 30 | <condition property="arch-bits" value="32">
|
24 | 31 | <equals arg1="${platform}" arg2="linux32"/>
|
|
185 | 192 | <fail message="wrong platform (${os.name})" />
|
186 | 193 | </target>
|
187 | 194 |
|
188 |
| - <target name="macosx-build" if="macosx" depends="revision-check, macosx-checkos, subprojects-build, macosx-check-arm-toolchain" description="Build Mac OS X version"> |
| 195 | + <target name="macosx-build" if="macosx" depends="revision-check, macosx-checkos, subprojects-build" description="Build Mac OS X version"> |
189 | 196 | <mkdir dir="macosx/work" />
|
190 | 197 |
|
191 | 198 | <!-- assemble the pde -->
|
|
234 | 241 | <param name="target.path" value="macosx/work/Arduino.app/Contents/Resources/Java" />
|
235 | 242 | </antcall>
|
236 | 243 |
|
237 |
| - <antcall target="macosx-unzip-arm-toolchain" /> |
| 244 | + <antcall target="unzip-arm-toolchain"> |
| 245 | + <param name="dist_file" value="gcc-arm-none-eabi-4.7.4-2013q2-mac.tar.gz" /> |
| 246 | + <param name="dist_url" value="http://arduino.googlecode.com/files/gcc-arm-none-eabi-4.7.4-2013q2-mac.tar.gz" /> |
| 247 | + <param name="dist_check_file" value="gcc-arm-none-eabi-4.7.4-2013q2" /> |
| 248 | + </antcall> |
238 | 249 |
|
239 | 250 | <delete includeEmptyDirs="true" quiet="true">
|
240 | 251 | <fileset dir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools" includes="**/3.4.6/**/*"/>
|
|
252 | 263 | <exec executable="macosx/work/Arduino.app/Contents/MacOS/JavaApplicationStub" spawn="false"/>
|
253 | 264 | </target>
|
254 | 265 |
|
255 |
| - <target name="macosx-check-arm-toolchain-distfile"> |
256 |
| - <available file="macosx/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz" property="arm_distfile_available" /> |
257 |
| - </target> |
258 |
| - |
259 |
| - <target name="macosx-get-arm-toolchain" depends="macosx-check-arm-toolchain-distfile" unless="arm_distfile_available"> |
260 |
| - <!-- Retrieve ARM toolchain --> |
261 |
| - <get |
262 |
| - src="http://arduino.googlecode.com/files/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz" |
263 |
| - dest="macosx/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz" verbose="true" /> |
264 |
| - </target> |
265 |
| - |
266 |
| - <target name="macosx-check-arm-toolchain"> |
267 |
| - <available file="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/g++_arm_none_eabi" |
268 |
| - property="arm_available" /> |
269 |
| - </target> |
270 |
| - |
271 |
| - <target name="macosx-unzip-arm-toolchain" depends="macosx-get-arm-toolchain, macosx-check-arm-toolchain" unless="arm_available"> |
272 |
| - <checksum file="macosx/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz" algorithm="sha" |
273 |
| - fileext=".sha" verifyproperty="checksum.matches"/> |
274 |
| - <condition property="checksum.matches.fail"> |
275 |
| - <equals arg1="${checksum.matches}" arg2="false"/> |
276 |
| - </condition> |
277 |
| - <fail if="checksum.matches.fail">Checksum failed. |
278 |
| - |
279 |
| - File gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz failed checksum. |
280 |
| - Please remove "macosx/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz" to download it again. |
281 |
| - </fail> |
282 |
| - |
283 |
| - <!-- ...and unzip on the destination folder --> |
284 |
| - <exec executable="tar" output="/dev/null"> |
285 |
| - <arg value="xfz"/> |
286 |
| - <arg value="macosx/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz"/> |
287 |
| - <arg value="--directory=macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/"/> |
288 |
| - </exec> |
289 |
| - </target> |
290 |
| - |
291 | 266 | <!-- - - - - - - - - - - - - - - - -->
|
292 | 267 | <!-- Sign application for MacOSX. -->
|
293 | 268 | <!-- - - - - - - - - - - - - - - - -->
|
|
447 | 422 | <fail message="wrong platform (${os.name})" />
|
448 | 423 | </target>
|
449 | 424 |
|
450 |
| - <target name="linux-build" depends="revision-check, linux-checkos, subprojects-build, linux-check-arm-toolchain" description="Build linux version"> |
| 425 | + <target name="linux-build" depends="revision-check, linux-checkos, subprojects-build" description="Build linux version"> |
451 | 426 | <mkdir dir="linux/work" />
|
452 | 427 |
|
453 | 428 | <copy todir="linux/work">
|
|
484 | 459 |
|
485 | 460 | <copy todir="linux/work" file="linux/dist/arduino" />
|
486 | 461 | <chmod perm="755" file="linux/work/arduino" />
|
487 |
| - |
488 |
| - <antcall target="linux-unzip-arm-toolchain" /> |
489 | 462 | </target>
|
490 | 463 |
|
491 | 464 | <target name="linux32-build" depends="linux-build" description="Build linux (32-bit) version">
|
| 465 | + <!-- Unzip ARM tools --> |
| 466 | + <antcall target="unzip-arm-toolchain"> |
| 467 | + <param name="dist_file" value="gcc-arm-none-eabi-4.7.4-2013q2-linux32.tar.gz" /> |
| 468 | + <param name="dist_url" value="http://arduino.googlecode.com/files/gcc-arm-none-eabi-4.7.4-2013q2-linux32.tar.gz" /> |
| 469 | + <param name="dist_check_file" value="gcc-arm-none-eabi-4.7.4-2013q2" /> |
| 470 | + </antcall> |
| 471 | + |
492 | 472 | <!-- Unzip AVR tools -->
|
493 | 473 | <exec executable="tar" dir="linux/work/hardware">
|
494 | 474 | <arg value="-xjf"/>
|
|
502 | 482 |
|
503 | 483 | <chmod perm="755" file="linux/work/hardware/tools/avrdude" />
|
504 | 484 |
|
| 485 | + <!-- Unzip ARM tools --> |
| 486 | + <antcall target="unzip-arm-toolchain"> |
| 487 | + <param name="dist_file" value="gcc-arm-none-eabi-4.7.4-2013q2-linux64.tar.gz" /> |
| 488 | + <param name="dist_url" value="http://arduino.googlecode.com/files/gcc-arm-none-eabi-4.7.4-2013q2-linux64.tar.gz" /> |
| 489 | + <param name="dist_check_file" value="gcc-arm-none-eabi-4.7.4-2013q2" /> |
| 490 | + </antcall> |
| 491 | + |
505 | 492 | <!-- Unzip AVR tools -->
|
506 | 493 | <exec executable="tar" dir="linux/work/hardware">
|
507 | 494 | <arg value="-xjf"/>
|
508 | 495 | <arg value="../../avr_tools_linux64.tar.bz2"/>
|
509 | 496 | </exec>
|
510 | 497 | </target>
|
511 | 498 |
|
512 |
| - <target name="linux32-run" depends="linux32-build" |
513 |
| - description="Run Linux (32-bit) version"> |
| 499 | + <target name="linux32-run" depends="linux32-build" description="Run Linux (32-bit) version"> |
514 | 500 | <exec executable="./linux/work/arduino" spawn="false"/>
|
515 | 501 | </target>
|
516 | 502 |
|
517 |
| - <target name="linux64-run" depends="linux64-build" |
518 |
| - description="Run Linux (64-bit) version"> |
| 503 | + <target name="linux64-run" depends="linux64-build" description="Run Linux (64-bit) version"> |
519 | 504 | <exec executable="./linux/work/arduino" spawn="false"/>
|
520 | 505 | </target>
|
521 | 506 |
|
522 |
| - <target name="linux-check-arm-toolchain-distfile"> |
523 |
| - <available file="linux/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz" property="arm_distfile_available" /> |
524 |
| - </target> |
525 |
| - |
526 |
| - <target name="linux-get-arm-toolchain" depends="linux-check-arm-toolchain-distfile" unless="arm_distfile_available"> |
527 |
| - <!-- Retrieve ARM toolchain --> |
528 |
| - <get |
529 |
| - src="http://arduino.googlecode.com/files/gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz" |
530 |
| - dest="linux/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz" |
531 |
| - verbose="true" /> |
| 507 | + <!-- Set 'arm_disfile_available' property if ARM toolchain dist_file is downloaded --> |
| 508 | + <!-- Set 'arm_toolchain_installed' property if ARM toolchain is installed in working directory --> |
| 509 | + <target name="check-arm-toolchain"> |
| 510 | + <available file="${staging_folder}/dist/${dist_file}" property="arm_distfile_available" /> |
| 511 | + <available file="${staging_folder}/work/hardware/tools/${dist_check_file}" property="arm_toolchain_installed" /> |
532 | 512 | </target>
|
533 | 513 |
|
534 |
| - <target name="linux-check-arm-toolchain"> |
535 |
| - <available file="linux/work/hardware/tools/g++_arm_none_eabi" property="arm_available" /> |
| 514 | + <!-- Retrieve ARM toolchain --> |
| 515 | + <target name="get-arm-toolchain" depends="check-arm-toolchain" unless="arm_distfile_available"> |
| 516 | + <get src="${dist_url}" dest="${staging_folder}/dist/${dist_file}" verbose="true" /> |
536 | 517 | </target>
|
537 | 518 |
|
538 |
| - <target name="linux-unzip-arm-toolchain" depends="linux-get-arm-toolchain, linux-check-arm-toolchain" unless="arm_available"> |
539 |
| - <checksum file="linux/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz" algorithm="sha" |
| 519 | + <target name="unzip-arm-toolchain" depends="get-arm-toolchain, check-arm-toolchain" |
| 520 | + unless="arm_toolchain_installed"> |
| 521 | + <checksum file="${staging_folder}/dist/${dist_file}" algorithm="sha" |
540 | 522 | fileext=".sha" verifyproperty="checksum.matches"/>
|
541 | 523 | <condition property="checksum.matches.fail">
|
542 | 524 | <equals arg1="${checksum.matches}" arg2="false"/>
|
543 | 525 | </condition>
|
544 | 526 | <fail if="checksum.matches.fail">Checksum failed.
|
545 | 527 |
|
546 |
| - File gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz failed checksum. |
547 |
| - Please remove "linux/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz" to download it again. |
| 528 | + File ${dist_file} failed checksum. |
| 529 | + Please remove "${staging_folder}/dist/${dist_file}" to download it again. |
548 | 530 | </fail>
|
549 | 531 |
|
550 | 532 | <!-- Unzip toolchain to the destination folder -->
|
551 | 533 | <exec executable="tar" output="/dev/null" os="Linux">
|
552 | 534 | <arg value="xfz"/>
|
553 |
| - <arg value="linux/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz"/> |
554 |
| - <arg value="--directory=linux/work/hardware/tools"/> |
| 535 | + <arg value="${staging_folder}/dist/${dist_file}"/> |
| 536 | + <arg value="--directory=${staging_folder}/work/${staging_hardware_folder}/tools/"/> |
555 | 537 | </exec>
|
556 | 538 | </target>
|
557 | 539 |
|
558 |
| - <target name="linux64-get-arm-toolchain" depends="linux-check-arm-toolchain-distfile" unless="arm_distfile_available"> |
559 |
| - <antcall target="linux-get-arm-toolchain" /> |
560 |
| - </target> |
561 |
| - |
562 |
| - <target name="linux64-unzip-arm-toolchain" depends="linux-get-arm-toolchain" unless="arm_available"> |
563 |
| - <antcall target="linux-unzip-arm-toolchain" /> |
564 |
| - </target> |
565 |
| - |
566 | 540 | <target name="linux-dist" depends="build"
|
567 | 541 | description="Build .tar.gz of linux version">
|
568 | 542 |
|
|
704 | 678 | <fileset dir="windows/work" includes="**/*.html, **/*.dll, **/*.exe" />
|
705 | 679 | </chmod>
|
706 | 680 |
|
707 |
| - <antcall target="windows-unzip-arm-toolchain" /> |
| 681 | + <!-- Unzip ARM toolchain --> |
| 682 | + <antcall target="unzip-arm-toolchain"> |
| 683 | + <param name="dist_file" value="gcc-arm-none-eabi-4.7.4-2013q2-windows.tar.gz" /> |
| 684 | + <param name="dist_url" value="http://arduino.googlecode.com/files/gcc-arm-none-eabi-4.7.4-2013q2-windows.tar.gz" /> |
| 685 | + <param name="dist_check_file" value="gcc-arm-none-eabi-4.7.4-2013q2" /> |
| 686 | + </antcall> |
708 | 687 |
|
709 | 688 | <delete includeEmptyDirs="true" quiet="true">
|
710 | 689 | <fileset dir="windows/work/hardware/tools/avr/doc" />
|
|
717 | 696 | dir="windows/work" spawn="true"/>
|
718 | 697 | </target>
|
719 | 698 |
|
720 |
| - <target name="windows-check-arm-toolchain-distfile"> |
721 |
| - <available file="windows/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-win32.tar.gz" property="arm_distfile_available" /> |
722 |
| - </target> |
723 |
| - |
724 |
| - <target name="windows-get-arm-toolchain" depends="windows-check-arm-toolchain-distfile" unless="arm_distfile_available"> |
725 |
| - <!-- Retrieve ARM toolchain --> |
726 |
| - <get |
727 |
| - src="http://arduino.googlecode.com/files/gcc-arm-none-eabi-4.4.1-2010q1-188-win32.tar.gz" |
728 |
| - dest="windows/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-win32.tar.gz" |
729 |
| - verbose="true" /> |
730 |
| - </target> |
731 |
| - |
732 |
| - <target name="windows-check-arm-toolchain"> |
733 |
| - <available file="windows/work/hardware/tools/g++_arm_none_eabi" property="arm_available" /> |
734 |
| - </target> |
735 |
| - |
736 |
| - <target name="windows-unzip-arm-toolchain" depends="windows-get-arm-toolchain, windows-check-arm-toolchain" unless="arm_available"> |
737 |
| - <checksum file="windows/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-win32.tar.gz" algorithm="sha" |
738 |
| - fileext=".sha" verifyproperty="checksum.matches"/> |
739 |
| - <condition property="checksum.matches.fail"> |
740 |
| - <equals arg1="${checksum.matches}" arg2="false"/> |
741 |
| - </condition> |
742 |
| - <fail if="checksum.matches.fail">Checksum failed. |
743 |
| - |
744 |
| - File gcc-arm-none-eabi-4.4.1-2010q1-188-win32.tar.gz failed checksum. |
745 |
| - Please remove "windows/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-win32.tar.gz" to download it again. |
746 |
| - </fail> |
747 |
| - |
748 |
| - <!-- Unzip toolchain to the destination folder --> |
749 |
| - <exec executable="tar"> |
750 |
| - <arg value="xfz"/> |
751 |
| - <arg value="windows/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-win32.tar.gz"/> |
752 |
| - <arg value="--directory=windows/work/hardware/tools"/> |
753 |
| - </exec> |
754 |
| - </target> |
755 |
| - |
756 | 699 | <target name="windows-dist" depends="windows-build"
|
757 | 700 | description="Create .zip files of windows version">
|
758 | 701 |
|
|
0 commit comments