> -----Original Message-----
> From: Thijs Schreijer [mailto:th...@thijsschreijer.nl]
> Sent: maandag 25 maart 2013 23:12
> To: luarocks-developers@lists.sourceforge.net
> Subject: [Luarocks-developers] MinGW and LuaSocket
> 
> List,
> 
> I can't get LuaRocks and MinGW to play nice when installing LuaSocket.
> Nothing new; http://lists.luaforge.net/pipermail/luarocks-developers/2011-
> January/002289.html
> 
> So I figured; let's take the binaries...
> I downloaded the binary rock; luasocket-2.0.2-3.win32-x86.rock Ran
> "luarocks unpack luasocket-2.0.2-3.win32-x86.rock" to unpack it.
> 
> But how do I get it installed? "install" tries building it again. I also
> tried copying the files manually, but then when installing a module that
> depends on LuaSocket, it will retry to install/build it, which fails, and
> the depending package also fails.
> 

So here's how I "solved" it;
>From the binary rock, modify rockspec file, replace "build" element with:
build = {
   type = "builtin",
   modules = {
      ["ltn12"] = "lua/ltn12.lua",
      ["mime"] = "lua/mime.lua",
      ["socket"] = "lua/socket.lua",
      ["socket.ftp"] = "lua/socket/ftp.lua",
      ["socket.http"] = "lua/socket/http.lua",
      ["socket.smtp"] = "lua/socket/smtp.lua",
      ["socket.tp"] = "lua/socket/tp.lua",
      ["socket.url"] = "lua/socket/url.lua",
   }
}

then from the containing folder:
   luarocks make
   xcopy /E lib\*.* C:\Users\Public\Lua\LuaRocks\lib\lua\5.1

the former command satisfies luarocks' dependency needs (and does the lua 
part), the latter puts the binaries in place.

Only question remaining is whether the binaries were created with MinGW...  If 
not there could be some runtime.dll problems, but for now it works.

Thijs

------------------------------------------------------------------------------
Own the Future-Intel® Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
Luarocks-developers mailing list
Luarocks-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/luarocks-developers

Reply via email to