diff options
| author | Eric Chiesse <echiesse@gmail.com> | 2013-11-23 01:55:45 -0300 |
|---|---|---|
| committer | Eric Chiesse <echiesse@gmail.com> | 2013-11-30 14:53:31 -0300 |
| commit | 8d1973d87a120e4637f6e4dfee00ae2ba3a1c945 (patch) | |
| tree | 2baa176f9a96981d87925778a5c2cfb2c805a8e0 | |
| parent | 143cc28429bae0ba72c08433e21aacdf3723d72f (diff) | |
| download | luarocks-8d1973d87a120e4637f6e4dfee00ae2ba3a1c945.tar.gz luarocks-8d1973d87a120e4637f6e4dfee00ae2ba3a1c945.tar.bz2 luarocks-8d1973d87a120e4637f6e4dfee00ae2ba3a1c945.zip | |
Fixed the error of not embedding the manifest in DLLs compiled by Visual Studio 2008 in the case where the DLL is part of a module (inside a subdirectory). LusRocks was not correctly building modules with directory structure (like luasql.postgres) when compiling for win32.
| -rw-r--r-- | src/luarocks/build/builtin.lua | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/luarocks/build/builtin.lua b/src/luarocks/build/builtin.lua index 427ab7c9..f9ef4c44 100644 --- a/src/luarocks/build/builtin.lua +++ b/src/luarocks/build/builtin.lua | |||
| @@ -112,9 +112,15 @@ function run(rockspec) | |||
| 112 | def:write("luaopen_"..name:gsub("%.", "_").."\n") | 112 | def:write("luaopen_"..name:gsub("%.", "_").."\n") |
| 113 | def:close() | 113 | def:close() |
| 114 | local ok = execute(variables.LD, "-dll", "-def:"..deffile, "-out:"..library, dir.path(variables.LUA_LIBDIR, variables.LUALIB), unpack(extras)) | 114 | local ok = execute(variables.LD, "-dll", "-def:"..deffile, "-out:"..library, dir.path(variables.LUA_LIBDIR, variables.LUALIB), unpack(extras)) |
| 115 | local manifestfile = basename..".dll.manifest" | 115 | local basedir = "" |
| 116 | if name:find("%.") ~= nil then | ||
| 117 | basedir = name:gsub("%.%w+$", "\\") | ||
| 118 | basedir = basedir:gsub("%.", "\\") | ||
| 119 | end | ||
| 120 | local manifestfile = basedir .. basename..".dll.manifest" | ||
| 121 | |||
| 116 | if ok and fs.exists(manifestfile) then | 122 | if ok and fs.exists(manifestfile) then |
| 117 | ok = execute(variables.MT, "-manifest", manifestfile, "-outputresource:"..basename..".dll;2") | 123 | ok = execute(variables.MT, "-manifest", manifestfile, "-outputresource:"..basedir..basename..".dll;2") |
| 118 | end | 124 | end |
| 119 | return ok | 125 | return ok |
| 120 | end | 126 | end |
| @@ -250,7 +256,7 @@ function run(rockspec) | |||
| 250 | end | 256 | end |
| 251 | if fs.is_dir("lua") then | 257 | if fs.is_dir("lua") then |
| 252 | local ok, err = fs.copy_contents("lua", luadir) | 258 | local ok, err = fs.copy_contents("lua", luadir) |
| 253 | if not ok then | 259 | if not ok then |
| 254 | return nil, "Failed copying contents of 'lua' directory: "..err | 260 | return nil, "Failed copying contents of 'lua' directory: "..err |
| 255 | end | 261 | end |
| 256 | end | 262 | end |
