Build/Package: Don't package common binaries for not exported binaries
Former-commit-id: fb577c02a91d8f016de017390641c0c1e26a5b58 [formerly 8dacd7053117130c72a8eefe98fd617f7193d186] [formerly daf3ea264c0aa476d57130698a35459685cecc4f [formerly d3153049d084af9680181933e3506202061ad98e]] Former-commit-id: da7db81a78c07c060f16ec6cd51fb29137b2efc1 [formerly 215261f061170f3dcb09a843f64fd79d124e316b] Former-commit-id: 69c613201f4d648d0c1f029f0303b23c1715c360
This commit is contained in:
parent
a95af6c3e3
commit
1ef989871f
|
|
@ -26,6 +26,21 @@ ACTION.Function = function ()
|
||||||
error(string.format("\"%s\" doesn't seem to be an existing directory", libDir))
|
error(string.format("\"%s\" doesn't seem to be an existing directory", libDir))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local archEnabled = {
|
||||||
|
["x64"] = false,
|
||||||
|
["x86"] = false
|
||||||
|
}
|
||||||
|
|
||||||
|
for k,v in pairs(os.matchdirs(libDir .. "*")) do
|
||||||
|
local arch = path.getname(v)
|
||||||
|
if (archEnabled[arch] ~= nil) then
|
||||||
|
archEnabled[arch] = true
|
||||||
|
print(arch .. " arch found")
|
||||||
|
else
|
||||||
|
print("Unknown directory " .. v .. " found, ignored")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local packageDir = "../package/"
|
local packageDir = "../package/"
|
||||||
|
|
||||||
local copyTargets = {
|
local copyTargets = {
|
||||||
|
|
@ -63,28 +78,48 @@ ACTION.Function = function ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (os.is("windows")) then
|
local binFileMasks
|
||||||
|
local libFileMasks
|
||||||
|
if (os.is("windows")) then
|
||||||
|
binFileMasks = {"**.dll"}
|
||||||
|
libFileMasks = {"**.lib", "**.a"}
|
||||||
|
elseif (os.is("macosx")) then
|
||||||
|
binFileMasks = {"**.dynlib"}
|
||||||
|
libFileMasks = {"**.a"}
|
||||||
|
else
|
||||||
|
binFileMasks = {"**.so"}
|
||||||
|
libFileMasks = {"**.a"}
|
||||||
|
end
|
||||||
|
|
||||||
|
for arch, enabled in pairs(archEnabled) do
|
||||||
|
local archLibSrc = libDir .. arch .. "/"
|
||||||
|
local arch3rdPartyBinSrc = "../extlibs/lib/common/" .. arch .. "/"
|
||||||
|
local archBinDst = "bin/" .. arch .. "/"
|
||||||
|
local archLibDst = "lib/" .. arch .. "/"
|
||||||
|
|
||||||
-- Engine/SDK binaries
|
-- Engine/SDK binaries
|
||||||
table.insert(copyTargets, {
|
table.insert(copyTargets, {
|
||||||
Masks = {"**.dll"},
|
Masks = binFileMasks,
|
||||||
Source = libDir,
|
Source = archLibSrc,
|
||||||
Target = "bin/"
|
Target = archBinDst
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Engine/SDK libraries
|
-- Engine/SDK libraries
|
||||||
table.insert(copyTargets, {
|
table.insert(copyTargets, {
|
||||||
Masks = {"**.lib"},
|
Masks = libFileMasks,
|
||||||
Source = libDir,
|
Source = archLibSrc,
|
||||||
Target = "lib/"
|
Target = archLibDst
|
||||||
})
|
})
|
||||||
|
|
||||||
-- 3rd party binary dep
|
-- 3rd party binary dep
|
||||||
table.insert(copyTargets, {
|
table.insert(copyTargets, {
|
||||||
Masks = {"**.dll"},
|
Masks = binFileMasks,
|
||||||
Source = "../extlibs/lib/common/",
|
Source = arch3rdPartyBinSrc,
|
||||||
Target = "bin/"
|
Target = archBinDst
|
||||||
})
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
if (os.is("windows")) then
|
||||||
-- Demo executable (Windows)
|
-- Demo executable (Windows)
|
||||||
table.insert(copyTargets, {
|
table.insert(copyTargets, {
|
||||||
Masks = {"Demo*.exe"},
|
Masks = {"Demo*.exe"},
|
||||||
|
|
@ -98,29 +133,7 @@ ACTION.Function = function ()
|
||||||
Source = "../tests/",
|
Source = "../tests/",
|
||||||
Target = "tests/"
|
Target = "tests/"
|
||||||
})
|
})
|
||||||
|
|
||||||
elseif (os.is("macosx")) then
|
elseif (os.is("macosx")) then
|
||||||
-- Engine/SDK binaries
|
|
||||||
table.insert(copyTargets, {
|
|
||||||
Masks = {"**.dynlib"},
|
|
||||||
Source = libDir,
|
|
||||||
Target = "bin/"
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Engine/SDK libraries
|
|
||||||
table.insert(copyTargets, {
|
|
||||||
Masks = {"**.a"},
|
|
||||||
Source = libDir,
|
|
||||||
Target = "lib/"
|
|
||||||
})
|
|
||||||
|
|
||||||
-- 3rd party binary dep
|
|
||||||
table.insert(copyTargets, {
|
|
||||||
Masks = {"**.dynlib"},
|
|
||||||
Source = "../extlibs/lib/common/",
|
|
||||||
Target = "bin/"
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Demo executable (OS X)
|
-- Demo executable (OS X)
|
||||||
table.insert(copyTargets, {
|
table.insert(copyTargets, {
|
||||||
Masks = {"Demo*"},
|
Masks = {"Demo*"},
|
||||||
|
|
@ -136,29 +149,7 @@ ACTION.Function = function ()
|
||||||
Source = "../tests/",
|
Source = "../tests/",
|
||||||
Target = "tests/"
|
Target = "tests/"
|
||||||
})
|
})
|
||||||
|
|
||||||
else
|
else
|
||||||
-- Engine/SDK binaries
|
|
||||||
table.insert(copyTargets, {
|
|
||||||
Masks = {"**.so"},
|
|
||||||
Source = libDir,
|
|
||||||
Target = "bin/"
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Engine/SDK libraries
|
|
||||||
table.insert(copyTargets, {
|
|
||||||
Masks = {"**.a"},
|
|
||||||
Source = libDir,
|
|
||||||
Target = "lib/"
|
|
||||||
})
|
|
||||||
|
|
||||||
-- 3rd party binary dep
|
|
||||||
table.insert(copyTargets, {
|
|
||||||
Masks = {"**.so"},
|
|
||||||
Source = "../extlibs/lib/common/",
|
|
||||||
Target = "bin/"
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Demo executable (Linux)
|
-- Demo executable (Linux)
|
||||||
table.insert(copyTargets, {
|
table.insert(copyTargets, {
|
||||||
Masks = {"Demo*"},
|
Masks = {"Demo*"},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue