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')
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:
-
Launch the Visual Studio Installer from the Start Menu or navigate to
C:\Program Files (x86)\Microsoft Visual Studio\Installer\setup.exe
. -
Select "Modify" for Visual Studio Community 2022 installation.
- Choose to install "Desktop Development with C++." This process will take some time.
- 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
-
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
.
- This command prompt provides necessary build tools for installing libraries such as
-
You can now proceed with installing LuaRocks modules. For example, use
luarocks install luafilesystem
to installLuaFileSystem
, 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.