Skip to content

A powerful GUI tool for compiling Lua scripts to bytecode (.luac files), specially designed for FiveM and MTA:SA script development.

License

Notifications You must be signed in to change notification settings

ChamikaSamaraweera/LuaCompilerX

LuaCompilerX

A powerful GUI tool for compiling Lua scripts to bytecode (.luac files), specially designed for FiveM and MTA:SA script development.

LuaCompilerX Python License

Features

  • Multi-Platform Support: FiveM, MTA:SA, and Generic Lua compilation
  • Batch Processing: Compile single files, multiple files, or entire folders
  • Advanced Options: Strip debug information, optimize code, handle compilation errors
  • Error Handling: Ignore compilation errors and copy failed files as .lua
  • Progress Tracking: Real-time compilation progress with detailed status updates
  • Configuration Management: Save and load compiler settings
  • User-Friendly Interface: Clean, intuitive GUI built with tkinter

Installation & Usage

Option 1: Using Pre-built Executable (Recommended)

  1. Download the latest LuaCompilerX.exe from the Releases page
  2. Place the executable in your desired folder
  3. Double-click to run - no installation required!

Option 2: Running from Source

Prerequisites

  • Python 3.7 or higher
  • tkinter (usually included with Python)

Installation

  1. Clone the repository:
git clone https://github.com/teaminfinitydev/LuaCompilerX.git
cd LuaCompilerX
  1. Install required dependencies:
pip install -r requirements.txt
  1. Run the application:
python main.py

Getting Started

First Time Setup

  1. Configure Compiler Path:

    • Go to Tools > Configure Compiler Path
    • Select your luac.exe or luac54.exe file
    • The compiler will be automatically detected if it's in your PATH
  2. Test Compiler:

    • Use Tools > Test Compiler to verify your setup

Basic Usage

  1. Select Target Platform: Choose between FiveM, MTA:SA, or Generic Lua
  2. Choose Compilation Mode: Single file, multiple files, or batch folder
  3. Select Files: Use "Select File(s)" or "Select Folder" buttons
  4. Set Output Directory: Choose where compiled files will be saved
  5. Configure Options: Set compiler options as needed
  6. Compile: Click "Compile Selected Files"

Compiler Options

  • Strip Debug Information: Removes debug symbols for smaller file size
  • Optimize Code: Enables code optimization (recommended)
  • Ignore Compilation Errors: Skip files with syntax errors instead of stopping
  • Copy Failed Files as .lua: Copy original files when compilation fails

Configuration

The application automatically saves your settings in luacompiler_config.json:

{
  "luac_path": "luac54.exe",
  "last_output_dir": "C:/your/output/path",
  "compiler_options": {
    "strip_debug": false,
    "optimize": true,
    "ignore_errors": false,
    "copy_failed": true
  }
}

Supported Platforms

FiveM

  • Optimized for FiveM server-side and client-side scripts
  • Compatible with Lua 5.4

MTA:SA

  • Multi Theft Auto: San Andreas compatibility
  • Handles MTA-specific Lua extensions

Generic Lua

  • Standard Lua compilation
  • Works with any Lua 5.x version

Troubleshooting

Common Issues

"Compiler not found" error:

  • Ensure luac.exe is installed and accessible
  • Configure the correct path in Tools > Configure Compiler Path
  • For Windows: Download Lua binaries from lua.org

Files not compiling:

  • Check if your Lua files have syntax errors
  • Enable "Ignore Compilation Errors" to skip problematic files
  • Use "Copy Failed Files as .lua" to preserve original files

Permission errors:

  • Run as administrator if needed
  • Ensure write permissions to output directory

Getting Help

  1. Check the Issues page for known problems
  2. Use Tools > Test Compiler to diagnose setup issues
  3. Enable "Ignore Compilation Errors" for batch processing

Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Built for the Lua development community
  • Designed with FiveM and MTA:SA developers in mind
  • Thanks to all contributors and testers

Support


About

A powerful GUI tool for compiling Lua scripts to bytecode (.luac files), specially designed for FiveM and MTA:SA script development.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages