Disseract / Lua-Windows-Repack

The special repack of "Lua for Windows" ⸺ 9000XZ noob-friendly limited edition!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The special repack of "Lua for Windows" ⸺ 9000XZ noob-friendly limited edition!

This is meant to be used by people who want to compile Lua on Windows by themselves, but they don't know how-to... or perhaps you want to mess with Lua C API as quick as possible; wait no more.
The goal of this repack is to make it all dead-simple, so even a cavemen could do it as fast as possible without using any third-party programs!

With this repack, there are no pre-compiled binaries, you need to build/compile Lua from source.
Furtunately, this repack comes with several additions regarding the building/compiling phase, featuring:

  • Written in pure Batch, no prerequisites at all (no external dependencies; other than either VS or Windows SDK)
  • One-click Batch script to download and extract official Lua source code
  • One-click Batch script to build/compile Lua (requires Visual Studio 2019 installed)
  • One-click Batch script to install Lua, setting up system environment variables (requires admin privileges)
  • Visual Studio 2019 solution with 3 main projects (to compile lua.dll / lua.exe / luac.exe individually)
    • Includes bonus project! Fully functional, simple Lua C embedding example.

Building / Installation

  1. Start by cloning this repository locally (requires git):
    git clone https://github.com/Disseract/Lua-Windows-Repack Lua

  2. Run download.bat file to download Lua source code.

  3. Open the Lua version folder (5.3.6). At this point, verify that Lua source code has been downloaded, you should find it inside the src subfolder.

  4. Next, run build.bat file to compile Lua.

  5. Last but not least, in case if you want to install this Lua version on your system, then run setup-env-vars.bat as administrator.

  6. At this point, you are all done and you should be able to run lua/luac from Terminal or command-line.

Also, if you want to play with Lua C API, a simple example project has been included.

  1. Open the solution (vs2019\Lua.sln) in Visual Studio 2019.
  2. You will find an example project called EmbeddingSample in the Solution Explorer window.
  3. Go ahead and build the solution, it will compile everything and you should find the binaries in the 5.3.6\bin folder, as well as lib files which you will find in the 5.3.6\lib folder.

By running 5.3.6\bin\EmbeddingSample.exe it will execute 5.3.6\lua\main.lua Lua script, at which point you should see the hello world message displayed on the screen 😃

About

The special repack of "Lua for Windows" ⸺ 9000XZ noob-friendly limited edition!

License:MIT License


Languages

Language:Batchfile 78.0%Language:C++ 21.1%Language:Lua 0.9%