In this article I will show you step by step how to install a Corona SDK development environment with Sublime Editor and the official Corona Editor plugin for Sublime.
Sublime is an all purpose text editor with a focus on developers. It has many convenient features which makes this editor one of the most beloved editor around.
Windows/Mac KeysThese courses are written with CMD key shortcut for Mac. On Windows machines the CMD keys should automatically be translated to STRG keys.
Nevertheless, if you encounter any CMD keys in the text, although you are on a Windows machine, please use STRG instead.
Download & Install Corona SDK
If you haven’t installed Corona SDK already goto https://coronalabs.com.
Find the Download Button. If you have not registered as a developer you have to fill out the form.
If you already have a developer account you have two choices for Corona SDK Download:
The Public Release is a stable version which does not contain the latest features maybe experimental. Therefore it is stated as the most stable version.
Whereas the Daily Build is the bleeding edge version that does include the latest fixes and features but may be in an unstable state.
My experience with daily build is quite good. In fact I never encountered any problems with a daily builds. This is why I recommend to download the latest Daily Build version.
The Download comes with an installer for your OS. Just follow the common steps to install an application on your system.
When you start the newly installed Corona Simulator for the first time, you will be asked to enter your login credentials. These are the same credentials you used to register as a Corona SDK developer.
Download & Install Sublime
Now that Corona SDK is properly installed we need an editor to create the code for our apps. In these courses i will rely on Sublime Text Editor and the official Corona SDK Editor, which is a plugin for Sublime Text.
I recommend to use the Version 3 of Sublime and install it on your OS. Go to their website, download and install Sublime.
After installation open the Sublime Text Editor.
Download & Install Sublime’s Package Control plugin
First thing with every new Sublime installation should be adding the Package control plugin. This is a packet manager for Sublime plugins and extensions.
With this manager you can easily add new plugins (i.e. the Corona SDK Editor) or manage updates for your installed plugins.
Installing the Packet Control plugin is a bit different to other applications. Sublime does have an interactive console. We have to paste some code into that console to install the plugin.
But don’t worry: you only have to copy and paste a code snippet and press enter.
You can find the code here or use the snippets below.
import urllib.request,os,hashlib; h = '2915d1851351e5ee549c20394736b442' + '8bc59f460fa1548d1514676163dafc88'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)
import urllib2,os,hashlib; h = '2915d1851351e5ee549c20394736b442' + '8bc59f460fa1548d1514676163dafc88'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler()) ); by = urllib2.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); open( os.path.join( ipp, pf), 'wb' ).write(by) if dh == h else None; print('Error validating download (got %s instead of %s), please try manual install' % (dh, h) if dh != h else 'Please restart Sublime Text to finish installation')
If you are using Sublime Version 2, you have to change the tab to Sublime 2.
Just copy the snippet above with Cmd+C.
Now open Sublime. Press Cmd+N or use File>New File to create a new empty file. If not already opened, open Sublime’s console with View>Show Console.
Click into the grey input field at the very bottom. I marked it with a red arrow in the screenshot.
If the cursor is in this text input field you can now paste the code snippet from above with Cmd+V and press Return.
Now Sublime will download & install the Package Control plugin.
I recommend to restart Sublime now.
Install Corona Editor Plugin
Now let’s use the new Package Control plugin to install Corona Editor.
In the menu click on Tools>Command Palette…
A pop up window appears with lots of commands to choose from. We need to find the command Package Control: Install Package.
Luckily Sublime does offer a search field with fuzzy search. Just start typing install package. The list of commands get filtered to only a few.
Use the up/down cursor keys to select the command Package Control: Install Package and press return to start the command. Or click it with the mouse if you are uncomfortable using the keyboard.
At the bottom you can see an equal sign moving. This is Sublimes indicator for loading: The Package Control plugin loads a list of available packages you can install. The list should also contain our Corona SDK Editor we want to install.
After the list has loaded, a pop up appears again.
This time with a huge list of plugins we can install.
Again, to find our plugin we can start typing in the search field to quickly filter the list.
Start typing Corona Editor. After some letters you should already see the Corona Editor entry.
Select it with cursor keys and press return or click on it to install it.
After a short time the Corona Editor plugin is installed. I recommend to restart Sublime, before using the Corona Editor.
Now you should have a working Corona SDK development environment and you should be able to follow the courses here on devilsquid.com.
Furthermore I recommend to have a look at this short article about the most important keyboard shortcuts for Corona Developers using Sublime Editor.