Setting up Corona Simulator in Eclipse

You want to be able to call the Corona Simulator from within Eclipse, so you do not have to go select the file each time you want to test a quick change.

 

The Solution

First you want to expand your project and choose a main.lua file.  This will be the process of running the simulator in the future.
Select a main.lua file in your project
Select the Run/External Tools/External Tools Configurations
Hightlight Program.  Click on “New launch configuration” icon
Enter the Name (you can use anything here).
Browse for the location of your Corona Simulator.exe (different on mac).
Use the folder location for the working directory.
Put in the following arguments ${workspace_loc}\${container_path}\${selected_resource_name}
Click Apply and then Run.
The Corona Simulator should start and launch your selected main.lua application.
Going forward in your workspace you only have to select your main.lua file then click on the run icon.

 

Summary

We set up an external tools configuration to run our applications in the Corona Simulator.  This allows us to be able to run the simulator for any main.lua application in our current workspace without having to start the simulator manually.  This is definitely saving me needed development time.

Corona SDK Samples on SubVersion (SVN)

I wanted to share how I am using Eclipse to run my Corona Projects.  SVN is a big part of that implementation for me.  I use SVN and I like the source control solution.  Not sure I will use Git, but will probably try it out soon.  If I do, I will show how I use it from within Eclipse also.

Google Code: http://code.google.com/p/corona-sdk-samples/

If you use SVN within Eclipse and you want to take a look at the Corona SDK samples quickly, this post should help you get started very quickly.
Note: I am a windows user, but this should work for anyone using the Eclipse IDE.  Yes, even you fanboys with your fruit on your laptops. 

 

1. Open up a blank workspace for Eclipse.
Open a Blank Workspace
Open a Blank Workspace
2. Create your SVN repository location in the svn repository explorer in Eclipse.
http://corona-sdk-samples.googlecode.com/svn/trunk/
3. Checkout the Samples into your workspace as a project.
Checkout Samples into workspace
Change your selection to use the Samples project.
Selection
It will take a little while to get all the files into your workspace.
Wait for downloading
Note: You could also check out each separate section of the Samples repository (ie GettingStarted) as a separate project if you wanted.  I have seperated them as their own projects also.
4. Go back and take a look at your Project Explorer view and you will see a project with all the sample applications inside.
Project Explorer should show all your checked out files.

Summary

I showed you how to access the public samples repository and check out the samples into the Eclipse IDE as a lua project.
You will want to make sure you are using LuaEclipse, because the code is a LuaEclipse project.
If you have not already set it up, you can read my last post here to see how I installed LuaEclipse.
In my next post, I will show how to spawn the Corona Simulator from within your Eclipse IDE to make development faster.

 

Corona SDK and Eclipse – Setting up LUA

I wanted to use Eclipse for my editor IDE of my Corona projects using LUA.
Here is how I set it up for my Eclipse Version: 3.5.1
Open the Preferences:
Open Preferences
Available Software Sites: Click on Add
Available Sofware Site
Add the site
Add Site Url
Click ok and then ok again.
You can now go Install the software for LuaEclipse: Help/Install New Software
Install Software
Select software to install:
Select Software
Finish the rest of the installs and you will be prompted to restart Eclipse.  Confirm and restart Eclipse.
Create a new Lua Project
Create Lua Project
Hopefully this will be enough to get you started with the LUA for Eclipse add-in.