This repository contains build scripts to compile LuaJIT for various platforms, with a primary focus on cross-compiling for the FRC roboRIO (linuxathena). The goal is to provide a consistent build environment for creating LuaJIT binaries for use in FRC projects.
The build system is designed to support multiple host platforms and targets.
- roboRIO: The primary target. Binaries are cross-compiled using a Docker-based toolchain on all host platforms.
- macOS: Universal binary for both
x86_64andarm64architectures. - Windows: x86_64 binaries
- Linux: x86_64 binaries
The build process is managed by shell scripts and is currently optimized for macOS hosts.
- Docker: (all platforms) Required for cross-compiling for the roboRIO on all host platforms.
- Xcode Command Line Tools (macOS only): Required for compiling the native macOS universal binary. Install with
xcode-select --install. - Visual Studio: (windows only): 2019 or higher. install with Desktop c++ support
- Git Bash: Required for running shell scripts.
- NSIS: Required for creating the Windows installer. Make sure
makensis.exeis in yourPATH - GCC: (linux): install by normal means for your distro.
The build-macos.sh script automates the entire process on a macOS host. To run the full build process:
sh build-macos.shTo install the compiled binaries into /opt/luabot on a macOS machine for local development:
sudo sh install-macos.shBuilding on Windows involves a few manual steps.
Build Windows Native Binary:
Open a Command Prompt and run build-windows.bat. This will compile LuaJIT for your native Windows architecture.
Cross-Compile for roboRIO Open Git Bash. The following builds a Docker image and cross-compiles LuaJIT for the roboRIO.
sh build-roborio-docker.shCreate Installer: Build the installer using NSIS.
makensis setup.nsiRun the installer produced in the previous step. It should be named luabot-win64-0.0.1-setup.exe or something similar.