From 3692f2d4e6965c5bb985a825502475192607e433 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fou=C3=A9?= Date: Fri, 2 Jan 2026 21:40:28 +0100 Subject: [PATCH] Actualiser Lua installation on windows --- Lua-installation-on-windows.md | 46 ++++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/Lua-installation-on-windows.md b/Lua-installation-on-windows.md index 6c0210c..010c161 100644 --- a/Lua-installation-on-windows.md +++ b/Lua-installation-on-windows.md @@ -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. \ No newline at end of file +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` \ No newline at end of file