LUAINSTALLER(1)

NAME
luainstaller - Package Lua (.lua) scripts into standalone executables using multi-engine compilation (luastatic / srlua)

SYNOPSIS
luainstaller [command] [options]
luainstaller-cli [command] [options]
luainstaller-gui

DESCRIPTION
luainstaller is an open-source Python-based toolchain for packaging Lua (.lua) scripts into standalone executable binaries. Version 2.0 introduces a multi-engine architecture supporting both luastatic (native compilation) and precompiled srlua engines for Windows and Linux. luainstaller may be used as:

•   a command-line tool

•   a graphical user interface (GUI) tool

•   a Python library integrated into other systems

ENGINES
luainstaller 2.0 provides the following packaging engines:
Engine Name | Description | Platform
luastatic | Compile to true native binary | Linux only
srlua | Default alias: system srlua | Windows/Linux
winsrlua515 | Windows Lua 5.1.5 (64-bit) | Windows
winsrlua515-32 | Windows Lua 5.1.5 (32-bit) | Windows
winsrlua548 | Windows Lua 5.4.8 | Windows
linsrlua515 | Linux Lua 5.1.5 (64-bit) | Linux
linsrlua515-32 | Linux Lua 5.1.5 (32-bit) | Linux
linsrlua548 | Linux Lua 5.4.8 | Linux
Default engine:

•   Windows: srlua (winsrlua548)

•   Linux: luastatic The srlua engines ship with precompiled binaries. luastatic engine requires a proper luastatic toolchain installed on the system.

ENGINE REQUIREMENTS

  srlua engines
No configuration is required. All binaries are bundled.

  luastatic engine
Requires the following tools in PATH:

lua Official Lua interpreter.

luarocks
    Lua package manager.

luastatic
    Installed via: luarocks install luastatic

gcc C compiler.

WORKFLOW
The luainstaller build process consists of:

1.  Environment analysis and dynamic library detection.

2.  Recursive dependency analysis of the entry script.

3.  Merge user-specified manual dependencies.

4.  Packaging using the selected engine:
      - luastatic: compile into native binary
      - srlua: merge dependencies into temporary script and pack using bundled srlua binary

AUTOMATIC DEPENDENCY ANALYSIS
luainstaller scans for require() statements in these forms:
require 'pkg'
require "pkg"
require('pkg')
require("pkg")
require([[pkg]])
pcall(require, ...) imports are also recognized. Dynamic requires are not supported. For complex or runtime-generated imports, disable analysis and specify dependencies manually. Only pure Lua source files (.lua) can be included.

COMMANDS

  help
Show general help.

luainstaller help

  engines
List all supported packaging engines.

luainstaller engines

  logs
Display luainstaller logs.

luainstaller logs [-limit N] [-asc]

-limit
    Limit log count.

-asc
    Display logs in chronological order (default: reverse). Logs are persisted using SimpSave.

  analyze
Perform dependency analysis on an entry script.

luainstaller analyze entry.lua [-max N] [--detail] [-bundle PATH]

-max
    Maximum dependency count (default: 36).

--detail
    Display detailed analysis output.

-bundle
    Bundle to single .lua script file.

  build
Compile entry Lua script into an executable.

luainstaller build entry.lua [-engine NAME] [-require file1.lua,file2.lua] [-max N] [-output PATH] [--manual] [--detail]

entry.lua
    Entry script.

-engine
    Select packaging engine; default per-platform.

-require
    Manually include dependency scripts.

-max
    Maximum automatic dependency depth.

-output
    Output executable path; Windows auto-appends .exe.

--manual
    Disable automatic dependency analysis.

--detail
    Verbose output.

GUI USAGE
Launch the graphical Tkinter interface:

luainstaller-gui The GUI provides basic build functionality using the platform default engine.

EXAMPLES

  Build with automatic dependency analysis
luainstaller build hello.lua

  Specify engine
luainstaller build app.lua -engine linsrlua548

  Manual dependency mode
luainstaller build a.lua --manual -require b.lua,c.lua

  Specify engine and output
luainstaller build test.lua -engine winsrlua515 -output ../myProgram --detail

  Build with extended dependency limit
luainstaller build main.lua -max 100

  Bundle to single file
luainstaller analyze main.lua -bundle bundled.lua

SEE ALSO
lua(1), luastatic(1), gcc(1)

AUTHOR
WaterRun <linzhangrun49@gmail.com>

LICENSE
LGPL-3.0-or-later