|
186 | 186 | <fail message="wrong platform (${os.name})" />
|
187 | 187 | </target>
|
188 | 188 |
|
189 |
| - <target name="macosx-build" if="macosx" depends="revision-check, macosx-checkos, subprojects-build" description="Build Mac OS X version"> |
| 189 | + <target name="macosx-build" if="macosx" depends="revision-check, macosx-checkos, subprojects-build, macosx-check-arm-toolchain" description="Build Mac OS X version"> |
190 | 190 | <mkdir dir="macosx/work" />
|
191 | 191 |
|
192 | 192 | <!-- assemble the pde -->
|
|
221 | 221 | <arg value="macosx/dist/tools-universal.zip" />
|
222 | 222 | </exec>
|
223 | 223 |
|
224 |
| - <exec executable="unzip"> |
225 |
| - <arg value="-q" /> |
226 |
| - <arg value="-n" /> |
227 |
| - <arg value="-d" /> |
228 |
| - <arg value="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/" /> |
229 |
| - <arg value="macosx/dist/CodeSourcery_arm.zip" /> |
230 |
| - </exec> |
231 |
| - |
232 |
| - <exec executable="mv"> |
233 |
| - <arg value="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/CodeSourcery_arm" /> |
234 |
| - <arg value="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/g++_arm_none_eabi" /> |
235 |
| - </exec> |
236 |
| - |
237 | 224 | <copy todir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/">
|
238 | 225 | <fileset file="macosx/dist/bossac" />
|
239 | 226 | </copy>
|
|
247 | 234 | <antcall target="assemble">
|
248 | 235 | <param name="target.path" value="macosx/work/Arduino.app/Contents/Resources/Java" />
|
249 | 236 | </antcall>
|
| 237 | + |
| 238 | + <antcall target="get-arm-toolchain-help" /> |
250 | 239 | </target>
|
251 | 240 |
|
252 | 241 | <target name="macosx-run" depends="macosx-build" description="Run Mac OS X version">
|
|
257 | 246 | <exec executable="macosx/work/Arduino.app/Contents/MacOS/JavaApplicationStub" spawn="false"/>
|
258 | 247 | </target>
|
259 | 248 |
|
| 249 | + <target name="macosx-check-arm-toolchain"> |
| 250 | + <available file="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/g++_arm_none_eabi" |
| 251 | + property="arm_available" /> |
| 252 | + <condition property="arm_not_available"> |
| 253 | + <not> |
| 254 | + <isset property="arm_available" /> |
| 255 | + </not> |
| 256 | + </condition> |
| 257 | + </target> |
| 258 | + |
| 259 | + <target name="macosx-get-arm-toolchain" depends="macosx-check-arm-toolchain" if="arm_not_available"> |
| 260 | + <!-- Retrieve ARM toolchain... --> |
| 261 | + <get |
| 262 | + src="http://arduino.googlecode.com/files/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz" |
| 263 | + dest="macosx/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz" |
| 264 | + skipexisting="true" verbose="true" /> |
| 265 | + <checksum file="macosx/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz" algorithm="sha" |
| 266 | + fileext=".sha" verifyproperty="checksum.matches"/> |
| 267 | + <condition property="checksum.matches.fail"> |
| 268 | + <equals arg1="${checksum.matches}" arg2="false"/> |
| 269 | + </condition> |
| 270 | + <fail if="checksum.matches.fail"> |
| 271 | + File gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz failed checksum. |
| 272 | + Please remove "macosx/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz" to download it again. |
| 273 | + </fail> |
| 274 | + |
| 275 | + <!-- ...and unzip on the destination folder --> |
| 276 | + <exec executable="tar" output="/dev/null"> |
| 277 | + <arg value="xfz"/> |
| 278 | + <arg value="macosx/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-macos.tar.gz"/> |
| 279 | + <arg value="--directory=macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/"/> |
| 280 | + </exec> |
| 281 | + </target> |
| 282 | + |
260 | 283 | <target name="macosx-dist" if="macosx" depends="macosx-build" description="Create a downloadable .zip for the Mac OS X version">
|
261 | 284 | <!-- The ant copy command does not preserve permissions. -->
|
262 | 285 | <chmod file="macosx/work/Arduino.app/Contents/MacOS/JavaApplicationStub" perm="+x" />
|
|
389 | 412 | <chmod perm="755" file="linux/work/hardware/tools/bossac" />
|
390 | 413 | <chmod perm="755" file="linux/work/hardware/tools/bossac64" />
|
391 | 414 |
|
| 415 | + <copy todir="linux/work" file="linux/dist/arduino" /> |
| 416 | + <chmod perm="755" file="linux/work/arduino" /> |
| 417 | + |
392 | 418 | <antcall target="get-arm-toolchain-help" />
|
393 | 419 | </target>
|
394 | 420 |
|
|
438 | 464 | <arg value="linux/dist/gcc-arm-none-eabi-4.4.1-2010q1-188-linux32.tar.gz"/>
|
439 | 465 | <arg value="--directory=linux/work/hardware/tools"/>
|
440 | 466 | </exec>
|
441 |
| - |
442 |
| - <copy todir="linux/work" file="linux/dist/arduino" /> |
443 |
| - <chmod perm="755" file="linux/work/arduino" /> |
444 | 467 | </target>
|
445 | 468 |
|
446 | 469 | <target name="linux-dist" depends="build"
|
|
0 commit comments