Create project
With all previous steps completed, let’s start our first project.
Create the folder
Section titled “Create the folder”From the command-line or file manager of choice:
mkdir my-app && cd my-appInitialize the project
Section titled “Initialize the project”First time users should stick to interactive mode:
installua init --interactiveConfirm 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.
Write the installer
Section titled “Write the installer”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),}Build it
Section titled “Build it”installua build install.luaThat compiles your program and hands it to makensis, leaving MyApp-setup.exe behind – your first installer.