mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-20 14:54:31 +01:00
MacOSX: switching to bundled JVM (1.8), deprecating java 6
This commit is contained in:
parent
f183966296
commit
b48e07c8c3
131
build/build.xml
131
build/build.xml
@ -5,34 +5,33 @@
|
|||||||
<!--echo message="os.version = ${os.version}" /-->
|
<!--echo message="os.version = ${os.version}" /-->
|
||||||
|
|
||||||
<!-- Sets properties for macosx/windows/linux depending on current system -->
|
<!-- Sets properties for macosx/windows/linux depending on current system -->
|
||||||
<condition property="platform" value="macosx">
|
<condition property="platform" value="macosx-old">
|
||||||
<and>
|
<and>
|
||||||
<os family="mac" />
|
<os family="mac" />
|
||||||
<matches string="${os.version}" pattern="^10.[56]." />
|
<matches string="${os.version}" pattern="^10.[56]." />
|
||||||
</and>
|
</and>
|
||||||
</condition>
|
</condition>
|
||||||
<condition property="platform" value="macosx-java-latest"><os family="mac" /></condition>
|
<condition property="platform" value="macosx"><os family="mac" /></condition>
|
||||||
<condition property="platform" value="windows"><os family="windows" /></condition>
|
<condition property="platform" value="windows"><os family="windows" /></condition>
|
||||||
<condition property="platform" value="linux32"><os family="unix" arch="i386" /></condition>
|
<condition property="platform" value="linux32"><os family="unix" arch="i386" /></condition>
|
||||||
<condition property="platform" value="linux64"><os family="unix" arch="amd64" /></condition>
|
<condition property="platform" value="linux64"><os family="unix" arch="amd64" /></condition>
|
||||||
|
|
||||||
|
<condition property="macosx"><equals arg1="${platform}" arg2="macosx-old" /></condition>
|
||||||
<condition property="macosx"><equals arg1="${platform}" arg2="macosx" /></condition>
|
<condition property="macosx"><equals arg1="${platform}" arg2="macosx" /></condition>
|
||||||
<condition property="macosx"><equals arg1="${platform}" arg2="macosx-java-latest" /></condition>
|
|
||||||
<condition property="macosx-java-latest"><equals arg1="${platform}" arg2="macosx-java-latest" /></condition>
|
|
||||||
<condition property="windows"><equals arg1="${platform}" arg2="windows" /></condition>
|
<condition property="windows"><equals arg1="${platform}" arg2="windows" /></condition>
|
||||||
<condition property="linux32"><equals arg1="${platform}" arg2="linux32" /></condition>
|
<condition property="linux32"><equals arg1="${platform}" arg2="linux32" /></condition>
|
||||||
<condition property="linux64"><equals arg1="${platform}" arg2="linux64" /></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="linux32" /></condition>
|
||||||
<condition property="linux"><equals arg1="${platform}" arg2="linux64" /></condition>
|
<condition property="linux"><equals arg1="${platform}" arg2="linux64" /></condition>
|
||||||
|
|
||||||
<condition property="staging_folder" value="macosx"><equals arg1="${platform}" arg2="macosx-java-latest" /></condition>
|
|
||||||
<condition property="staging_folder" value="macosx"><equals arg1="${platform}" arg2="macosx" /></condition>
|
<condition property="staging_folder" value="macosx"><equals arg1="${platform}" arg2="macosx" /></condition>
|
||||||
|
<condition property="staging_folder" value="macosx"><equals arg1="${platform}" arg2="macosx-old" /></condition>
|
||||||
<condition property="staging_folder" value="windows"><equals arg1="${platform}" arg2="windows" /></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="linux32" /></condition>
|
||||||
<condition property="staging_folder" value="linux"><equals arg1="${platform}" arg2="linux64" /></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-java-latest" /></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="macosx" /></condition>
|
<condition property="staging_hardware_folder" value="Arduino.app/Contents/Resources/Java/hardware"><equals arg1="${platform}" arg2="macosx-old" /></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="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="linux32" /></condition>
|
||||||
<condition property="staging_hardware_folder" value="hardware"><equals arg1="${platform}" arg2="linux64" /></condition>
|
<condition property="staging_hardware_folder" value="hardware"><equals arg1="${platform}" arg2="linux64" /></condition>
|
||||||
@ -195,9 +194,9 @@
|
|||||||
<!-- Mac OS X -->
|
<!-- Mac OS X -->
|
||||||
<!-- - - - - - - - -->
|
<!-- - - - - - - - -->
|
||||||
|
|
||||||
<target name="macosx-java-latest-clean" depends="macosx-clean" description="Clean Mac OS X build"/>
|
<target name="macosx-clean" depends="macosx-old-clean" description="Clean Mac OS X build"/>
|
||||||
|
|
||||||
<target name="macosx-clean" depends="subprojects-clean" description="Clean Mac OS X build">
|
<target name="macosx-old-clean" depends="subprojects-clean" description="Clean Mac OS X build">
|
||||||
<delete dir="macosx/work" />
|
<delete dir="macosx/work" />
|
||||||
<delete dir="macosx/working_dir" />
|
<delete dir="macosx/working_dir" />
|
||||||
<delete dir="macosx/working.dmg" />
|
<delete dir="macosx/working.dmg" />
|
||||||
@ -218,7 +217,7 @@
|
|||||||
<fail message="wrong platform (${os.name})" />
|
<fail message="wrong platform (${os.name})" />
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="macosx-build" if="macosx" depends="revision-check, macosx-checkos, subprojects-build" description="Build Mac OS X version">
|
<target name="macosx-old-build" if="macosx" depends="revision-check, macosx-checkos, subprojects-build" description="Build Mac OS X version">
|
||||||
<mkdir dir="macosx/work" />
|
<mkdir dir="macosx/work" />
|
||||||
|
|
||||||
<!-- assemble the pde -->
|
<!-- assemble the pde -->
|
||||||
@ -246,7 +245,9 @@
|
|||||||
|
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="macosx-java-latest-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">
|
||||||
|
<fail unless="MACOSX_BUNDLED_JVM" message="MacOSX requires MACOSX_BUNDLED_JVM property set"/>
|
||||||
|
|
||||||
<antcall target="unzip">
|
<antcall target="unzip">
|
||||||
<param name="archive_file" value="${staging_folder}/appbundler-1.0ea-upstream1.jar.zip" />
|
<param name="archive_file" value="${staging_folder}/appbundler-1.0ea-upstream1.jar.zip" />
|
||||||
<param name="archive_url" value="http://arduino.cc/download.php?f=/appbundler-1.0ea-upstream1.jar.zip" />
|
<param name="archive_url" value="http://arduino.cc/download.php?f=/appbundler-1.0ea-upstream1.jar.zip" />
|
||||||
@ -259,7 +260,7 @@
|
|||||||
<taskdef name="bundleapp" classname="com.oracle.appbundler.AppBundlerTask" classpath="${staging_folder}/appbundler-1.0ea-upstream1/appbundler-1.0ea-upstream1.jar"/>
|
<taskdef name="bundleapp" classname="com.oracle.appbundler.AppBundlerTask" classpath="${staging_folder}/appbundler-1.0ea-upstream1/appbundler-1.0ea-upstream1.jar"/>
|
||||||
|
|
||||||
<bundleapp
|
<bundleapp
|
||||||
jvmRequired="1.7"
|
jvmRequired="1.8"
|
||||||
outputdirectory="${staging_folder}/work"
|
outputdirectory="${staging_folder}/work"
|
||||||
name="Arduino"
|
name="Arduino"
|
||||||
displayname="Arduino"
|
displayname="Arduino"
|
||||||
@ -274,6 +275,8 @@
|
|||||||
minimumsystemversion="10.7"
|
minimumsystemversion="10.7"
|
||||||
highresolutioncapable="true">
|
highresolutioncapable="true">
|
||||||
|
|
||||||
|
<runtime dir="${MACOSX_BUNDLED_JVM}"/>
|
||||||
|
|
||||||
<arch name="x86_64"/>
|
<arch name="x86_64"/>
|
||||||
<arch name="i386"/>
|
<arch name="i386"/>
|
||||||
|
|
||||||
@ -374,19 +377,19 @@
|
|||||||
|
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
<target name="macosx-old-run" depends="macosx-old-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="macosx-run" depends="macosx-build" description="Run Mac OS X version">
|
||||||
<antcall target="macosx-run-common"/>
|
<antcall target="macosx-run-common"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="macosx-java-latest-run" depends="macosx-java-latest-build" description="Run Mac OS X version">
|
<target name="macosx-old-debug" depends="macosx-old-build" description="Run Mac OS X version">
|
||||||
<antcall target="macosx-run-common"/>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="macosx-debug" depends="macosx-build" description="Run Mac OS X version">
|
|
||||||
<antcall target="macosx-debug-common"/>
|
<antcall target="macosx-debug-common"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="macosx-java-latest-debug" depends="macosx-java-latest-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"/>
|
<antcall target="macosx-debug-common"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
@ -457,11 +460,11 @@
|
|||||||
<!-- - - - - - - - - - - - - - - - - - - -->
|
<!-- - - - - - - - - - - - - - - - - - - -->
|
||||||
<!-- Build distribution file for MacOSX. -->
|
<!-- Build distribution file for MacOSX. -->
|
||||||
<!-- - - - - - - - - - - - - - - - - - - -->
|
<!-- - - - - - - - - - - - - - - - - - - -->
|
||||||
<target name="macosx-dist" if="macosx" depends="macosx-build" description="Create a downloadable .zip for the Mac OS X version">
|
<target name="macosx-old-dist" if="macosx" depends="macosx-old-build" description="Create a downloadable .zip for the Mac OS X version">
|
||||||
<antcall target="macosx-dist-common"/>
|
<antcall target="macosx-dist-common"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="macosx-java-latest-dist" if="macosx" depends="macosx-java-latest-build" description="Create a downloadable .zip for the Mac OS X version">
|
<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"/>
|
<antcall target="macosx-dist-common"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
@ -479,59 +482,59 @@
|
|||||||
</echo>
|
</echo>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="macosx-dist-old" if="macosx" depends="macosx-build" description="Create a .dmg of the Mac OS X version">
|
<!--<target name="macosx-dist-old" if="macosx" depends="macosx-build" description="Create a .dmg of the Mac OS X version">-->
|
||||||
<!-- now build the dmg -->
|
<!--<!– now build the dmg –>-->
|
||||||
<gunzip src="macosx/template.dmg.gz" dest="macosx/working.dmg" />
|
<!--<gunzip src="macosx/template.dmg.gz" dest="macosx/working.dmg" />-->
|
||||||
|
|
||||||
<mkdir dir="macosx/working_dir" />
|
<!--<mkdir dir="macosx/working_dir" />-->
|
||||||
<exec executable="hdiutil">
|
<!--<exec executable="hdiutil">-->
|
||||||
<arg line="attach macosx/working.dmg -noautoopen -mountpoint macosx/working_dir" />
|
<!--<arg line="attach macosx/working.dmg -noautoopen -mountpoint macosx/working_dir" />-->
|
||||||
<!--<arg line="attach macosx/working.dmg -noautoopen -quiet -mountpoint macosx/working_dir" />-->
|
<!--<!–<arg line="attach macosx/working.dmg -noautoopen -quiet -mountpoint macosx/working_dir" />–>-->
|
||||||
</exec>
|
<!--</exec>-->
|
||||||
|
|
||||||
<copy todir="macosx/working_dir">
|
<!--<copy todir="macosx/working_dir">-->
|
||||||
<fileset dir="macosx/work" />
|
<!--<fileset dir="macosx/work" />-->
|
||||||
</copy>
|
<!--</copy>-->
|
||||||
|
|
||||||
<!-- The ant copy command does not preserve permissions. -->
|
<!--<!– The ant copy command does not preserve permissions. –>-->
|
||||||
<chmod file="macosx/working_dir/Arduino.app/Contents/MacOS/JavaApplicationStub" perm="+x" />
|
<!--<chmod file="macosx/working_dir/Arduino.app/Contents/MacOS/JavaApplicationStub" perm="+x" />-->
|
||||||
<chmod perm="+x">
|
<!--<chmod perm="+x">-->
|
||||||
<fileset dir="macosx/working_dir/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin" includes="**/*" />
|
<!--<fileset dir="macosx/working_dir/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin" includes="**/*" />-->
|
||||||
<fileset dir="macosx/working_dir/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr/bin" includes="**/*" />
|
<!--<fileset dir="macosx/working_dir/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr/bin" includes="**/*" />-->
|
||||||
<fileset dir="macosx/working_dir/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr-3/bin" includes="**/*" />
|
<!--<fileset dir="macosx/working_dir/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr-3/bin" includes="**/*" />-->
|
||||||
<fileset dir="macosx/working_dir/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr-4/bin" includes="**/*" />
|
<!--<fileset dir="macosx/working_dir/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr-4/bin" includes="**/*" />-->
|
||||||
<fileset dir="macosx/working_dir/Arduino.app/Contents/Resources/Java/hardware/tools/avr/libexec/gcc/avr/3.4.6/" includes="**/cc1*" />
|
<!--<fileset dir="macosx/working_dir/Arduino.app/Contents/Resources/Java/hardware/tools/avr/libexec/gcc/avr/3.4.6/" includes="**/cc1*" />-->
|
||||||
<fileset dir="macosx/working_dir/Arduino.app/Contents/Resources/Java/hardware/tools/avr/libexec/gcc/avr/4.3.2/" includes="**/cc1*" />
|
<!--<fileset dir="macosx/working_dir/Arduino.app/Contents/Resources/Java/hardware/tools/avr/libexec/gcc/avr/4.3.2/" includes="**/cc1*" />-->
|
||||||
</chmod>
|
<!--</chmod>-->
|
||||||
|
|
||||||
<!-- Pause briefly for the OS to catch up with the DMG changes.
|
<!--<!– Pause briefly for the OS to catch up with the DMG changes. -->
|
||||||
This prevents "hdiutil: couldn't eject "disk3" - Resource busy"
|
<!--This prevents "hdiutil: couldn't eject "disk3" - Resource busy"-->
|
||||||
errors when ejecting the disk in the next step.
|
<!--errors when ejecting the disk in the next step.-->
|
||||||
You may need to set this value higher for your system. -->
|
<!--You may need to set this value higher for your system. –>-->
|
||||||
<sleep seconds="3" />
|
<!--<sleep seconds="3" />-->
|
||||||
|
|
||||||
<exec executable="hdiutil">
|
<!--<exec executable="hdiutil">-->
|
||||||
<!--<arg line="detach macosx/working_dir -quiet -force" />-->
|
<!--<!–<arg line="detach macosx/working_dir -quiet -force" />–>-->
|
||||||
<arg line="detach macosx/working_dir" />
|
<!--<arg line="detach macosx/working_dir" />-->
|
||||||
</exec>
|
<!--</exec>-->
|
||||||
|
|
||||||
<delete file="macosx/arduino-*.dmg" />
|
<!--<delete file="macosx/arduino-*.dmg" />-->
|
||||||
<exec executable="hdiutil">
|
<!--<exec executable="hdiutil">-->
|
||||||
<arg line="convert macosx/working.dmg -quiet -format UDZO -imagekey zlib-level=9 -o macosx/arduino-${version}.dmg" />
|
<!--<arg line="convert macosx/working.dmg -quiet -format UDZO -imagekey zlib-level=9 -o macosx/arduino-${version}.dmg" />-->
|
||||||
</exec>
|
<!--</exec>-->
|
||||||
|
|
||||||
<!-- Clean up the interim files. -->
|
<!--<!– Clean up the interim files. –>-->
|
||||||
<delete file="macosx/working.dmg" />
|
<!--<delete file="macosx/working.dmg" />-->
|
||||||
<delete dir="macosx/working_dir" />
|
<!--<delete dir="macosx/working_dir" />-->
|
||||||
|
|
||||||
<echo>
|
<!--<echo>-->
|
||||||
=======================================================
|
<!--=======================================================-->
|
||||||
Arduino for Mac OS X was built. Grab the image from
|
<!--Arduino for Mac OS X was built. Grab the image from-->
|
||||||
|
|
||||||
macosx/arduino-${version}.dmg
|
<!--macosx/arduino-${version}.dmg-->
|
||||||
=======================================================
|
<!--=======================================================-->
|
||||||
</echo>
|
<!--</echo>-->
|
||||||
</target>
|
<!--</target>-->
|
||||||
|
|
||||||
<!-- - - - - - - - -->
|
<!-- - - - - - - - -->
|
||||||
<!-- Linux -->
|
<!-- Linux -->
|
||||||
|
@ -18,5 +18,3 @@ mv windows/arduino-*-windows.zip ../
|
|||||||
ant -Djava.net.preferIPv4Stack=true -Dplatform=macosx $@ clean dist
|
ant -Djava.net.preferIPv4Stack=true -Dplatform=macosx $@ clean dist
|
||||||
mv macosx/arduino-*-macosx.zip ../
|
mv macosx/arduino-*-macosx.zip ../
|
||||||
|
|
||||||
ant -Djava.net.preferIPv4Stack=true -Dplatform=macosx-java-latest $@ clean dist
|
|
||||||
mv macosx/arduino-*-macosx-java-latest.zip ../
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user