- get python (lol). make sure you check the box that says "add python to PATH", this will be important later
- get a visual studio compiler. make sure to select either desktop development with C++ or, game dev with C++, or both~
https://visualstudio.microsoft.com/downloads/
-
open a native tools command prompt: select
x64 native tools command prompt for VS2019
from the start menu -
install and run hererocks
pip install git+https://github.com/luarocks/hererocks
hererocks --luajit 2.1.0-beta3 -r latest <the new folder you want to install lua at>
- go to start menu and type in "Edit environment variables for your account". from this screen, edit your Path variable to include
<lua folder>/bin
-
close your native tools command prompt and reopen it
-
try the
lua
andluarocks
commands to see if they work. -
as of 10/31/2020, the luarocks install might be broken! see luarocks/luarocks#1232 if so, open up
<lua folder>\bin\luarocks.bat
, you should see something like
@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS
>NUL
SET "LUA_PATH=E:\lua\luarocks\lua\?.lua;E:\lua\luarocks\lua\?\init.lua;%LUA_PATH%"
that >NUL is not supposed to be there, let's just manually remove it:
@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS
SET "LUA_PATH=E:\lua\luarocks\lua\?.lua;E:\lua\luarocks\lua\?\init.lua;%LUA_PATH%"
and try again