Skip to content

Commit d6147a8

Browse files
committed
Arduino IDE on mac is on a different location. #272
!!!not tested!!!
1 parent 90231f5 commit d6147a8

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

it.baeyens.arduino.common/META-INF/MANIFEST.MF

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Import-Package: org.eclipse.cdt.core,
1818
org.eclipse.cdt.core.envvar,
1919
org.eclipse.cdt.core.model,
2020
org.eclipse.cdt.core.settings.model,
21+
org.eclipse.core.filesystem,
2122
org.eclipse.core.internal.resources,
2223
org.eclipse.core.resources,
2324
org.eclipse.ui.navigator

it.baeyens.arduino.common/src/it/baeyens/arduino/common/ArduinoInstancePreferences.java

+10
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
package it.baeyens.arduino.common;
22

3+
import org.eclipse.core.filesystem.URIUtil;
34
import org.eclipse.core.runtime.IPath;
45
import org.eclipse.core.runtime.IStatus;
6+
import org.eclipse.core.runtime.Platform;
57
import org.eclipse.core.runtime.Status;
68
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
79
import org.eclipse.core.runtime.preferences.InstanceScope;
@@ -295,6 +297,14 @@ public static IPath getArduinoPath() {
295297
return Common.getArduinoIDEPathFromUserSelection(getGlobalString(KEY_ARDUINOPATH, ""));
296298
}
297299

300+
public static String getArduinoIdeProgram() {
301+
IPath ArduinoIDEPath = ArduinoInstancePreferences.getArduinoPath();
302+
303+
if (Platform.getOS().equals(Platform.OS_MACOSX))
304+
return "\"" + URIUtil.toURI(ArduinoIDEPath.removeLastSegments(1).append("MacOS").append("JavaApplicationStub")).getPath() + "\" ";
305+
return "\"" + URIUtil.toURI(ArduinoIDEPath.append("arduino")).getPath() + "\" ";
306+
}
307+
298308
/**
299309
* This method returns boolean whether the arduino IDE has been pointed to or not. If you use the flag error = true a error will be shown to the
300310
* end user in case Arduino is not configured.

0 commit comments

Comments
 (0)