From bf3dd74f54facc43f1d33b622c1ca314d928fe6c Mon Sep 17 00:00:00 2001 From: Markus Hitter Date: Fri, 10 Jul 2015 12:36:57 +0200 Subject: [PATCH] Configtool: also try toolpaths in more recent OS Xs. This should address one part of issue #165. --- configtool/build.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/configtool/build.py b/configtool/build.py index 6cc4b38..b6ca8da 100644 --- a/configtool/build.py +++ b/configtool/build.py @@ -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("/"):