gepd / Stino

A Sublime Text Plugin for Arduino
Other
33 stars 10 forks source link

Problem with C:\Program Files (x86) on Windows #7

Closed stlehmann closed 9 years ago

stlehmann commented 9 years ago

If I want to compile with Stino I get the Error:

[Stino - Start building "Blink"...]
Der Befehl "C:\Program" ist entweder falsch geschrieben oder konnte nicht gefunden werden.

meaning that C:\Program could not be found.

So my Arduino lives in c:\Program Files (x86)\Arduino\. On Windows a filename with spaces in it has to be put in quotes if used as an argument. So I fixed this by changing _arduinocompiler.py, row 355:

self.working_dir = '"%s"' % self.arduino_info.get_ide_dir().get_path()

But don' t know if this works on Linux as well.

gepd commented 9 years ago

Thanks MrLeeh, I've added this fix to the current code, lets wait for the report from linux users

perronj2 commented 9 years ago

I'm running sublime text 2, arduino ide 1.6.5 on windows 7 - 64 bit.

Also getting a similar issue with the latest stino fixes. I'll check back later to see if there is any update.

gepd commented 9 years ago

To help to understand the error please follow the next steps:

mark "Show compilation output" in the menu Arduino-> Build Options mark "Show upload output" in the menu Arduino-> Build Options

After this, try to upload the sketch and copy the error and paste here.

perronj2 commented 9 years ago

[Stino - Start building "Blink"...] [ 3%] Creating C:\Users\jpperron\AppData\Local\Temp\Stino_build\Blink\Blink.ino.cpp.o... "avr-g++" -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=165 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-Ic:\program files (x86)\arduino\examples\01.Basics\Blink" "-Ic:\program files (x86)\arduino\hardware\arduino\avr\cores\arduino" "-Ic:\program files (x86)\arduino\hardware\arduino\avr\variants\standard" "C:\Users\jpperron\AppData\Local\Temp\Stino_build\Blink\Blink.ino.cpp" -o "C:\Users\jpperron\AppData\Local\Temp\Stino_build\Blink\Blink.ino.cpp.o" 'c:\program' is not recognized as an internal or external command,

operable program or batch file.

[Stino - Exit with error code 1.]

gepd commented 9 years ago

Seems like you don't have the last fixes, please try removing the plugin and installing again. If the problem continues, check the the file arduino_compiler.py under the Package folder/stino-/pyarduino (Menu Preferences->Browse Packages)

Check the line 355 it should be something like this: self.working_dir = '"%s"' % self.arduino_info.get_ide_dir().get_path()

perronj2 commented 9 years ago

Installed latest plugin. Checked code line 355 of arduino_compiler.py (matches) Still get this error:

[Stino - Start building "Blink"...] [ 3%] Creating C:\Program Files\Sublime_Build_Files\Blink\Blink.ino.cpp.o... "avr-g++" -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=165 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-Ic:\program files (x86)\arduino\examples\01.Basics\Blink" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "C:\Program Files\Sublime_Build_Files\Blink\Blink.ino.cpp" -o "C:\Program Files\Sublime_Build_Files\Blink\Blink.ino.cpp.o" 'C:\Program' is not recognized as an internal or external command,

operable program or batch file.

[Stino - Exit with error code 1.]

gepd commented 9 years ago

Please download this files https://github.com/gepd/Stino/archive/new-stino.zip and replace with the stino folder inside the Packages Folder, I've made new changes, as all work fine here, I need you try it.

Be sure to restart ST after each change

perronj2 commented 9 years ago

Installed new file in package folder;

verify and compile returns the following:

[Stino - Start building "Blink"...] [ 3%] Creating C:\Program Files\Sublime_Build_Files\Blink\Blink.ino.cpp.o... "avr-g++" -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=165 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\examples\01.Basics\Blink" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "C:\Program Files\Sublime_Build_Files\Blink\Blink.ino.cpp" -o "C:\Program Files\Sublime_Build_Files\Blink\Blink.ino.cpp.o" 'C:\Program' is not recognized as an internal or external command,

operable program or batch file.

[Stino - Exit with error code 1.]

perronj2 commented 9 years ago

That worked! Thank you so much.