Skip to content

Quickly install LuaRocks with Lua 5.1 for Windows NT-based operating systems.

License

Notifications You must be signed in to change notification settings

shawnjb/luarocks-install

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Lua Installation on Windows

Install Lua First

Use Powershell as Administrator and run the following command to install Lua 5.1.5 with LuaRocks:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process -Force; iex (iwr -useb 'https://raw.githubusercontent.com/shawnjb/windowsnt-toolkit/main/Lua/LuaInstallation.ps1')

Building Modules with LuaRocks

You'll need Visual Studio Community 2022, which provides essential build tools for LuaRocks modules like LuaFileSystem.

Warning

Note that "Desktop Development with C++" is a large download, approximately 9.36 GB in size.

winget install --source=winget --id=Microsoft.VisualStudio.2022.Community

Wait for the installation to complete.

After installing Visual Studio Community 2022:

  1. Launch the Visual Studio Installer from the Start Menu or navigate to C:\Program Files (x86)\Microsoft Visual Studio\Installer\setup.exe.

  2. Select "Modify" for Visual Studio Community 2022 installation.

example-0

  1. Choose to install "Desktop Development with C++." This process will take some time.

example-1

  1. Restart your computer after the installation completes. You can do this quickly using the following command, but ensure to save your work before proceeding:
shutdown /r /f /t 0
  1. Once logged back in, locate and open the "x86_x64 Cross Tools Command Prompt for VS 2022" shortcut from the Start Menu.

    • This command prompt provides necessary build tools for installing libraries such as LuaFileSystem.
  2. You can now proceed with installing LuaRocks modules. For example, use luarocks install luafilesystem to install LuaFileSystem, including any required building tools. Note that some LuaRocks libraries may depend on third-party modules and libraries which you might need to include in your system's environment variables separately from LuaRocks.

example-2

About

Quickly install LuaRocks with Lua 5.1 for Windows NT-based operating systems.

Topics

Resources

License

Stars

Watchers

Forks