mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-19 08:52:15 +01:00
Replace "unzip/tar" in build.xml by Ant's provided unzip/untar method
Replace the "unzip" and "tar" command used while building Arduino by the unzip and untar method that Ant provides. This fixes #8617, meaning that "ant run" will work again and no files/directories are created with weird permissions and share names anymore.
This commit is contained in:
parent
a87024dcd4
commit
126c79a3ed
@ -282,7 +282,7 @@
|
||||
<!-- copy hardware folder -->
|
||||
<target name="assemble-hardware" unless="light_bundle">
|
||||
<mkdir dir="${target.path}/hardware/arduino" />
|
||||
<antcall target="untar">
|
||||
<antcall target="untar-bz2">
|
||||
<param name="archive_file" value="avr-${AVRCORE-VERSION}.tar.bz2"/>
|
||||
<param name="archive_url" value="https://downloads.arduino.cc/cores/avr-${AVRCORE-VERSION}.tar.bz2"/>
|
||||
<param name="final_folder" value="${target.path}/hardware/arduino/avr"/>
|
||||
@ -528,9 +528,7 @@
|
||||
<delete dir="macosx/work/Arduino.app" />
|
||||
|
||||
<!-- Unzip unsigned app into working dir -->
|
||||
<exec executable="unzip" dir="macosx/work" failonerror="true">
|
||||
<arg line="../arduino-${version}-${platform}.zip" />
|
||||
</exec>
|
||||
<unzip src="../arduino-${version}-${platform}.zip" dest="macosx/work"/>
|
||||
|
||||
<!-- Unlock keychain file -->
|
||||
<exec executable="security" dir="macosx/work" failonerror="true">
|
||||
@ -895,26 +893,14 @@
|
||||
<!-- Ensure that the tool is downloaded and test checksums, if everything's ok unzip it on the tools folder -->
|
||||
<target name="untar" depends="untar-unzip-checksum" unless="${archive_file}_installed">
|
||||
<echo>Untarring ${archive_file} into folder ${dest_folder}</echo>
|
||||
<exec executable="tar" failonerror="true">
|
||||
<arg value="xf"/>
|
||||
<arg value="${archive_file}"/>
|
||||
<arg value="--directory=${dest_folder}"/>
|
||||
</exec>
|
||||
<untar src="${archive_file}" dest="${dest_folder}"/>
|
||||
</target>
|
||||
<target name="untar-bz2" depends="untar-unzip-checksum" unless="${archive_file}_installed">
|
||||
<echo>Untarring ${archive_file} into folder ${dest_folder}</echo>
|
||||
<untar src="${archive_file}" dest="${dest_folder}" compression="bzip2"/>
|
||||
</target>
|
||||
|
||||
<target name="unzip" depends="untar-unzip-checksum" unless="${archive_file}_installed">
|
||||
<echo>Unzipping ${archive_file} into folder ${dest_folder}</echo>
|
||||
<mkdir dir="${dest_folder}" />
|
||||
<exec executable="unzip" failonerror="true">
|
||||
<arg value="-q" />
|
||||
<arg value="-n" />
|
||||
<arg value="-d" />
|
||||
<arg value="${dest_folder}" />
|
||||
<arg value="${archive_file}" />
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="unzip-with-ant-task" depends="untar-unzip-checksum" unless="${archive_file}_installed">
|
||||
<echo>Unzipping ${archive_file} into folder ${dest_folder}</echo>
|
||||
<mkdir dir="${dest_folder}" />
|
||||
<unzip src="${archive_file}" dest="${dest_folder}"/>
|
||||
@ -994,7 +980,7 @@
|
||||
</target>
|
||||
|
||||
<target name="download-launch4j-windows">
|
||||
<antcall target="unzip-with-ant-task">
|
||||
<antcall target="unzip">
|
||||
<param name="archive_file" value="windows/launch4j-3.9-win32.zip"/>
|
||||
<param name="archive_url" value="https://downloads.arduino.cc/tools/launch4j-3.9-win32.zip"/>
|
||||
<param name="final_folder" value="windows/launcher/launch4j"/>
|
||||
@ -1068,7 +1054,7 @@
|
||||
|
||||
<delete dir="${staging_folder}/arduino-builder-windows" includeemptydirs="true"/>
|
||||
<mkdir dir="${staging_folder}/arduino-builder-windows"/>
|
||||
<antcall target="unzip-with-ant-task">
|
||||
<antcall target="unzip">
|
||||
<param name="archive_file" value="./arduino-builder-windows-${ARDUINO-BUILDER-VERSION}.zip" />
|
||||
<param name="archive_url" value="https://downloads.arduino.cc/tools/arduino-builder-windows-${ARDUINO-BUILDER-VERSION}.zip" />
|
||||
<param name="final_folder" value="${staging_folder}/arduino-builder-windows/arduino-builder.exe" />
|
||||
@ -1087,42 +1073,33 @@
|
||||
</copy>
|
||||
<delete dir="${staging_folder}/arduino-builder-windows" includeemptydirs="true"/>
|
||||
|
||||
<exec executable="unzip" failonerror="true">
|
||||
<arg value="-q" />
|
||||
<arg value="-n" />
|
||||
<arg value="-j" />
|
||||
<arg value="-d" />
|
||||
<arg value="windows/work/lib" />
|
||||
<arg value="../arduino-core/lib/jna-4.2.2.jar" />
|
||||
<arg value="com/sun/jna/win32-x86/jnidispatch.dll" />
|
||||
</exec>
|
||||
<unzip src="../arduino-core/lib/jna-4.2.2.jar" dest="windows/work/lib">
|
||||
<patternset>
|
||||
<include name="com/sun/jna/win32-x86/jnidispatch.dll"/>
|
||||
</patternset>
|
||||
<mapper type="flatten"/>
|
||||
</unzip>
|
||||
<move file="windows/work/lib/jnidispatch.dll" tofile="windows/work/lib/jnidispatch-4.2.2-win32-x86.dll" />
|
||||
<antcall target="make-file-executable">
|
||||
<param name="file" value="windows/work/lib/jnidispatch-4.2.2-win32-x86.dll" />
|
||||
</antcall>
|
||||
|
||||
<exec executable="unzip" failonerror="true">
|
||||
<arg value="-q" />
|
||||
<arg value="-n" />
|
||||
<arg value="-j" />
|
||||
<arg value="-d" />
|
||||
<arg value="windows/work/lib" />
|
||||
<arg value="../arduino-core/lib/jssc-2.8.0-arduino3.jar" />
|
||||
<arg value="libs/windows/jSSC-2.8_x86.dll" />
|
||||
</exec>
|
||||
<unzip src="../arduino-core/lib/jssc-2.8.0-arduino3.jar" dest="windows/work/lib">
|
||||
<patternset>
|
||||
<include name="libs/windows/jSSC-2.8_x86.dll"/>
|
||||
</patternset>
|
||||
<mapper type="flatten"/>
|
||||
</unzip>
|
||||
<move file="windows/work/lib/jSSC-2.8_x86.dll" tofile="windows/work/lib/jSSC-2.8_x86.dll" />
|
||||
<antcall target="make-file-executable">
|
||||
<param name="file" value="windows/work/lib/jSSC-2.8_x86.dll" />
|
||||
</antcall>
|
||||
<exec executable="unzip" failonerror="true">
|
||||
<arg value="-q" />
|
||||
<arg value="-n" />
|
||||
<arg value="-j" />
|
||||
<arg value="-d" />
|
||||
<arg value="windows/work/lib" />
|
||||
<arg value="../arduino-core/lib/jssc-2.8.0-arduino3.jar" />
|
||||
<arg value="libs/windows/jSSC-2.8_x86_64.dll" />
|
||||
</exec>
|
||||
<unzip src="../arduino-core/lib/jssc-2.8.0-arduino3.jar" dest="windows/work/lib">
|
||||
<patternset>
|
||||
<include name="libs/windows/jSSC-2.8_x86_64.dll"/>
|
||||
</patternset>
|
||||
<mapper type="flatten"/>
|
||||
</unzip>
|
||||
<move file="windows/work/lib/jSSC-2.8_x86_64.dll" tofile="windows/work/lib/jSSC-2.8_x86_64.dll" />
|
||||
<antcall target="make-file-executable">
|
||||
<param name="file" value="windows/work/lib/jSSC-2.8_x86_64.dll" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user