change path to corona? (so support Corona 2.0 and non-2.0 builds)

is there a way to config the editor (or project) to either the (a) new Corona builds with Graphics 2.0 for projects that are using this and (b) the older builds for projects that need this.  i.e. Had to rename my exiting Corona install on mac before installing the latest 2.0.  Want to be able to hit CMD-B and build the project with the project knowing which Corona app install to use.

PS I tried by renaming both versions of corona and using a symbolic link. Works for textMate, however for sublime it works the first time bit subsequently fails. Ie when using CMD-D…

The next release provides a mechanism to specify the preferred location of the Corona Simulator using a preference.

Would it be desirable to set this on a per project basis?

Yes please

I’m thinking a build.settings entry like:

settings = { corona\_sdk\_simulator\_path = "/arbitrary/path/to/a/Corona Simulator" ...

if it’s per project that sounds ok to me Perry - I’m using sym links for the moments with a batch file to change it back and forth

Eagerly awaiting this; had to stop testing the official Corona package because I need to keep the G2.0 builds seperate.

The new release of Corona Editor that allows the Simulator to be set on a per project basis is up: http://coronalabs.com/products/editor

When I set my path in build.settings, I get an error message saying “Cannot find executable Corona Simulator at path ‘/Applications/CoronaSDK2.0/Corona\ Simulator.app/Contents/MacOS/Corona Simulator’”  

Do I need to do something differently on OSX to get this to work? I got the path name by dragging the Simulator icon to the Terminal, so it should be correct. I’ve also tried changing “\ Simulator.app” to “/Simulator.app” without any luck.

Scratch that - having looked more closely at the path, I’ve realised that:

“/Corona\ Simulator.app/”

just needed to have the backslash removed to change it to:

“/Corona Simulator.app/”

I admittedly don’t understand how this is supposed to work. Maybe the documentation needs to be expanded a bit?

  1. Removed Corona Editor and reinstalled via Package Control (now shows 1.0 under List Packages)

  2. I added this line within the settings{} in build.settings:

[lua]corona_sdk_simulator_path = “/Applications/CoronaSDK 2100/Corona Simulator.app/Contents/MacOS/Corona Simulator”,[/lua]

Upon trying to build, there is no error message regarding the simulator, even if I completely change the path to something nonsensical. And the specified build is not loaded; only the default Corona is (which obviously causes errors when you jump back from 2076 to 1259)

Additionally, if you try to edit the settings for Corona Editor, the file is read-only and cannot be modified at all within ST3. Not sure why that has been set.

On further exploration:

FN+CMD+F10: Runs the version of Corona specified in build.settings

CMD+B: Runs the default version of Corona only.

Is this fixable?

(Also; the docs mention a way to just globally set the build of Corona to use…but not where to put it. What file does it go in? What does it look like?)

haven’t had a chance to try yet, but definitely would like CMD+B to run the version of Corona defined for the project you are editing… (i.e. per project setting first, then if not defined the default setting)

Be sure to use Run Project to have Sublime Text pick up the build.settings or preference specified version of Corona Simulator.  There are some issues making the Build command (Cmd+B) work this way which have not been resolved yet (but it is intended to do so, at least for Sublime Text 3).  Run Project also does a better job of finding main.lua no matter how the project is laid out on disk.

PS I tried by renaming both versions of corona and using a symbolic link. Works for textMate, however for sublime it works the first time bit subsequently fails. Ie when using CMD-D…

The next release provides a mechanism to specify the preferred location of the Corona Simulator using a preference.

Would it be desirable to set this on a per project basis?

Yes please

I’m thinking a build.settings entry like:

settings = { corona\_sdk\_simulator\_path = "/arbitrary/path/to/a/Corona Simulator" ...

if it’s per project that sounds ok to me Perry - I’m using sym links for the moments with a batch file to change it back and forth

Eagerly awaiting this; had to stop testing the official Corona package because I need to keep the G2.0 builds seperate.