|
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>
|
|
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.3.2/" 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" />
|
|
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 | 506 | <antcall target="unzip-arm-toolchain">
|
514 | 507 | <param name="dist_file" value="gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz" />
|
|
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.3.2.zip" dest="${staging_folder}" usetimestamp="true" ignoreerrors="true" /> |
| 528 | + |
| 529 | + <checksum file="${staging_folder}/avr-toolchain-${file_arch}-gcc-4.3.2.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.3.2.zip failed checksum. |
| 536 | + Please remove "${staging_folder}/avr-toolchain-${file_arch}-gcc-4.3.2.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.3.2.zip" /> |
| 546 | + </exec> |
| 547 | + </target> |
| 548 | + |
534 | 549 | <!-- Set 'arm_disfile_available' property if ARM toolchain dist_file is downloaded -->
|
535 | 550 | <!-- Set 'arm_toolchain_installed' property if ARM toolchain is installed in working directory -->
|
536 | 551 | <target name="check-arm-toolchain">
|
|
540 | 555 |
|
541 | 556 | <!-- Retrieve ARM toolchain -->
|
542 | 557 | <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" /> |
| 558 | + <get src="${dist_url}" dest="${staging_folder}/dist/${dist_file}" verbose="true" ignoreerrors="true" /> |
544 | 559 | </target>
|
545 | 560 |
|
546 | 561 | <target name="unzip-arm-toolchain" depends="get-arm-toolchain, check-arm-toolchain"
|
|
684 | 699 | </copy>
|
685 | 700 |
|
686 | 701 | <!-- 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> |
| 702 | + <antcall target="unzip-avr-toolchain"> |
| 703 | + <param name="file_arch" value="win32" /> |
| 704 | + </antcall> |
693 | 705 |
|
694 | 706 | <get src="http://downloads.arduino.cc/libastylej-2.03.zip" dest="windows" usetimestamp="true" skipexisting="true" />
|
695 | 707 | <unzip src="windows/libastylej-2.03.zip" dest="windows" overwrite="true"/>
|
|
770 | 782 | prefix="arduino-${version}" />
|
771 | 783 | </zip>
|
772 | 784 |
|
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 | 785 | <echo>
|
780 | 786 | =======================================================
|
781 | 787 | Arduino for Windows was built. Grab the archive from
|
782 | 788 |
|
783 | 789 | windows/arduino-${version}-${platform}.zip
|
784 |
| - windows/arduino-${version}-${platform}-expert.zip |
785 | 790 | =======================================================
|
786 | 791 | </echo>
|
787 | 792 | </target>
|
|
0 commit comments