lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]




On 24 Mar 2020, at 21:17, Nereus <codecomplete@free.fr> wrote:

Hello,

I'm getting started with Lua to write a simple scrip to edit all *.txt in a
directory (eg. for file in glob("*.txt") do…). Apparently, this is not
possible with basic Lua, and requires installing a module.

After unzipping the Lua 5.3.5 binaries
(http://luabinaries.sourceforge.net/download.html) and the Luarocks 3.3.1
binaries (http://luarocks.github.io/luarocks/releases/), I have the
following files:

c:\temp\lua>
lua53.dll
lua53.exe
luac53.exe
wlua53.exe
luarocks-admin.exe
luarocks.exe

According to  this thread
<https://stackoverflow.com/questions/49393378/trying-to-loop-through-directory-to-list-all-the-files-using-lua>
, I need the luafilesystem module:

c:\temp\lua>luarocks install luafilesystem
Warning: Could not find Lua 5.3 in PATH.
Modules may not install with the correct configurations. You may want to
specify the path prefix to your build of Lua 5.3 using --lua-dir
Installing https://luarocks.org/luafilesystem-1.7.0-2.src.rock

Error: Failed finding Lua library. You may need to configure LUA_LIBDIR.
=============

I'm also not clear at the difference between Lua, LuaRocks, and LuaDist.

Is there a tutorial on how to get a basic Lua + Luarocks system up and
running?

Thank you.



--
Sent from: http://lua.2524044.n2.nabble.com/Lua-l-f2524044.html


For. Quick start on Windows (does involve setting up a compiler) you can use: LuaWinMulti

See https://github.com/Tieske/luawinmulti