1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-11-29 10:24:12 +01:00

[sam] added toolchain download for Mac

This commit is contained in:
Cristian Maglie 2012-05-16 13:44:51 +02:00
parent d5a1938530
commit d02af8b680
3 changed files with 41 additions and 17 deletions

View File

@ -186,7 +186,7 @@
<fail message="wrong platform (${os.name})" />
</target>
<target name="macosx-build" if="macosx" depends="revision-check, macosx-checkos, subprojects-build" description="Build Mac OS X version">
<target name="macosx-build" if="macosx" depends="revision-check, macosx-checkos, subprojects-build, macosx-check-arm-toolchain" description="Build Mac OS X version">
<mkdir dir="macosx/work" />
<!-- assemble the pde -->
@ -221,19 +221,6 @@
<arg value="macosx/dist/tools-universal.zip" />
</exec>
<exec executable="unzip">
<arg value="-q" />
<arg value="-n" />
<arg value="-d" />
<arg value="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/" />
<arg value="macosx/dist/CodeSourcery_arm.zip" />
</exec>
<exec executable="mv">
<arg value="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/CodeSourcery_arm" />
<arg value="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/g++_arm_none_eabi" />
</exec>
<copy todir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/">
<fileset file="macosx/dist/bossac" />
</copy>
@ -247,6 +234,8 @@
<antcall target="assemble">
<param name="target.path" value="macosx/work/Arduino.app/Contents/Resources/Java" />
</antcall>
<antcall target="get-arm-toolchain-help" />
</target>
<target name="macosx-run" depends="macosx-build" description="Run Mac OS X version">
@ -257,6 +246,40 @@
<exec executable="macosx/work/Arduino.app/Contents/MacOS/JavaApplicationStub" spawn="false"/>
</target>
<target name="macosx-check-arm-toolchain">
<available file="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/g++_arm_none_eabi"
property="arm_available" />
<condition property="arm_not_available">
<not>
<isset property="arm_available" />
</not>
</condition>
</target>
<target name="macosx-get-arm-toolchain" depends="macosx-check-arm-toolchain" if="arm_not_available">
<!-- Retrieve ARM toolchain... -->
<get
src="http://arduino.googlecode.com/files/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz"
dest="macosx/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz"
skipexisting="true" verbose="true" />
<checksum file="macosx/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz" algorithm="sha"
fileext=".sha" verifyproperty="checksum.matches"/>
<condition property="checksum.matches.fail">
<equals arg1="${checksum.matches}" arg2="false"/>
</condition>
<fail if="checksum.matches.fail">
File gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz failed checksum.
Please remove "macosx/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz" to download it again.
</fail>
<!-- ...and unzip on the destination folder -->
<exec executable="tar" output="/dev/null">
<arg value="xfz"/>
<arg value="macosx/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz"/>
<arg value="--directory=macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/"/>
</exec>
</target>
<target name="macosx-dist" if="macosx" depends="macosx-build" description="Create a downloadable .zip for the Mac OS X version">
<!-- The ant copy command does not preserve permissions. -->
<chmod file="macosx/work/Arduino.app/Contents/MacOS/JavaApplicationStub" perm="+x" />
@ -389,6 +412,9 @@
<chmod perm="755" file="linux/work/hardware/tools/bossac" />
<chmod perm="755" file="linux/work/hardware/tools/bossac64" />
<copy todir="linux/work" file="linux/dist/arduino" />
<chmod perm="755" file="linux/work/arduino" />
<antcall target="get-arm-toolchain-help" />
</target>
@ -438,9 +464,6 @@
<arg value="linux/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz"/>
<arg value="--directory=linux/work/hardware/tools"/>
</exec>
<copy todir="linux/work" file="linux/dist/arduino" />
<chmod perm="755" file="linux/work/arduino" />
</target>
<target name="linux-dist" depends="build"

Binary file not shown.

View File

@ -0,0 +1 @@
14c554bb9aa9f0d0262a593e7452d33f4babc60d