问题
I've tried to use sublime text 2 to write lua\corona program, but I've faced with a problem.
When i add a build tool with such a text:
{
"cmd": ["C:/Program Files/Corona Labs/Corona SDK/Corona Simulator.exe", "main.lua"]
}
After F7
or ctrl+b
or build button in menu - only blank small window shows and "Building" text appears on bottom of the window - nothing else happen (even when I try to check other available build tools).
I even try to put other commands in "cmd" - this blank field on the bottom of sublime still blank and this simulator doesn't appear (if I write in command line "C:/Program Files/Corona Labs/Corona SDK/Corona Simulator.exe" simulator starts).
UPDATE
I've opened console and there is some log:
Running C:/Program Files/Corona Labs/Corona SDK/Corona Simulator.exe main.lua
Traceback (most recent call last):
File ".\sublime_plugin.py", line 337, in run_
File ".\exec.py", line 154, in run
File ".\exec.py", line 45, in __init__
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc4 in position 7: ordinal not in range(128)
回答1:
Try this : http://www.sublimetext.com/forum/viewtopic.php?f=3&t=8512
In Packages/Default/exec.py
at line 45
Replace :
proc_env[k] = os.path.expandvars(v).encode(sys.getfilesystemencoding())
With :
os.path.expandvars(v.decode(sys.getfilesystemencoding())).encode(sys.getfilesystemencoding())
来源:https://stackoverflow.com/questions/14715918/sublime-text-2-build-tools-nothing-happens