Does in fact work and it works much nicer than Windows as it is integrated rather than a separate shell.
As for working_dir, I am seeing issues with it on OSX, but seems to work fine with Windows. Going to check to see if I can get a better way to make this work.
I got it working last night. Sometimes I get a 2nd instance, but most of the time as soon as I save the file in ST2, the existing instance restarts for me.
One thing I noticed is that I have to have an active tab to the folder where my main.lua is. If I’m on a tab that’s in a different directory it won’t start.
Also, Under Tools->Build System you have to select Corona. I did this in one project and everything was fine, went to another project and it was set to something else, so it seems like it needs set on a project-by-project basis.
All of my projects run using ST2 project files (located in the root of their respective projects). main.lua is always open because I use it for keeping notes. And mine auto-selects CoronaSDK as the build system, I assume because I save main.lua first and make sure that’s set to Lua (CoronaSDK) as the language.
Just having the tab open for me doesn’t affect anything- you have to build (Cmd+B ) from a file in the root folder or you’ll get the error message. But as far as I can tell it can be any file from root (well, any lua file). But I’ve never, ever seen build restart an instance. The only time an instance restarts (in my experience) is if you save - the SDK detects changes and auto-reloads.
If you add the “selector”: “source.lua” it will cause it to automatically use that build system for .lua files. Then you can just leave it on automatic. Otherwise you have to select Corona. If you pick it, it will save the build system chosen on a project by project basis.
Only problem is if you code lua for other things, it will use the same build for all, but you can get fancy and do alt-builds so you hit a control key when hitting control B and you get a menu which one you want to use.
Nothing new yet, I’m looking into it, but I think it may be a Corona thing, checking with Corona and Sublime, but Sublime is slower than slow for anything support and likely never to get a response.
But…it just loads Corona and the shell window; there’s no errors but the game is not run by the simulator, either. Switching ~1 with ~2 at the end gives the error “C:\main.lua not found.” Not sure which one tries to load Corona.Debugger vs. Corona Simulator, though.
(Incidentally; Lots of .c errors from Corona if I attempt to run .CAF files via the windows simulator. Sim framerate goes from 30fps solid on OSX to 3 on W7)
If you have not stored Corona SDK in your applications folder, you will need to amend it to the file path you saved it in.
Rob - What error message are you talking about?
EDIT:
Or, if you want to install this: https://github.com/drowne/Corona-Sublime which includes build system and auto-complete for many of the API’s, open Terminal and paste these two commands:
cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages
“Error loading meta info: Expected key scope”. Admittedly I’ve not looked in the past 6 months to see if there is a fix for this, but it has something to do with the Corona bits. Though it seems people may have figured it out. Let me see if I can make it work.
BTW: The build system works wonderful, though I see two corona icons in my doc, dunno why?
EDIT: Fixed the stoopid scope error that’s been plauging me for a long time.
cd ~/Library/Application Support/Sublime Text 2/Packages/Corona-SDK
vi Completions.tmPreferences (or use the editor of your choice, perhaps Sublime 2?)
The only problem with the ST2 build system is that every time you build it opens a new corona window. I should really tweak it to close any existing simulators?
Maybe remove your corona bundles and reinstall from the github link i posted? (backup first of course) it sounds like one of the files it tries to load has some syntax error.
Actually, that’s the first thing I tried. But it doesn’t work. At least in my case. And yes, corona is stored in the default location. I found a lot of examples online that setting up build system like you described doesn’t work for most people
But it does for some. Why is that? I doubt anyone could answer this question
Ok, just managed to get it to work. And by using this method it doesn’t launch new Corona Simulator every time you hit CMD+B. Here is the build system:
c0ppo, just tried your method on my Mac (10.8.3) and it’s good news/bad news.
It does work - previous solutions to this problem require copying over the “simulator” file from old Corona SDK installs that for some reason Corona Labs dropped from the build earlier this year.
Despite what you said it clearly does not block launching new simulators. (I just tried it)
The big problem with this method is that you *cannot* build anywhere except the root directory. Attempting to build from any other folder (maybe you have a “logic” subfolder in your project or something similar) will just result in an error message from the SDK, which basically means something about how ST2 is sending the path is faulty with that command line.
(To be fair, my method has the same problem. But I haven’t found a way to fix it.)
As for bundles, I think I’m using something newer than the textmate version, but not by much (year+?) Tons of unsupported autocomplete functions in it, but better than nothing.
In my case it does. Only one simulator launched, and when I click on CMD+B new simulator opens, and old closes down :S
Haven’t really tried this. I just experimented by launching sample apps, and they all work normal. I’m gonna make a small app using subfolders and test it out and then report here.
Same thing here. But it’s one year old. If I get some free time, I’m gonna try to update that bundle. It’s really a shame that probably that probably the most popular text editor doesn’t have a corona SDK package
I would make my own and publish it, but my python skills are zero to none
I use Sublime both on Windows & Mac w/ Corona SDK.
The CoronaSublime plugin is useful, but not really needed as you can make your own build configuration pretty easily and it doesn’t have full code intel as many are missing.
It is slightly different dependent if you are on Windows or Mac.
What version of SublimeText2 are you using? Maybe it’s version specific. I’m not using Version 3 Beta yet.
The autocomplete stuff is a shame; if I could figure out the syntax I would update that. I’ll try to look closer. One flaw in the autocomplete system though is that it does not seem tolerant of pre-typing, that is, typing
“display.newI” will trigger the autocomplete for “display.newImage”, but when you accept it, it becomes “display.display.newImage” because it can’t handle the library prepack.
cspence: I can’t really agree on the build system. Last time I looked the documentation was little to none and there was nothing in it to suggest solutions to multi-client or subfolder pathing.