From 5e48f8b8b3ab536e494a4fe68beb62937ed92b2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Leclercq?= Date: Sun, 6 Nov 2016 22:04:47 +0100 Subject: [PATCH] Build: Fix install commands --- build/scripts/common.lua | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/build/scripts/common.lua b/build/scripts/common.lua index e7c685857..0e46c9b9c 100644 --- a/build/scripts/common.lua +++ b/build/scripts/common.lua @@ -531,8 +531,10 @@ end function NazaraBuild:MakeInstallCommands(infoTable) if (os.is("windows")) then - configuration("*Dynamic") - + filter("kind:SharedLib") + + postbuildmessage("Copying " .. infoTable.Name .. " library and its dependencies to install/executable directories...") + for k,v in pairs(self.InstallDir) do local destPath = path.translate(path.isabsolute(k) and k or "../../" .. k) postbuildcommands({[[xcopy "%{path.translate(cfg.buildtarget.relpath)}" "]] .. destPath .. [[\" /E /Y]]}) @@ -541,24 +543,24 @@ function NazaraBuild:MakeInstallCommands(infoTable) for k,fileName in pairs(table.join(infoTable.Libraries, infoTable.DynLib)) do local paths = {} for k,v in pairs(infoTable.BinaryPaths.x86) do - table.insert(paths, {"x32", v .. "/" .. fileName .. ".dll"}) - table.insert(paths, {"x32", v .. "/lib" .. fileName .. ".dll"}) + table.insert(paths, {"x86", v .. "/" .. fileName .. ".dll"}) + table.insert(paths, {"x86", v .. "/lib" .. fileName .. ".dll"}) end for k,v in pairs(infoTable.BinaryPaths.x64) do - table.insert(paths, {"x64", v .. "/" .. fileName .. ".dll"}) - table.insert(paths, {"x64", v .. "/lib" .. fileName .. ".dll"}) + table.insert(paths, {"x86_64", v .. "/" .. fileName .. ".dll"}) + table.insert(paths, {"x86_64", v .. "/lib" .. fileName .. ".dll"}) end for k,v in pairs(paths) do - local config = v[1] + local arch = v[1] local srcPath = v[2] if (os.isfile(srcPath)) then if (infoTable.Kind == "plugin") then srcPath = "../../" .. srcPath end - configuration(config) + filter("architecture:" .. arch) for k,v in pairs(self.ExecutableDir) do local srcPath = path.isabsolute(srcPath) and path.translate(srcPath) or [[%{path.translate(cfg.linktarget.relpath:sub(1, -#cfg.linktarget.name - 1) .. "../../]] .. srcPath .. [[")}]] @@ -568,6 +570,8 @@ function NazaraBuild:MakeInstallCommands(infoTable) end end end + + filter({}) end end