|
265 | 265 | <fileset dir="macosx/work/${staging_hardware_folder}/tools" includes="**/man"/> |
266 | 266 | </delete> |
267 | 267 |
|
268 | | - <get src="http://downloads.arduino.cc/libastylej-2.04.zip" dest="macosx" usetimestamp="true" skipexisting="true"/> |
269 | | - <unzip src="macosx/libastylej-2.04.zip" dest="macosx" overwrite="true"/> |
| 268 | + <antcall target="unzip-libastyle" /> |
270 | 269 | <copy file="macosx/libastylej/libastylej.jnilib" todir="macosx/work/Arduino.app/Contents/Resources/Java/lib/" /> |
271 | 270 | <chmod perm="755" file="macosx/work/Arduino.app/Contents/Resources/Java/lib/libastylej.jnilib" /> |
272 | 271 | </target> |
|
480 | 479 | <copy todir="linux/work" file="linux/dist/arduino" /> |
481 | 480 | <chmod perm="755" file="linux/work/arduino" /> |
482 | 481 |
|
483 | | - <get src="http://downloads.arduino.cc/libastylej-2.04.zip" dest="linux" usetimestamp="true" skipexisting="true" /> |
484 | | - <unzip src="linux/libastylej-2.04.zip" dest="linux" overwrite="true"/> |
| 482 | + <antcall target="unzip-libastyle" /> |
485 | 483 | <copy file="linux/libastylej/libastylej${arch-bits}.so" tofile="linux/work/lib/libastylej.so" /> |
486 | 484 | <chmod perm="755" file="linux/work/lib/libastylej.so" /> |
487 | 485 | </target> |
|
545 | 543 | </exec> |
546 | 544 | </target> |
547 | 545 |
|
| 546 | + <target name="unzip-libastyle"> |
| 547 | + <get src="http://downloads.arduino.cc/libastylej-2.04.zip" dest="." usetimestamp="true" ignoreerrors="true" verbose="true" /> |
548 | 548 |
|
| 549 | + <checksum file="libastylej-2.04.zip" algorithm="sha" fileext=".sha" verifyproperty="checksum.matches"/> |
| 550 | + <condition property="checksum.matches.fail"> |
| 551 | + <equals arg1="${checksum.matches}" arg2="false"/> |
| 552 | + </condition> |
| 553 | + <fail if="checksum.matches.fail">Checksum failed. |
| 554 | + |
| 555 | + File libastylej-2.04.zip failed checksum. |
| 556 | + Please remove "libastylej-2.04.zip" and download it again. |
| 557 | + </fail> |
| 558 | + |
| 559 | + <unzip src="libastylej-2.04.zip" dest="${staging_folder}" overwrite="true"/> |
| 560 | + </target> |
549 | 561 |
|
550 | 562 | <!-- Set '${dist_file}_available' property if toolchain dist_file is downloaded --> |
551 | 563 | <!-- Set '${dist_file}_installed' property if toolchain is installed in working directory --> |
|
741 | 753 | <param name="file_arch" value="win32" /> |
742 | 754 | </antcall> |
743 | 755 |
|
744 | | - <get src="http://downloads.arduino.cc/libastylej-2.04.zip" dest="windows" usetimestamp="true" skipexisting="true" /> |
745 | | - <unzip src="windows/libastylej-2.04.zip" dest="windows" overwrite="true"/> |
| 756 | + <antcall target="unzip-libastyle" /> |
746 | 757 | <copy file="windows/libastylej/AStylej.dll" todir="windows/work/lib" /> |
747 | 758 |
|
748 | 759 | <!-- Copy bossac.exe tool --> |
|
0 commit comments