Configtool: also try toolpaths in more recent OS Xs.

This should address one part of issue #165.
This commit is contained in:
Markus Hitter 2015-07-10 12:36:57 +02:00
parent a57ce1f046
commit bf3dd74f54
1 changed files with 7 additions and 4 deletions

View File

@ -17,6 +17,13 @@ TOOLPATHS_INSIDE_ARDUINO = [
"hardware/tools/avr/bin/",
"hardware/tools/" # avrdude in Arduino 1.0.x
]
if platform.startswith("darwin"):
# That's an OS property, the Applicaton Bundle hierarchy.
pathsCopy = TOOLPATHS_INSIDE_ARDUINO
TOOLPATHS_INSIDE_ARDUINO = []
for path in pathsCopy:
TOOLPATHS_INSIDE_ARDUINO.append("Contents/Resources/Java/" + path)
TOOLPATHS_INSIDE_ARDUINO.append("Contents/Java/" + path)
class ScriptTools:
@ -34,10 +41,6 @@ class ScriptTools:
if self.settings.arduinodir:
cmdpath = self.settings.arduinodir
if platform == "darwin":
# That's an OS property, the Applicaton Bundle hierarchy.
cmdpath = os.path.join(cmdpath, "Contents/Resources/Java")
for pathOption in TOOLPATHS_INSIDE_ARDUINO:
cmdpathTry = cmdpath
for dir in pathOption.split("/"):