|
16 | 16 | <condition property="platform" value="linux32"><os family="unix" arch="i386" /></condition> |
17 | 17 | <condition property="platform" value="linux64"><os family="unix" arch="amd64" /></condition> |
18 | 18 |
|
| 19 | + <condition property="staging_folder" value="macosx"><os family="mac" /></condition> |
| 20 | + <condition property="staging_folder" value="windows"><os family="windows" /></condition> |
| 21 | + <condition property="staging_folder" value="linux"><os family="unix" arch="i386" /></condition> |
| 22 | + <condition property="staging_folder" value="linux"><os family="unix" arch="amd64" /></condition> |
| 23 | + |
| 24 | + <condition property="staging_hardware_folder" value="Arduino.app/Contents/Resources/Java/hardware"><os family="mac" /></condition> |
| 25 | + <condition property="staging_hardware_folder" value="hardware"><os family="windows" /></condition> |
| 26 | + <condition property="staging_hardware_folder" value="hardware"><os family="unix" arch="i386" /></condition> |
| 27 | + <condition property="staging_hardware_folder" value="hardware"><os family="unix" arch="amd64" /></condition> |
| 28 | + |
19 | 29 | <!-- Libraries required for running arduino --> |
20 | 30 | <fileset dir=".." id="runtime.jars"> |
21 | 31 | <include name="core/core.jar" /> |
|
174 | 184 | <fail message="wrong platform (${os.name})" /> |
175 | 185 | </target> |
176 | 186 |
|
177 | | - <target name="macosx-build" if="macosx" depends="revision-check, macosx-checkos, subprojects-build, macosx-check-arm-toolchain" description="Build Mac OS X version"> |
| 187 | + <target name="macosx-build" if="macosx" depends="revision-check, macosx-checkos, subprojects-build" description="Build Mac OS X version"> |
178 | 188 | <mkdir dir="macosx/work" /> |
179 | 189 |
|
180 | 190 | <!-- assemble the pde --> |
|
223 | 233 | <param name="target.path" value="macosx/work/Arduino.app/Contents/Resources/Java" /> |
224 | 234 | </antcall> |
225 | 235 |
|
226 | | - <antcall target="macosx-unzip-arm-toolchain" /> |
| 236 | + <antcall target="unzip-arm-toolchain"> |
| 237 | + <param name="dist_file" value="gcc-arm-none-eabi-4.7.4-2013q2-mac.tar.gz" /> |
| 238 | + <param name="dist_url" value="http://arduino.googlecode.com/files/gcc-arm-none-eabi-4.7.4-2013q2-mac.tar.gz" /> |
| 239 | + <param name="dist_check_file" value="gcc-arm-none-eabi-4.7.4-2013q2" /> |
| 240 | + </antcall> |
227 | 241 |
|
228 | 242 | <delete includeEmptyDirs="true" quiet="true"> |
229 | 243 | <fileset dir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools" includes="**/3.4.6/**/*"/> |
|
241 | 255 | <exec executable="macosx/work/Arduino.app/Contents/MacOS/JavaApplicationStub" spawn="false"/> |
242 | 256 | </target> |
243 | 257 |
|
244 | | - <target name="macosx-check-arm-toolchain-distfile"> |
245 | | - <available file="macosx/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz" property="arm_distfile_available" /> |
246 | | - </target> |
247 | | - |
248 | | - <target name="macosx-get-arm-toolchain" depends="macosx-check-arm-toolchain-distfile" unless="arm_distfile_available"> |
249 | | - <!-- Retrieve ARM toolchain --> |
250 | | - <get |
251 | | - src="http://arduino.googlecode.com/files/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz" |
252 | | - dest="macosx/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz" verbose="true" /> |
253 | | - </target> |
254 | | - |
255 | | - <target name="macosx-check-arm-toolchain"> |
256 | | - <available file="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/g++_arm_none_eabi" |
257 | | - property="arm_available" /> |
258 | | - </target> |
259 | | - |
260 | | - <target name="macosx-unzip-arm-toolchain" depends="macosx-get-arm-toolchain, macosx-check-arm-toolchain" unless="arm_available"> |
261 | | - <checksum file="macosx/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz" algorithm="sha" |
262 | | - fileext=".sha" verifyproperty="checksum.matches"/> |
263 | | - <condition property="checksum.matches.fail"> |
264 | | - <equals arg1="${checksum.matches}" arg2="false"/> |
265 | | - </condition> |
266 | | - <fail if="checksum.matches.fail">Checksum failed. |
267 | | - |
268 | | - File gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz failed checksum. |
269 | | - Please remove "macosx/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz" to download it again. |
270 | | - </fail> |
271 | | - |
272 | | - <!-- ...and unzip on the destination folder --> |
273 | | - <exec executable="tar" output="/dev/null"> |
274 | | - <arg value="xfz"/> |
275 | | - <arg value="macosx/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz"/> |
276 | | - <arg value="--directory=macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/"/> |
277 | | - </exec> |
278 | | - </target> |
279 | | - |
280 | 258 | <!-- - - - - - - - - - - - - - - - --> |
281 | 259 | <!-- Sign application for MacOSX. --> |
282 | 260 | <!-- - - - - - - - - - - - - - - - --> |
|
475 | 453 |
|
476 | 454 | <target name="linux32-build" depends="linux-build" description="Build linux (32-bit) version"> |
477 | 455 | <!-- Unzip ARM tools --> |
478 | | - <antcall target="linux-unzip-arm-toolchain"> |
| 456 | + <antcall target="unzip-arm-toolchain"> |
479 | 457 | <param name="dist_file" value="gcc-arm-none-eabi-4.7.4-2013q2-linux32.tar.gz" /> |
480 | 458 | <param name="dist_url" value="http://arduino.googlecode.com/files/gcc-arm-none-eabi-4.7.4-2013q2-linux32.tar.gz" /> |
481 | 459 | <param name="dist_check_file" value="gcc-arm-none-eabi-4.7.4-2013q2" /> |
|
495 | 473 | <chmod perm="755" file="linux/work/hardware/tools/avrdude" /> |
496 | 474 |
|
497 | 475 | <!-- Unzip ARM tools --> |
498 | | - <antcall target="linux-unzip-arm-toolchain"> |
| 476 | + <antcall target="unzip-arm-toolchain"> |
499 | 477 | <param name="dist_file" value="gcc-arm-none-eabi-4.7.4-2013q2-linux64.tar.gz" /> |
500 | 478 | <param name="dist_url" value="http://arduino.googlecode.com/files/gcc-arm-none-eabi-4.7.4-2013q2-linux64.tar.gz" /> |
501 | 479 | <param name="dist_check_file" value="gcc-arm-none-eabi-4.7.4-2013q2" /> |
|
516 | 494 | <exec executable="./linux/work/arduino" spawn="false"/> |
517 | 495 | </target> |
518 | 496 |
|
519 | | - <!-- Set 'arm_disfile_available' property if ARM toolchain dist_file is downloaded --> |
| 497 | + <!-- Set 'arm_disfile_available' property if ARM toolchain dist_file is downloaded --> |
520 | 498 | <!-- Set 'arm_toolchain_installed' property if ARM toolchain is installed in working directory --> |
521 | | - <target name="linux-check-arm-toolchain"> |
522 | | - <available file="linux/dist/${dist_file}" property="arm_distfile_available" /> |
523 | | - <available file="linux/work/hardware/tools/${dist_check_file}" property="arm_toolchain_installed" /> |
| 499 | + <target name="check-arm-toolchain"> |
| 500 | + <available file="${staging_folder}/dist/${dist_file}" property="arm_distfile_available" /> |
| 501 | + <available file="${staging_folder}/work/hardware/tools/${dist_check_file}" property="arm_toolchain_installed" /> |
524 | 502 | </target> |
525 | 503 |
|
526 | 504 | <!-- Retrieve ARM toolchain --> |
527 | | - <target name="linux-get-arm-toolchain" depends="linux-check-arm-toolchain" unless="arm_distfile_available"> |
528 | | - <get src="${dist_url}" dest="linux/dist/${dist_file}" verbose="true" /> |
| 505 | + <target name="get-arm-toolchain" depends="check-arm-toolchain" unless="arm_distfile_available"> |
| 506 | + <get src="${dist_url}" dest="${staging_folder}/dist/${dist_file}" verbose="true" /> |
529 | 507 | </target> |
530 | 508 |
|
531 | | - <target name="linux-unzip-arm-toolchain" depends="linux-get-arm-toolchain, linux-check-arm-toolchain" |
| 509 | + <target name="unzip-arm-toolchain" depends="get-arm-toolchain, check-arm-toolchain" |
532 | 510 | unless="arm_toolchain_installed"> |
533 | | - <checksum file="linux/dist/${dist_file}" algorithm="sha" |
| 511 | + <checksum file="${staging_folder}/dist/${dist_file}" algorithm="sha" |
534 | 512 | fileext=".sha" verifyproperty="checksum.matches"/> |
535 | 513 | <condition property="checksum.matches.fail"> |
536 | 514 | <equals arg1="${checksum.matches}" arg2="false"/> |
537 | 515 | </condition> |
538 | 516 | <fail if="checksum.matches.fail">Checksum failed. |
539 | 517 |
|
540 | 518 | File ${dist_file} failed checksum. |
541 | | - Please remove "linux/dist/${dist_file}" to download it again. |
| 519 | + Please remove "${staging_folder}/dist/${dist_file}" to download it again. |
542 | 520 | </fail> |
543 | 521 |
|
544 | 522 | <!-- Unzip toolchain to the destination folder --> |
545 | 523 | <exec executable="tar" output="/dev/null" os="Linux"> |
546 | 524 | <arg value="xfz"/> |
547 | | - <arg value="linux/dist/${dist_file}"/> |
548 | | - <arg value="--directory=linux/work/hardware/tools"/> |
| 525 | + <arg value="${staging_folder}/dist/${dist_file}"/> |
| 526 | + <arg value="--directory=${staging_folder}/work/${staging_hardware_folder}/tools/"/> |
549 | 527 | </exec> |
550 | 528 | </target> |
551 | 529 |
|
|
690 | 668 | <fileset dir="windows/work" includes="**/*.html, **/*.dll, **/*.exe" /> |
691 | 669 | </chmod> |
692 | 670 |
|
693 | | - <antcall target="windows-unzip-arm-toolchain" /> |
| 671 | + <!-- Unzip ARM toolchain --> |
| 672 | + <antcall target="unzip-arm-toolchain"> |
| 673 | + <param name="dist_file" value="gcc-arm-none-eabi-4.7.4-2013q2-windows.tar.gz" /> |
| 674 | + <param name="dist_url" value="http://arduino.googlecode.com/files/gcc-arm-none-eabi-4.7.4-2013q2-windows.tar.gz" /> |
| 675 | + <param name="dist_check_file" value="gcc-arm-none-eabi-4.7.4-2013q2" /> |
| 676 | + </antcall> |
694 | 677 |
|
695 | 678 | <delete includeEmptyDirs="true" quiet="true"> |
696 | 679 | <fileset dir="windows/work/hardware/tools/avr/doc" /> |
|
703 | 686 | dir="windows/work" spawn="true"/> |
704 | 687 | </target> |
705 | 688 |
|
706 | | - <target name="windows-check-arm-toolchain-distfile"> |
707 | | - <available file="windows/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-win32.tar.gz" property="arm_distfile_available" /> |
708 | | - </target> |
709 | | - |
710 | | - <target name="windows-get-arm-toolchain" depends="windows-check-arm-toolchain-distfile" unless="arm_distfile_available"> |
711 | | - <!-- Retrieve ARM toolchain --> |
712 | | - <get |
713 | | - src="http://arduino.googlecode.com/files/gcc-arm-none-eabi-4.4.1-2010q1-188-win32.tar.gz" |
714 | | - dest="windows/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-win32.tar.gz" |
715 | | - verbose="true" /> |
716 | | - </target> |
717 | | - |
718 | | - <target name="windows-check-arm-toolchain"> |
719 | | - <available file="windows/work/hardware/tools/g++_arm_none_eabi" property="arm_available" /> |
720 | | - </target> |
721 | | - |
722 | | - <target name="windows-unzip-arm-toolchain" depends="windows-get-arm-toolchain, windows-check-arm-toolchain" unless="arm_available"> |
723 | | - <checksum file="windows/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-win32.tar.gz" algorithm="sha" |
724 | | - fileext=".sha" verifyproperty="checksum.matches"/> |
725 | | - <condition property="checksum.matches.fail"> |
726 | | - <equals arg1="${checksum.matches}" arg2="false"/> |
727 | | - </condition> |
728 | | - <fail if="checksum.matches.fail">Checksum failed. |
729 | | - |
730 | | - File gcc-arm-none-eabi-4.4.1-2010q1-188-win32.tar.gz failed checksum. |
731 | | - Please remove "windows/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-win32.tar.gz" to download it again. |
732 | | - </fail> |
733 | | - |
734 | | - <!-- Unzip toolchain to the destination folder --> |
735 | | - <exec executable="tar"> |
736 | | - <arg value="xfz"/> |
737 | | - <arg value="windows/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-win32.tar.gz"/> |
738 | | - <arg value="--directory=windows/work/hardware/tools"/> |
739 | | - </exec> |
740 | | - </target> |
741 | | - |
742 | 689 | <target name="windows-dist" depends="windows-build" |
743 | 690 | description="Create .zip files of windows version"> |
744 | 691 |
|
|
0 commit comments