diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2013-12-20 11:33:47 -0800 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2013-12-20 11:33:47 -0800 |
commit | 30b5ae3ddecd717eb524e4909cfa0acb049f4895 (patch) | |
tree | b363f42ee9b4be380bbcab6a209e3885ff01ba62 | |
parent | e70f8ed480aa963c1dcc02b999cd47c0bff50f2a (diff) | |
parent | 8a2ede6dff722e2b6fb1df4de8e7b6fd8a248302 (diff) | |
download | luarocks-30b5ae3ddecd717eb524e4909cfa0acb049f4895.tar.gz luarocks-30b5ae3ddecd717eb524e4909cfa0acb049f4895.tar.bz2 luarocks-30b5ae3ddecd717eb524e4909cfa0acb049f4895.zip |
Merge pull request #188 from echiesse/master
Fixed the error of not embedding the manifest in DLLs compiled by Visual Studio 2008…
-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 |