diff --git a/build/scripts/common.lua b/build/scripts/common.lua index 405b66b60..a0957966d 100644 --- a/build/scripts/common.lua +++ b/build/scripts/common.lua @@ -188,6 +188,29 @@ function NazaraBuild:Execute() libdirs("../lib/" .. makeLibDir .. "/x64") targetdir("../lib/" .. makeLibDir .. "/x64") + -- 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 + end + configuration({"vs*", "x32"}) libdirs("../extlibs/lib/msvc/x86") libdirs("../lib/msvc/x86") @@ -851,7 +874,7 @@ function NazaraBuild:SetupInfoTable(infoTable) infoTable.ConfigurationLibraries.DebugDynamic = {} infoTable.ConfigurationLibraries.ReleaseDynamic = {} - local infos = {"Defines", "Files", "FilesExcluded", "Flags", "Includes", "Libraries"} + local infos = {"Defines", "DynLib", "Files", "FilesExcluded", "Flags", "Includes", "Libraries"} for k,v in ipairs(infos) do infoTable[v] = {} infoTable["Os" .. v] = {} diff --git a/build/scripts/modules/audio.lua b/build/scripts/modules/audio.lua index f03e493a9..4fcb1bf5a 100644 --- a/build/scripts/modules/audio.lua +++ b/build/scripts/modules/audio.lua @@ -14,6 +14,10 @@ MODULE.OsFiles.Windows = { "../src/Nazara/Audio/Win32/**.cpp" } +MODULE.OsDynLib.Windows = { + "soft_oal" +} + MODULE.OsFiles.Posix = { "../src/Nazara/Audio/Posix/**.hpp", "../src/Nazara/Audio/Posix/**.cpp" diff --git a/build/scripts/tools/ndk.lua b/build/scripts/tools/ndk.lua index 78ff544de..5a1084f48 100644 --- a/build/scripts/tools/ndk.lua +++ b/build/scripts/tools/ndk.lua @@ -1,5 +1,7 @@ TOOL.Name = "SDK" +TOOL.CopyTargetToExampleDir = true + TOOL.Directory = "../SDK/lib" TOOL.Kind = "Library" diff --git a/build/scripts/tools/ndk_server.lua b/build/scripts/tools/ndk_server.lua index c9c443e57..978d620be 100644 --- a/build/scripts/tools/ndk_server.lua +++ b/build/scripts/tools/ndk_server.lua @@ -1,5 +1,7 @@ TOOL.Name = "SDKServer" +TOOL.CopyTargetToExampleDir = true + TOOL.Directory = "../SDK/lib" TOOL.Kind = "Library"