Installing Corona SDK — Windows

This guide will help you get up and running with the Corona SDK for Windows.

Installing Corona SDK

Note

Corona SDK on Windows only supports device builds for Android. Corona SDK on OS X supports both iOS and Android development.

You do not need to install the Android SDK to use Corona SDK. However, to create device builds to test on actual Android devices, you will need the Java Development Kit. The installation process is described below.

We'll assume you've already downloaded Corona. Now, double-click the .msi installer file and follow the steps in Corona's installation wizard.

Activating the SDK

In order to use the Corona SDK, you must be connected to the Internet and perform a simple one-time authorization process.

Open the Corona Simulator from the folder where you installed it. The first time you launch, you will be presented with a License Agreement (EULA). Read the license terms and click Agree. If you've already registered for a Corona account, simply enter your account e-mail and password to activate the SDK. Otherwise, click Register to create an account.

Upon successful login, you will receive a confirmation dialog. You're ready to get started!

Java Development Kit Setup

Installing the Corona SDK lets you create and test Corona apps locally on your PC. To build an app for testing on an Android device, you need to install the Java 6 Development Kit (Corona does not support JDK7). If you already have JDK6 installed, you can use it, provided that it is the x86 (32-bit) version, not x64 (64-bit). If you're not sure which version you have, it's recommended that you follow these instructions.

  1. Go to the JDK download page.
  2. Locate Java SE 6 and click the link. Do not select Java SE 7.
  3. On the next page, scroll down to the Java SE Development Kit 6u45 box.
  4. Read the license agreement and accept it if you agree.
  5. Slightly below, locate the Windows x86 row and click the associated link to download the program.
  6. When the download is complete, run the installer.

Corona Editor (IDE)

Corona Editor offers developers a very capable and lightweight IDE. Corona Editor streamlines development and includes the following:

For more information, please see the Corona Editor page.

Other Text Editors

If you don't already have a favorite text editor, the following options are recommended. These advanced text editors automatically color your Lua code, provide comprehensive search/replace options, and allow you to jump between blocks of your code (functions).

Corona Development Environment

The Corona SDK development environment consists of two aspects: the Corona Simulator and the Corona Simulator Output window.

  1. The Corona Simulator is a visual representation and test environment for your app. What you see in the Simulator is generally what your app will look like — and how it will function — when deployed to an actual device. The Corona Simulator is an essential tool because it allows you to view changes to your code instantly in an active, responsive environment that closely mimics the device.

  2. The Corona Simulator Output is where you can view diagnostic messages about what's happening in your program. This window is automatically displayed when you launch the Corona Simulator.

Welcome Window

The Welcome Window provides access to Corona developer resources. From here, you can also press Cmd-R to relaunch the most recently edited app.

  • New Project — this is the same as FileNew Project and is used to create a new project with an optional template.

  • Open — open an existing project.

  • Recent Projects — shows a list of your recent projects for easy access.

  • Docs — open the Corona Docs page where you'll find details on all of the Corona SDK features and APIs.

  • Samples — access the wealth of sample applications included with the Simulator. You can build these for a device and examine their code.

  • Forum — open the Corona Forums where you can discuss developer topics with other Corona users.

  • Learn — access Corona's extensive tutorials on mobile application development.

File Menu

The File menu is where projects (applications) are created or opened. This is also where you build your apps for distribution or testing on devices. Finally, this menu provides access to the Simulator Preferences which are discussed in detail below.

Hardware Menu

The Hardware menu is used to simulate physical device actions such as rotating the screen.

View Menu

The View menu has options to manipulate the Simulator window or change the skin (ViewView As).

Corona Simulator Preferences

The Simulator has several preferences which let you customize the development workflow.

  • Deauthorize and Quit — the number of different computers on which you're allowed to run the Simulator is limited, so you'll need to deauthorize a computer if you stop using it. You can also use this button if you need to change the Corona account credentials you're developing with.

  • Anonymous feedback — approve the sending of anonymous usage information that helps us improve the Corona Simulator.

  • Don't show the Welcome Window — don't show the Welcome Window when launching the Simulator.

  • Show Runtime Errors — show a diagnostic popup when the application experiences a runtime error. This helps in debugging application code.

Building Apps

When you want to build your app for distribution or to test on a device, choose File → Build for Android. The entire process is outlined here.

Command Line Usage

To start a particular app in the Corona Simulator without double-clicking it, use a command like this:

"C:\Program Files\Corona Labs\Corona SDK\Corona Simulator.exe" "C:\Documents and Settings\MyAccount\My Documents\Corona Apps\My App\main.lua"

One additional flag is allowed (/debug) which allows an IDE to connect a debugger to the Simulator session. It should come immediately after the .exe.