Actualiser Lua installation on windows

2026-01-02 21:40:28 +01:00
parent 24d9445150
commit 3692f2d4e6

@@ -1,5 +1,47 @@
# msys2
Install [msys2](https://www.msys2.org/) app.
In the msys shell execute the following commands
`pacman -S mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-make tar`
add msys path in the environment
`C:\msys64\ucrt64\bin`
# lua
copy lua somewhere
`wget https://www.lua.org/ftp/lua-5.4.7.tar.gz`
compile it
`tar -xvzf lua-5.4.7.tar.gz`
`cd lua-5.4.7/`
`mingw32-make mingw`
copy the files in lua dir (here `C:\lua`)
`cp src/*.exe src/*.dll /c/lua/`
`cp -v src/lapi.h src/lauxlib.h src/lua.h src/luaconf.h src/lualib.h ../include/`
add lua path in the env
`C:\lua`
# Luarocks
There is a luarocks installer on this [site](https://github.com/rjpcomputing/luaforwindows/releases).
download luarocks from [github](https://github.com/luarocks/luarocks/archive/refs/tags/v3.12.2.zip)
However, there's also a minimal compilation environment to be ready. I used [msys2](https://www.msys2.org/), installed gcc and added the "usr/bin" dir in path.
extract it and from the cmd shell call the following command (to be installed in `c:\luarocks` here)
`./install.bat /MW /P "C:\luarocks"`
add luarocks path in the env
`C:\luarocks`