Skip to content

Commit

Permalink
build.xml and mac. Change in platform names: macosx now macosxnew, ol…
Browse files Browse the repository at this point in the history
…dmacosx now macosx
  • Loading branch information
Federico Fissore committed Feb 3, 2015
1 parent ce91178 commit 3303774
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 25 deletions.
44 changes: 20 additions & 24 deletions build/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<!--echo message="os.version = ${os.version}" /-->

<!-- Sets properties for macosx/windows/linux depending on current system -->
<condition property="platform" value="macosx"><os family="mac" /></condition>
<condition property="platform" value="oldmacosx">
<condition property="platform" value="macosxnew"><os family="mac" /></condition>
<condition property="platform" value="macosx">
<and>
<os family="mac" />
<matches string="${os.version}" pattern="^10.[56]." />
Expand All @@ -17,22 +17,22 @@
<condition property="platform" value="linux64"><os family="unix" arch="amd64" /></condition>

<condition property="macosx"><equals arg1="${platform}" arg2="macosx" /></condition>
<condition property="macosx"><equals arg1="${platform}" arg2="oldmacosx" /></condition>
<condition property="oldmacosx"><equals arg1="${platform}" arg2="oldmacosx" /></condition>
<condition property="macosx"><equals arg1="${platform}" arg2="macosxnew" /></condition>
<condition property="macosxnew"><equals arg1="${platform}" arg2="macosxnew" /></condition>
<condition property="windows"><equals arg1="${platform}" arg2="windows" /></condition>
<condition property="linux32"><equals arg1="${platform}" arg2="linux32" /></condition>
<condition property="linux64"><equals arg1="${platform}" arg2="linux64" /></condition>
<condition property="linux"><equals arg1="${platform}" arg2="linux32" /></condition>
<condition property="linux"><equals arg1="${platform}" arg2="linux64" /></condition>

<condition property="staging_folder" value="macosx"><equals arg1="${platform}" arg2="macosxnew" /></condition>
<condition property="staging_folder" value="macosx"><equals arg1="${platform}" arg2="macosx" /></condition>
<condition property="staging_folder" value="macosx"><equals arg1="${platform}" arg2="oldmacosx" /></condition>
<condition property="staging_folder" value="windows"><equals arg1="${platform}" arg2="windows" /></condition>
<condition property="staging_folder" value="linux"><equals arg1="${platform}" arg2="linux32" /></condition>
<condition property="staging_folder" value="linux"><equals arg1="${platform}" arg2="linux64" /></condition>

<condition property="staging_hardware_folder" value="Arduino.app/Contents/Java/hardware"><equals arg1="${platform}" arg2="macosx" /></condition>
<condition property="staging_hardware_folder" value="Arduino.app/Contents/Resources/Java/hardware"><equals arg1="${platform}" arg2="oldmacosx" /></condition>
<condition property="staging_hardware_folder" value="Arduino.app/Contents/Java/hardware"><equals arg1="${platform}" arg2="macosxnew" /></condition>
<condition property="staging_hardware_folder" value="Arduino.app/Contents/Resources/Java/hardware"><equals arg1="${platform}" arg2="macosx" /></condition>
<condition property="staging_hardware_folder" value="hardware"><equals arg1="${platform}" arg2="windows" /></condition>
<condition property="staging_hardware_folder" value="hardware"><equals arg1="${platform}" arg2="linux32" /></condition>
<condition property="staging_hardware_folder" value="hardware"><equals arg1="${platform}" arg2="linux64" /></condition>
Expand Down Expand Up @@ -190,7 +190,7 @@
<!-- Mac OS X -->
<!-- - - - - - - - -->

<target name="oldmacosx-clean" depends="macosx-clean" description="Clean Mac OS X build"/>
<target name="macosxnew-clean" depends="macosx-clean" description="Clean Mac OS X build"/>

<target name="macosx-clean" depends="subprojects-clean" description="Clean Mac OS X build">
<delete dir="macosx/work" />
Expand All @@ -213,7 +213,7 @@
<fail message="wrong platform (${os.name})" />
</target>

<target name="oldmacosx-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" description="Build Mac OS X version">
<mkdir dir="macosx/work" />

<!-- assemble the pde -->
Expand Down Expand Up @@ -241,7 +241,7 @@

</target>

<target name="macosx-build" if="macosx" depends="revision-check, macosx-checkos, subprojects-build" description="Build Mac OS X version">
<target name="macosxnew-build" if="macosx" depends="revision-check, macosx-checkos, subprojects-build" description="Build Mac OS X version">
<antcall target="unzip">
<param name="archive_file" value="${staging_folder}/appbundler-1.0ea.jar.zip" />
<param name="archive_url" value="http://arduino.cc/download.php?f=/appbundler-1.0ea.jar.zip" />
Expand Down Expand Up @@ -369,19 +369,19 @@

</target>

<target name="oldmacosx-run" depends="oldmacosx-build" description="Run Mac OS X version">
<target name="macosx-run" depends="macosx-build" description="Run Mac OS X version">
<antcall target="macosx-run-common"/>
</target>

<target name="macosx-run" depends="macosx-build" description="Run Mac OS X version">
<target name="macosxnew-run" depends="macosxnew-build" description="Run Mac OS X version">
<antcall target="macosx-run-common"/>
</target>

<target name="oldmacosx-debug" depends="oldmacosx-build" description="Run Mac OS X version">
<target name="macosx-debug" depends="macosx-build" description="Run Mac OS X version">
<antcall target="macosx-debug-common"/>
</target>

<target name="macosx-debug" depends="macosx-build" description="Run Mac OS X version">
<target name="macosxnew-debug" depends="macosxnew-build" description="Run Mac OS X version">
<antcall target="macosx-debug-common"/>
</target>

Expand Down Expand Up @@ -452,28 +452,24 @@
<!-- - - - - - - - - - - - - - - - - - - -->
<!-- Build distribution file for MacOSX. -->
<!-- - - - - - - - - - - - - - - - - - - -->
<target name="oldmacosx-dist" if="macosx" depends="oldmacosx-build" description="Create a downloadable .zip for the Mac OS X version">
<antcall target="macosx-dist-common">
<param name="custom_platform" value="macosx"/>
</antcall>
<target name="macosx-dist" if="macosx" depends="macosx-build" description="Create a downloadable .zip for the Mac OS X version">
<antcall target="macosx-dist-common"/>
</target>

<target name="macosx-dist" if="macosx" depends="macosx-build" description="Create a downloadable .zip for the Mac OS X version">
<antcall target="macosx-dist-common">
<param name="custom_platform" value="macosx-new"/>
</antcall>
<target name="macosxnew-dist" if="macosx" depends="macosxnew-build" description="Create a downloadable .zip for the Mac OS X version">
<antcall target="macosx-dist-common"/>
</target>

<target name="macosx-dist-common">
<exec executable="zip" dir="macosx/work">
<arg line="-q -r ../arduino-${version}-${custom_platform}.zip ." />
<arg line="-q -r ../arduino-${version}-${platform}.zip ." />
</exec>

<echo>
=======================================================
Arduino for Mac OS X was built. Grab the image from

macosx/arduino-${version}-${custom_platform}.zip
macosx/arduino-${version}-${platform}.zip
=======================================================
</echo>
</target>
Expand Down
2 changes: 1 addition & 1 deletion build/build_pull_request.bash
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ mv windows/arduino-*$VERSION*.zip ../
ant -Djava.net.preferIPv4Stack=true -Dplatform=macosx -Dversion="${VERSION}" clean dist
mv macosx/arduino-*$VERSION*.zip ../

ant -Djava.net.preferIPv4Stack=true -Dplatform=oldmacosx -Dversion="${VERSION}" clean dist
ant -Djava.net.preferIPv4Stack=true -Dplatform=macosxnew -Dversion="${VERSION}" clean dist
mv macosx/arduino-*$VERSION*.zip ../

0 comments on commit 3303774

Please sign in to comment.