mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-18 07:52:14 +01:00
Merge branch 'osx-app-bundler' into ide-1.5.x
Conflicts: build/build.xml
This commit is contained in:
commit
d52e75ff38
1
.gitignore
vendored
1
.gitignore
vendored
@ -24,6 +24,7 @@ build/windows/WinAVR-*.zip
|
||||
build/macosx/arduino-*.zip
|
||||
build/macosx/dist/gcc-*.tar.gz
|
||||
build/macosx/libastylej*
|
||||
build/macosx/appbundler*.jar
|
||||
build/linux/work/
|
||||
build/linux/dist/*.tar.gz
|
||||
build/linux/*.tgz
|
||||
|
@ -52,6 +52,11 @@ public class Platform extends processing.app.Platform {
|
||||
UIManager.put("Component.visualMargin", new Insets(1, 1, 1, 1));
|
||||
}
|
||||
|
||||
public Platform() {
|
||||
// For more information see:
|
||||
// http://mail.openjdk.java.net/pipermail/macosx-port-dev/2013-January/005261.html
|
||||
Toolkit.getDefaultToolkit();
|
||||
}
|
||||
|
||||
public void init(Base base) {
|
||||
System.setProperty("apple.laf.useScreenMenuBar", "true");
|
||||
|
@ -22,7 +22,7 @@
|
||||
<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/Resources/Java/hardware"><equals arg1="${platform}" arg2="macosx" /></condition>
|
||||
<condition property="staging_hardware_folder" value="Arduino.app/Contents/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>
|
||||
@ -155,7 +155,7 @@
|
||||
<tokenfilter>
|
||||
<linetokenizer includeDelims="false" />
|
||||
<!-- grab the thing from the first line that's 4 digits -->
|
||||
<containsregex pattern="ARDUINO (.*) " />
|
||||
<containsregex pattern="ARDUINO ([^ ]*)" />
|
||||
<replaceregex pattern="ARDUINO ([^ ]*).*" replace="\1" />
|
||||
</tokenfilter>
|
||||
<tokenfilter>
|
||||
@ -207,23 +207,48 @@
|
||||
<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 -->
|
||||
<copy todir="macosx/work/Arduino.app">
|
||||
<fileset dir="macosx/template.app" includes="**"/>
|
||||
</copy>
|
||||
<get src="http://downloads.arduino.cc/appbundler-1.0-arduino.jar" dest="macosx" usetimestamp="true" skipexisting="true" />
|
||||
|
||||
<!-- <rename src="macosx/work/template.app"
|
||||
dest="macosx/work/Arduino.app" />
|
||||
<move file="macosx/work/template.app"
|
||||
tofile="macosx/work/Arduino.app" />-->
|
||||
<taskdef name="bundleapp" classname="com.oracle.appbundler.AppBundlerTask" classpath="macosx/appbundler-1.0-arduino.jar" />
|
||||
|
||||
<chmod file="macosx/work/Arduino.app/Contents/MacOS/JavaApplicationStub" perm="755" />
|
||||
<bundleapp outputdirectory="macosx/work"
|
||||
name="Arduino"
|
||||
displayname="Arduino"
|
||||
shortversion="${version}"
|
||||
icon="macosx/template.app/Contents/Resources/processing.icns"
|
||||
identifier="cc.arduino.Arduino"
|
||||
mainclassname="processing.app.Base">
|
||||
|
||||
<copy todir="macosx/work/Arduino.app/Contents/Resources/Java" flatten="true">
|
||||
<fileset refid="runtime.jars"/>
|
||||
</copy>
|
||||
<documentType name="Arduino Source File"
|
||||
icon="macosx/template.app/Contents/Resources/pde.icns"
|
||||
role="Editor">
|
||||
<extension>ino</extension>
|
||||
<extension>c</extension>
|
||||
<extension>cpp</extension>
|
||||
<extension>h</extension>
|
||||
<mimeType>text/plain</mimeType>
|
||||
<osType>TEXT</osType>
|
||||
</documentType>
|
||||
|
||||
<copy todir="macosx/work/Arduino.app/Contents/Resources/Java">
|
||||
<classpath file="../app/pde.jar" />
|
||||
<classpath file="../core/core.jar" />
|
||||
<classpath dir="../app/lib" includes="*.jar"/>
|
||||
|
||||
<option value="-Djavaroot=$APP_ROOT/Contents/Java"/>
|
||||
<option value="-Xms128M"/>
|
||||
<option value="-Xmx256M"/>
|
||||
<option value="-Dapple.laf.useScreenMenuBar=true"/>
|
||||
<option value="-Dapple.awt.showGrowBox=false"/>
|
||||
<option value="-Dcom.apple.smallTabs=true"/>
|
||||
<option value="-Dapple.awt.Antialiasing=false"/>
|
||||
<option value="-Dapple.awt.TextAntialiasing=true"/>
|
||||
<option value="-Dcom.apple.hwaccel=true"/>
|
||||
<option value="-Dapple.awt.use-file-dialog-packages=false"/>
|
||||
<option value="-Dapple.awt.graphics.UseQuartz=true"/>
|
||||
<option value="-Dapple.awt.application.name=Arduino"/>
|
||||
</bundleapp>
|
||||
|
||||
<copy todir="macosx/work/Arduino.app/Contents/Java">
|
||||
<fileset dir="shared" includes="lib/**" />
|
||||
<fileset file="shared/revisions.txt" />
|
||||
</copy>
|
||||
@ -238,7 +263,7 @@
|
||||
<arg value="-q" />
|
||||
<arg value="-n" />
|
||||
<arg value="-d" />
|
||||
<arg value="macosx/work/Arduino.app/Contents/Resources/Java/hardware" />
|
||||
<arg value="macosx/work/${staging_hardware_folder}" />
|
||||
<arg value="macosx/dist/tools-universal.zip" />
|
||||
</exec>
|
||||
|
||||
@ -247,14 +272,14 @@
|
||||
</copy>
|
||||
-->
|
||||
|
||||
<copy todir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/">
|
||||
<copy todir="macosx/work/${staging_hardware_folder}/tools/">
|
||||
<fileset file="macosx/dist/bossac" />
|
||||
</copy>
|
||||
|
||||
<chmod file="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/bossac" perm="+x" />
|
||||
<chmod file="macosx/work/${staging_hardware_folder}/tools/bossac" perm="+x" />
|
||||
|
||||
<antcall target="assemble">
|
||||
<param name="target.path" value="macosx/work/Arduino.app/Contents/Resources/Java" />
|
||||
<param name="target.path" value="macosx/work/Arduino.app/Contents/Java" />
|
||||
</antcall>
|
||||
|
||||
<antcall target="unzip-arm-toolchain">
|
||||
@ -264,24 +289,28 @@
|
||||
</antcall>
|
||||
|
||||
<delete includeEmptyDirs="true" quiet="true">
|
||||
<fileset dir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools" includes="**/3.4.6/**/*"/>
|
||||
<fileset dir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools" includes="**/3.4.6"/>
|
||||
<fileset dir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools" includes="**/man/**/*"/>
|
||||
<fileset dir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools" includes="**/man"/>
|
||||
<fileset dir="macosx/work/${staging_hardware_folder}/tools" includes="**/3.4.6/**/*"/>
|
||||
<fileset dir="macosx/work/${staging_hardware_folder}/tools" includes="**/3.4.6"/>
|
||||
<fileset dir="macosx/work/${staging_hardware_folder}/tools" includes="**/man/**/*"/>
|
||||
<fileset dir="macosx/work/${staging_hardware_folder}/tools" includes="**/man"/>
|
||||
</delete>
|
||||
|
||||
<get src="http://downloads.arduino.cc/libastylej-2.03.zip" dest="macosx" usetimestamp="true" skipexisting="true"/>
|
||||
<unzip src="macosx/libastylej-2.03.zip" dest="macosx" overwrite="true"/>
|
||||
<copy file="macosx/libastylej/libastylej.jnilib" todir="macosx/work/Arduino.app/Contents/Resources/Java/lib/" />
|
||||
<chmod perm="755" file="macosx/work/Arduino.app/Contents/Resources/Java/lib/libastylej.jnilib" />
|
||||
<copy file="macosx/libastylej/libastylej.jnilib" todir="macosx/work/Arduino.app/Contents/Java/lib/" />
|
||||
<chmod perm="755" file="macosx/work/Arduino.app/Contents/Java/lib/libastylej.jnilib" />
|
||||
</target>
|
||||
|
||||
<target name="macosx-run" depends="macosx-build" description="Run Mac OS X version">
|
||||
<exec executable="macosx/work/Arduino.app/Contents/MacOS/JavaApplicationStub" spawn="true"/>
|
||||
<exec executable="open" dir="macosx/work">
|
||||
<arg value="Arduino.app"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="macosx-debug" depends="macosx-build" description="Run Mac OS X version">
|
||||
<exec executable="macosx/work/Arduino.app/Contents/MacOS/JavaApplicationStub" spawn="false"/>
|
||||
<exec executable="open" dir="macosx/work" spawn="false">
|
||||
<arg value="Arduino.app"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<!-- - - - - - - - - - - - - - - - -->
|
||||
@ -343,16 +372,11 @@
|
||||
<!-- The ant copy command does not preserve permissions. -->
|
||||
<chmod file="macosx/work/Arduino.app/Contents/MacOS/JavaApplicationStub" perm="+x" />
|
||||
<chmod perm="+x">
|
||||
<fileset dir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin" includes="**/*" />
|
||||
<fileset dir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr/bin" includes="**/*" />
|
||||
<fileset dir="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools/avr/libexec/gcc/avr/4.8.1/" includes="*" />
|
||||
<fileset dir="macosx/work/${staging_hardware_folder}/tools/avr/bin" includes="**/*" />
|
||||
<fileset dir="macosx/work/${staging_hardware_folder}/tools/avr/avr/bin" includes="**/*" />
|
||||
<fileset dir="macosx/work/${staging_hardware_folder}/tools/avr/libexec/gcc/avr/4.8.1/" includes="*" />
|
||||
</chmod>
|
||||
|
||||
<replace file="macosx/work/Arduino.app/Contents/Info.plist"
|
||||
token="VERSION" value="${version}" />
|
||||
<replace file="macosx/work/Arduino.app/Contents/Info.plist"
|
||||
token="REVISION" value="${revision}" />
|
||||
|
||||
<exec executable="zip" dir="macosx/work">
|
||||
<arg line="-q -r ../arduino-${version}-${platform}.zip ." />
|
||||
</exec>
|
||||
|
@ -15,6 +15,8 @@ ARDUINO 1.5.7 BETA
|
||||
* sam: Fix to Wire usage of TWI status register (bluesign2k)
|
||||
|
||||
[ide]
|
||||
* Moved to appbundler for building releases for MacOSX. (Haavar Valeur)
|
||||
This should remove dependency from Java 1.6 on recent MacOSX.
|
||||
* Added support for '-' and '.' in filenames (Georg von Zengen)
|
||||
* (re)Added 'arduino_debug.exe' in Windows build for debugging purposes
|
||||
* Magic baudrate is no longer removed (it was a workaround for RXTX)
|
||||
|
Loading…
x
Reference in New Issue
Block a user