Skip to content

Commit 4d3a83a

Browse files
committed
trying to add the boards manaer board to the combo's for mac and windows #272
1 parent 981b330 commit 4d3a83a

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

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

+9-2
Original file line numberDiff line numberDiff line change
@@ -309,8 +309,15 @@ public static IPath getArduinoIdeHardwarePath() {
309309
}
310310

311311
public static IPath getArduinoBoardsManagerPackagesPath() {
312-
IPath homPath = new Path(System.getProperty("user.home"));
313-
return homPath.append(".arduino15").append("packages");
312+
switch (Platform.getOS()) {
313+
case Platform.OS_MACOSX:
314+
return new Path(System.getProperty("user.home")).append("Library").append("Arduino15").append("packages");
315+
316+
case Platform.OS_WIN32:
317+
return new Path(System.getenv("APPDATA")).append("Arduino15").append("packages");
318+
default:
319+
return new Path(System.getProperty("user.home")).append(".arduino15").append("packages");
320+
}
314321
}
315322

316323
public static String getArduinoIdeProgram() {

0 commit comments

Comments
 (0)