Build: Copy all dependency modules to the example directory
Former-commit-id: e6c2cb47433d84c17e7277125180469f2b3f0d37
This commit is contained in:
parent
59b9e96f21
commit
4ecc701ad2
|
|
@ -190,25 +190,7 @@ function NazaraBuild:Execute()
|
|||
|
||||
-- Copy the module binaries to the example folder
|
||||
if (os.is("windows")) then
|
||||
configuration({})
|
||||
postbuildcommands({[[xcopy "%{path.translate(cfg.linktarget.relpath):sub(1, -5) .. ".dll"}" "..\..\..\examples\bin\" /E /Y]]})
|
||||
|
||||
for k,v in pairs(table.join(moduleTable.Libraries, moduleTable.DynLib)) do
|
||||
local paths = {}
|
||||
table.insert(paths, {"x32", "../extlibs/lib/common/x86/" .. v .. ".dll"})
|
||||
table.insert(paths, {"x32", "../extlibs/lib/common/x86/lib" .. v .. ".dll"})
|
||||
table.insert(paths, {"x64", "../extlibs/lib/common/x64/" .. v .. ".dll"})
|
||||
table.insert(paths, {"x64", "../extlibs/lib/common/x64/lib" .. v .. ".dll"})
|
||||
|
||||
for k,v in pairs(paths) do
|
||||
local config = v[1]
|
||||
local path = v[2]
|
||||
if (os.isfile(path)) then
|
||||
configuration(config)
|
||||
postbuildcommands({[[xcopy "%{path.translate(cfg.linktarget.relpath:sub(1, -#cfg.linktarget.name - 1) .. "../../]] .. path .. [[")}" "..\..\..\examples\bin\" /E /Y]]})
|
||||
end
|
||||
end
|
||||
end
|
||||
self:MakeCopyAfterBuild(moduleTable)
|
||||
end
|
||||
|
||||
configuration({"vs*", "x32"})
|
||||
|
|
@ -323,10 +305,7 @@ function NazaraBuild:Execute()
|
|||
|
||||
-- Copy the module binaries to the example folder
|
||||
if (toolTable.CopyTargetToExampleDir) then
|
||||
if (os.is("windows")) then
|
||||
configuration({})
|
||||
postbuildcommands({[[xcopy "%{path.translate(cfg.linktarget.relpath):sub(1, -5) .. ".dll"}" "..\..\..\examples\bin\" /E /Y]]})
|
||||
end
|
||||
self:MakeCopyAfterBuild(toolTable)
|
||||
end
|
||||
|
||||
configuration({"vs*", "x32"})
|
||||
|
|
@ -867,6 +846,34 @@ function NazaraBuild:Process(infoTable)
|
|||
end
|
||||
end
|
||||
|
||||
function NazaraBuild:MakeCopyAfterBuild(infoTable)
|
||||
if (os.is("windows")) then
|
||||
configuration({})
|
||||
postbuildcommands({[[xcopy "%{path.translate(cfg.linktarget.relpath):sub(1, -5) .. ".dll"}" "..\..\..\examples\bin\" /E /Y]]})
|
||||
|
||||
for k,v in pairs(table.join(infoTable.Libraries, infoTable.DynLib)) do
|
||||
local paths = {}
|
||||
table.insert(paths, {"x32", "../extlibs/lib/common/x86/" .. v .. ".dll"})
|
||||
table.insert(paths, {"x32", "../extlibs/lib/common/x86/lib" .. v .. ".dll"})
|
||||
table.insert(paths, {"x64", "../extlibs/lib/common/x64/" .. v .. ".dll"})
|
||||
table.insert(paths, {"x64", "../extlibs/lib/common/x64/lib" .. v .. ".dll"})
|
||||
|
||||
for k,v in pairs(paths) do
|
||||
local config = v[1]
|
||||
local path = v[2]
|
||||
if (os.isfile(path)) then
|
||||
if (infoTable.Kind == "plugin") then
|
||||
path = "../../" .. path
|
||||
end
|
||||
|
||||
configuration(config)
|
||||
postbuildcommands({[[xcopy "%{path.translate(cfg.linktarget.relpath:sub(1, -#cfg.linktarget.name - 1) .. "../../]] .. path .. [[")}" "..\..\..\examples\bin\" /E /Y]]})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function NazaraBuild:SetupInfoTable(infoTable)
|
||||
infoTable.ConfigurationLibraries = {}
|
||||
infoTable.ConfigurationLibraries.DebugStatic = {}
|
||||
|
|
|
|||
Loading…
Reference in New Issue