Tieske / luawinmulti

Lua build and installation script for Windows, building multiple Lua versions in parallel, including LuaRocks.
Other
57 stars 5 forks source link

Questions about the PATH #13

Closed stanpetit closed 5 years ago

stanpetit commented 6 years ago

@Tieske Hi ! Thank you for this great setup utility !
Definitely, handling multiple Lua versions with a package manager associated on Windows is not straightforward for lonesome poor dummies !
There are also so many ways to get it running depending on the usage to make of it ! One of the worst headache in my life ... but I got really found of Lua while writing an addon for the VLC Media Player that was running fast on text stuffs, clear in syntax, and now I want to get more of it ! So I've been wandering around many, many web pages before to find your tool : it's a bliss !
Even understanding the overall mechanism gets clearer even if not obvious, thanks to your very clear documentation and coding style of the bat files. It's such an ugly and difficult lingo !

My setup is : Windows 7, cmd as admin, mingw-gcc, builds and installs ok.

But after reading the output of luawinmulti in the command shell, I still have questions before to do a mess when setting the environment variables as suggested :

... done with 5_1
... done with 5_2
... done with 5_3
You may want to add the following elements to your paths;  
Lua interpreter;  
    PATH     :   C:\Lua\bin  
    PATHEXT  :   .LUA  
LuaRocks;  
    PATH     :   C:\Lua\LuaRocks  
    LUA_PATH :   C:\Lua\LuaRocks\lua\?.lua;C:\Lua\LuaRocks\lua\?\init.lua  
Local user rocktree (Note: %APPDATA% is user dependent);  
    PATH     :   %APPDATA%\LuaRocks\bin  
    LUA_PATH :   %APPDATA%\LuaRocks\share\lua\5.3\?.lua;%APPDATA%\LuaRocks\share\lua\5.3\?\init.lua  
    LUA_CPATH:   %APPDATA%\LuaRocks\lib\lua\5.3\?.dll  
System rocktree  
    PATH     :   c:\lua\\bin  
    LUA_PATH :   c:\lua\\share\lua\5.3\?.lua;c:\lua\\share\lua\5.3\?\init.lua  
    LUA_CPATH:   c:\lua\\lib\lua\5.3\?.dll  

This is where I am still hanging :

The \lua\5.X\ path parts in the set path directives above are not dynamic if they are to be set manually. What I understood is that setlua.bat was partly handling this.

So should every \lua\5.X\ be set manually too for X=1,2,3 ? Or should setlua.bat do the job by itself in some way that I don't understand ?

When setlua.bat is called at the end of make.bat, the system path should be updated :

in setlua.bat,  line 52 :
REM setup system path
set path=%appdata%\luarocks\bin;%myownpath%;%PATH%

REM all paths: luarocks user-tree, luarocks system-tree, defaults
REM setup Lua paths for 5.1 ... 5.2 ... 5.3
...

But nothing happens to my environment variables : the user and system path were not modified to hold C:\Lua\bin ..., and the
LUA_CPATH, LUA_PATH, LUA_CPATH_5_X, LUA_CPATH_5_X, for X=1,2,3, were not created either...

What's up Doc ?
Should they really be set manually, or does my system show a wrong response to the commands ?

Another question :

Is there a chance to be able to configure for gcc x64 ?

Thanks again for this great tool.
Best,
Stan

Tieske commented 6 years ago

the output you're referring to is not from luawinmulti nor luawinmake but from the LuaRocks installer that gets invoked when installing everything.

Setting the proper paths should be done by setlua.bat, there should be no need for anything else.

Tieske commented 6 years ago

@stanpetit did that fix your issue?

Tieske commented 5 years ago

closing due to lack of response