Skip to content

Create project

With all previous steps completed, let’s start our first project.

From the command-line or file manager of choice:

Terminal window
mkdir my-app && cd my-app

First time users should stick to interactive mode:

Terminal window
installua init --interactive

Confirm the directory when it asks, then pick everything on the menu – the config files, the stubs your editor reads, the VS Code settings and the .gitignore entries are the recommended defaults for a new project.

installua init names install.lua as the entry file, so that’s what to write next:

attributes {
name = "MyApp",
outFile = "MyApp-setup.exe",
compressor = "lzma",
}
installer {
installDir = PROGRAMFILES64 .. "/MyApp",
page.welcome {},
page.directory {},
page.instFiles {},
page.finish {},
section("Core", function()
setOutPath(INSTDIR)
file("myapp.exe")
writeUninstaller(INSTDIR .. "/uninstall.exe")
end),
}
uninstaller {
page.confirm {},
page.instFiles {},
section("Uninstall", function()
delete(INSTDIR .. "/myapp.exe")
delete(INSTDIR .. "/uninstall.exe")
rmDir(INSTDIR)
end),
}
Terminal window
installua build install.lua

That compiles your program and hands it to makensis, leaving MyApp-setup.exe behind – your first installer.