How to Pack a Corona SDK Win32 App into a Single Executable

Learn how to use BoxedApp Packer to combine all files of a Corona-built desktop app into a single self-sufficient EXE. Include Lua scripts, assets, and DLLs, and hide implementation details without leaving temporary files on disk.

About Corona SDK

Corona (now Solar2D) is a cross-platform framework for building 2D applications with Lua. Developers write Lua code and assets once and build for multiple platforms including Windows. BoxedApp Packer helps to turn these Windows builds into portable, installation-free EXE files.

The Sample Project

In this tutorial we use the sample project Clock included with Corona SDK. Build the Windows executable using File > Build > Windows in Corona Simulator. You will get multiple files in the output directory, including Lua scripts, DLLs, and resources.

Corona Clock sample running
Corona Clock sample project
Build dialog for Corona app
Building the Win32 app in Corona Simulator

Output Files

The build produces many files: Clock.exe, multiple DLLs, and resource folders. Here is a simplified structure:

Clock.exe
ALmixer.dll
CoronaLabs.Corona.Native.dll
lua.dll
msvcp120.dll
msvcr120.dll
pthread.dll
vccorlib120.dll
Resources/
  Icon.png
  widget_theme_android.png
  widget_theme_ios.png
  ...

Packing the Application

Start BoxedApp Packer. Select Clock.exe as the input executable. The packed output path is set automatically. Then, in the Files section, choose Application Directory and add the DLLs and folders listed above.

BoxedApp Packer project with resources
Files added to the project in BoxedApp Packer

The app also needs the Resources directory. Click Import Directory and select it. Ensure that all Lua scripts and assets are included.

Build and Run

Click Build to create the packed EXE. The result is a single executable that launches the Corona-based app directly without requiring any additional files.

Packed Corona Clock running
Result: a single EXE running the Clock app

Benefits

  • Distribute your Corona SDK app as a single EXE file
  • Hide Lua source code and assets from users
  • No installation, no temporary files
  • Runs directly from USB or network share