diff --git a/GutterColor.sublime-settings b/GutterColor.sublime-settings index 18c81f0..07365c4 100644 --- a/GutterColor.sublime-settings +++ b/GutterColor.sublime-settings @@ -4,6 +4,16 @@ * The location of the ImageMagic convert script. */ "convert_path" : "/usr/bin/convert", + + /* + * The name of the ImageMagic convert binary file. + */ + /* + // Default for Unix system + "convert_name" : "convert", + // Default for Windows system + "convert_name" : "convert.exe", + */ /* * The syntax for which to run GutterColor. diff --git a/line.py b/line.py index 71df9de..365e258 100644 --- a/line.py +++ b/line.py @@ -305,6 +305,8 @@ def create_icon(self): "/usr/bin" ] + convert_name_setting = self.settings.get("convert_name") + if ( platform.system()=="Windows"): delimiter = ";" convert_name = "convert.exe" @@ -312,6 +314,9 @@ def create_icon(self): delimiter = ":" convert_name = "convert" + if convert_name_setting: + convert_name = convert_name_setting + paths.extend(glob.glob('/usr/local/Cellar/imagemagick/*/bin')) paths.extend(os.environ['PATH'].split(delimiter))