LuaRocks install on windows

LuaRocks is package manager for lua.
Defold not need it. But you can use local Lua and LuaRocks to solve some tasks.
For example i use it for map parsing from tiled.

Installing LuaRocks in window pc is a HELL.
I try different ways of installing it. And find guide that worked for me.

Few days ago i try to install it on new pc and find that guide is not available.
So i make a copy of that guide with some small changes.

Maybe someone find it usefull.

5 Likes

Have you tried chocolatey for installing Lua/LuaRocks?
(I.e. choco install lua/ choco install luarocks)

(I’m going to try later on my windows machine as well.)

1 Like

No)
I try intall it:
1)from luarocks site. Luarocks with embedded lua in one package but have problems(
2)also I try python wrapper(do not remember it name) that download and install lua and luarocks.
3)Some packages with lua, and luarocks from other websites.

For me only that guide was worked)

1 Like

I just did this on my Windows machine (if it’s any help to our users):

Open a command prompt as Administrator.
I already have chocolatey (a package manager for windows) installed.

Then I run:

choco install lua -y
choco install luarocks -y

After opening a new terminal/command prompt, I can now use the tools:

$ luarocks.exe --version
C:\ProgramData\chocolatey\lib\luarocks\luarocks-2.4.4-win32\luarocks.lua 2.4.4
LuaRocks main command-line interface
3 Likes

What about install dependencies. For example luafilesystem?

You also need compiler?

If it needs to compile, then yes you need to run it in an environment that has that support.

E.g. I start the “x86 Native Tools Command Prompt for VS 2022”, which is installed when I install the Visual Studio Community. This command prompt sets up the paths etc in order to run “cl.exe”. Then I run:

$ luarocks.exe install --local luafilesystem

But honestly, I wonder why luarocks doesn’t provide prebuilt binaries, since that’s what I’d expect from a package manager…

4 Likes

Cool) Chocolatey is awesome))

2 Likes