|
114 | 114 | <include name="arduino-core/lib/*.jar" />
|
115 | 115 | </fileset>
|
116 | 116 |
|
| 117 | + <!-- Remove all default excludes for directory tasks (see https://ant.apache.org/manual/dirtasks.html#defaultexcludes) --> |
| 118 | + <defaultexcludes remove="**/.git"/> |
| 119 | + <defaultexcludes remove="**/.git/**"/> |
| 120 | + <defaultexcludes remove="**/.gitattributes"/> |
| 121 | + <defaultexcludes remove="**/.gitignore"/> |
| 122 | + <defaultexcludes remove="**/.gitmodules"/> |
| 123 | + <defaultexcludes remove="**/.hg"/> |
| 124 | + <defaultexcludes remove="**/.hg/**"/> |
| 125 | + <defaultexcludes remove="**/.hgignore"/> |
| 126 | + <defaultexcludes remove="**/.hgsub"/> |
| 127 | + <defaultexcludes remove="**/.hgsubstate"/> |
| 128 | + <defaultexcludes remove="**/.hgtags"/> |
| 129 | + <defaultexcludes remove="**/.bzr"/> |
| 130 | + <defaultexcludes remove="**/.bzr/**"/> |
| 131 | + <defaultexcludes remove="**/.bzrignore"/> |
| 132 | + |
117 | 133 | <target name="build" description="Build Arduino.">
|
118 | 134 | <antcall target="${platform}-build" />
|
119 | 135 |
|
|
282 | 298 | <!-- copy hardware folder -->
|
283 | 299 | <target name="assemble-hardware" unless="light_bundle">
|
284 | 300 | <mkdir dir="${target.path}/hardware/arduino" />
|
285 |
| - <antcall target="untar"> |
| 301 | + <antcall target="untar-bz2"> |
286 | 302 | <param name="archive_file" value="avr-${AVRCORE-VERSION}.tar.bz2"/>
|
287 | 303 | <param name="archive_url" value="https://downloads.arduino.cc/cores/avr-${AVRCORE-VERSION}.tar.bz2"/>
|
288 | 304 | <param name="final_folder" value="${target.path}/hardware/arduino/avr"/>
|
|
496 | 512 | <!-- Unzip AVR tools -->
|
497 | 513 | <target name="macosx-build-avr-toolchain" unless="light_bundle">
|
498 | 514 | <antcall target="avr-toolchain-bundle">
|
499 |
| - <param name="unpack_target" value="untar"/> |
| 515 | + <param name="unpack_target" value="untar-native"/> |
500 | 516 | <param name="gcc_archive_file" value="avr-gcc-${AVRGCC-VERSION}-i386-apple-darwin11.tar.bz2"/>
|
501 | 517 | <param name="gcc_version" value="${AVRGCC-VERSION}"/>
|
502 | 518 | <param name="avrdude_archive_file" value="avrdude-${AVRDUDE-VERSION}-i386-apple-darwin11.tar.bz2"/>
|
|
528 | 544 | <delete dir="macosx/work/Arduino.app" />
|
529 | 545 |
|
530 | 546 | <!-- Unzip unsigned app into working dir -->
|
531 |
| - <exec executable="unzip" dir="macosx/work" failonerror="true"> |
532 |
| - <arg line="../arduino-${version}-${platform}.zip" /> |
533 |
| - </exec> |
| 547 | + <unzip src="../arduino-${version}-${platform}.zip" dest="macosx/work"/> |
534 | 548 |
|
535 | 549 | <!-- Unlock keychain file -->
|
536 | 550 | <exec executable="security" dir="macosx/work" failonerror="true">
|
|
711 | 725 | <antcall target="build-arduino-builder" />
|
712 | 726 |
|
713 | 727 | <antcall target="avr-toolchain-bundle">
|
714 |
| - <param name="unpack_target" value="untar"/> |
| 728 | + <param name="unpack_target" value="untar-native"/> |
715 | 729 | <param name="gcc_archive_file" value="avr-gcc-${AVRGCC-VERSION}-armhf-pc-linux-gnu.tar.bz2"/>
|
716 | 730 | <param name="gcc_version" value="${AVRGCC-VERSION}"/>
|
717 | 731 | <param name="avrdude_archive_file" value="avrdude-${AVRDUDE-VERSION}-armhf-pc-linux-gnu.tar.bz2"/>
|
|
753 | 767 | <antcall target="build-arduino-builder" />
|
754 | 768 |
|
755 | 769 | <antcall target="avr-toolchain-bundle">
|
756 |
| - <param name="unpack_target" value="untar"/> |
| 770 | + <param name="unpack_target" value="untar-native"/> |
757 | 771 | <param name="gcc_archive_file" value="avr-gcc-${AVRGCC-VERSION}-aarch64-pc-linux-gnu.tar.bz2"/>
|
758 | 772 | <param name="gcc_version" value="${AVRGCC-VERSION}"/>
|
759 | 773 | <param name="avrdude_archive_file" value="avrdude-${AVRDUDE-VERSION}-aarch64-pc-linux-gnu.tar.bz2"/>
|
|
771 | 785 | <antcall target="build-arduino-builder" />
|
772 | 786 |
|
773 | 787 | <antcall target="avr-toolchain-bundle">
|
774 |
| - <param name="unpack_target" value="untar"/> |
| 788 | + <param name="unpack_target" value="untar-native"/> |
775 | 789 | <param name="gcc_archive_file" value="avr-gcc-${AVRGCC-VERSION}-i686-pc-linux-gnu.tar.bz2"/>
|
776 | 790 | <param name="gcc_version" value="${AVRGCC-VERSION}"/>
|
777 | 791 | <param name="avrdude_archive_file" value="avrdude-${AVRDUDE-VERSION}-i686-pc-linux-gnu.tar.bz2"/>
|
|
789 | 803 | <antcall target="build-arduino-builder" />
|
790 | 804 |
|
791 | 805 | <antcall target="avr-toolchain-bundle">
|
792 |
| - <param name="unpack_target" value="untar"/> |
| 806 | + <param name="unpack_target" value="untar-native"/> |
793 | 807 | <param name="gcc_archive_file" value="avr-gcc-${AVRGCC-VERSION}-x86_64-pc-linux-gnu.tar.bz2"/>
|
794 | 808 | <param name="gcc_version" value="${AVRGCC-VERSION}"/>
|
795 | 809 | <param name="avrdude_archive_file" value="avrdude-${AVRDUDE-VERSION}-x86_64-pc-linux-gnu.tar.bz2"/>
|
|
838 | 852 | <target name="build-arduino-builder" unless="no_arduino_builder">
|
839 | 853 | <delete dir="${staging_folder}/arduino-builder-${platform}" includeemptydirs="true"/>
|
840 | 854 | <mkdir dir="${staging_folder}/arduino-builder-${platform}"/>
|
841 |
| - <antcall target="untar"> |
| 855 | + <antcall target="untar-native"> |
842 | 856 | <param name="archive_file" value="./arduino-builder-${platform}-${ARDUINO-BUILDER-VERSION}.tar.bz2" />
|
843 | 857 | <param name="archive_url" value="https://downloads.arduino.cc/tools/arduino-builder-${platform}-${ARDUINO-BUILDER-VERSION}.tar.bz2" />
|
844 | 858 | <param name="final_folder" value="${staging_folder}/arduino-builder-${platform}/arduino-builder" />
|
|
894 | 908 |
|
895 | 909 | <!-- Ensure that the tool is downloaded and test checksums, if everything's ok unzip it on the tools folder -->
|
896 | 910 | <target name="untar" depends="untar-unzip-checksum" unless="${archive_file}_installed">
|
| 911 | + <echo>Untarring ${archive_file} into folder ${dest_folder}</echo> |
| 912 | + <untar src="${archive_file}" dest="${dest_folder}"/> |
| 913 | + </target> |
| 914 | + <target name="untar-bz2" depends="untar-unzip-checksum" unless="${archive_file}_installed"> |
| 915 | + <echo>Untarring ${archive_file} into folder ${dest_folder}</echo> |
| 916 | + <untar src="${archive_file}" dest="${dest_folder}" compression="bzip2"/> |
| 917 | + </target> |
| 918 | + <target name="untar-native" depends="untar-unzip-checksum" unless="${archive_file}_installed"> |
897 | 919 | <echo>Untarring ${archive_file} into folder ${dest_folder}</echo>
|
898 | 920 | <exec executable="tar" failonerror="true">
|
899 | 921 | <arg value="xf"/>
|
|
903 | 925 | </target>
|
904 | 926 |
|
905 | 927 | <target name="unzip" depends="untar-unzip-checksum" unless="${archive_file}_installed">
|
906 |
| - <echo>Unzipping ${archive_file} into folder ${dest_folder}</echo> |
907 |
| - <mkdir dir="${dest_folder}" /> |
908 |
| - <exec executable="unzip" failonerror="true"> |
909 |
| - <arg value="-q" /> |
910 |
| - <arg value="-n" /> |
911 |
| - <arg value="-d" /> |
912 |
| - <arg value="${dest_folder}" /> |
913 |
| - <arg value="${archive_file}" /> |
914 |
| - </exec> |
915 |
| - </target> |
916 |
| - |
917 |
| - <target name="unzip-with-ant-task" depends="untar-unzip-checksum" unless="${archive_file}_installed"> |
918 | 928 | <echo>Unzipping ${archive_file} into folder ${dest_folder}</echo>
|
919 | 929 | <mkdir dir="${dest_folder}" />
|
920 | 930 | <unzip src="${archive_file}" dest="${dest_folder}"/>
|
|
994 | 1004 | </target>
|
995 | 1005 |
|
996 | 1006 | <target name="download-launch4j-windows">
|
997 |
| - <antcall target="unzip-with-ant-task"> |
| 1007 | + <antcall target="unzip"> |
998 | 1008 | <param name="archive_file" value="windows/launch4j-3.9-win32.zip"/>
|
999 | 1009 | <param name="archive_url" value="https://downloads.arduino.cc/tools/launch4j-3.9-win32.zip"/>
|
1000 | 1010 | <param name="final_folder" value="windows/launcher/launch4j"/>
|
|
1003 | 1013 | </target>
|
1004 | 1014 |
|
1005 | 1015 | <target name="download-launch4j-linux">
|
1006 |
| - <antcall target="untar"> |
| 1016 | + <antcall target="untar-native"> |
1007 | 1017 | <param name="archive_file" value="windows/launch4j-3.9-linux.tgz"/>
|
1008 | 1018 | <param name="archive_url" value="https://downloads.arduino.cc/tools/launch4j-3.9-linux.tgz"/>
|
1009 | 1019 | <param name="final_folder" value="windows/launcher/launch4j"/>
|
|
1068 | 1078 |
|
1069 | 1079 | <delete dir="${staging_folder}/arduino-builder-windows" includeemptydirs="true"/>
|
1070 | 1080 | <mkdir dir="${staging_folder}/arduino-builder-windows"/>
|
1071 |
| - <antcall target="unzip-with-ant-task"> |
| 1081 | + <antcall target="unzip"> |
1072 | 1082 | <param name="archive_file" value="./arduino-builder-windows-${ARDUINO-BUILDER-VERSION}.zip" />
|
1073 | 1083 | <param name="archive_url" value="https://downloads.arduino.cc/tools/arduino-builder-windows-${ARDUINO-BUILDER-VERSION}.zip" />
|
1074 | 1084 | <param name="final_folder" value="${staging_folder}/arduino-builder-windows/arduino-builder.exe" />
|
|
1087 | 1097 | </copy>
|
1088 | 1098 | <delete dir="${staging_folder}/arduino-builder-windows" includeemptydirs="true"/>
|
1089 | 1099 |
|
1090 |
| - <exec executable="unzip" failonerror="true"> |
1091 |
| - <arg value="-q" /> |
1092 |
| - <arg value="-n" /> |
1093 |
| - <arg value="-j" /> |
1094 |
| - <arg value="-d" /> |
1095 |
| - <arg value="windows/work/lib" /> |
1096 |
| - <arg value="../arduino-core/lib/jna-4.2.2.jar" /> |
1097 |
| - <arg value="com/sun/jna/win32-x86/jnidispatch.dll" /> |
1098 |
| - </exec> |
| 1100 | + <unzip src="../arduino-core/lib/jna-4.2.2.jar" dest="windows/work/lib"> |
| 1101 | + <patternset> |
| 1102 | + <include name="com/sun/jna/win32-x86/jnidispatch.dll"/> |
| 1103 | + </patternset> |
| 1104 | + <mapper type="flatten"/> |
| 1105 | + </unzip> |
1099 | 1106 | <move file="windows/work/lib/jnidispatch.dll" tofile="windows/work/lib/jnidispatch-4.2.2-win32-x86.dll" />
|
1100 | 1107 | <antcall target="make-file-executable">
|
1101 | 1108 | <param name="file" value="windows/work/lib/jnidispatch-4.2.2-win32-x86.dll" />
|
1102 | 1109 | </antcall>
|
1103 | 1110 |
|
1104 |
| - <exec executable="unzip" failonerror="true"> |
1105 |
| - <arg value="-q" /> |
1106 |
| - <arg value="-n" /> |
1107 |
| - <arg value="-j" /> |
1108 |
| - <arg value="-d" /> |
1109 |
| - <arg value="windows/work/lib" /> |
1110 |
| - <arg value="../arduino-core/lib/jssc-2.8.0-arduino3.jar" /> |
1111 |
| - <arg value="libs/windows/jSSC-2.8_x86.dll" /> |
1112 |
| - </exec> |
| 1111 | + <unzip src="../arduino-core/lib/jssc-2.8.0-arduino3.jar" dest="windows/work/lib"> |
| 1112 | + <patternset> |
| 1113 | + <include name="libs/windows/jSSC-2.8_x86.dll"/> |
| 1114 | + </patternset> |
| 1115 | + <mapper type="flatten"/> |
| 1116 | + </unzip> |
1113 | 1117 | <move file="windows/work/lib/jSSC-2.8_x86.dll" tofile="windows/work/lib/jSSC-2.8_x86.dll" />
|
1114 | 1118 | <antcall target="make-file-executable">
|
1115 | 1119 | <param name="file" value="windows/work/lib/jSSC-2.8_x86.dll" />
|
1116 | 1120 | </antcall>
|
1117 |
| - <exec executable="unzip" failonerror="true"> |
1118 |
| - <arg value="-q" /> |
1119 |
| - <arg value="-n" /> |
1120 |
| - <arg value="-j" /> |
1121 |
| - <arg value="-d" /> |
1122 |
| - <arg value="windows/work/lib" /> |
1123 |
| - <arg value="../arduino-core/lib/jssc-2.8.0-arduino3.jar" /> |
1124 |
| - <arg value="libs/windows/jSSC-2.8_x86_64.dll" /> |
1125 |
| - </exec> |
| 1121 | + <unzip src="../arduino-core/lib/jssc-2.8.0-arduino3.jar" dest="windows/work/lib"> |
| 1122 | + <patternset> |
| 1123 | + <include name="libs/windows/jSSC-2.8_x86_64.dll"/> |
| 1124 | + </patternset> |
| 1125 | + <mapper type="flatten"/> |
| 1126 | + </unzip> |
1126 | 1127 | <move file="windows/work/lib/jSSC-2.8_x86_64.dll" tofile="windows/work/lib/jSSC-2.8_x86_64.dll" />
|
1127 | 1128 | <antcall target="make-file-executable">
|
1128 | 1129 | <param name="file" value="windows/work/lib/jSSC-2.8_x86_64.dll" />
|
|
0 commit comments