Build: Fix package on Linux/OS X
Former-commit-id: af859279daff0a3277885a129dbe0a3b64b670ee [formerly 9b5c746de0092b15a3a6b22e7b62c0d786511f74] [formerly c0deb3f2282e65eced2a847bfe96fade40000e0d [formerly 778655003cf7af0d129e08cf1241c0e7062cbc02]] Former-commit-id: 1c43974f748ac73fb001ed826e33e6d65fa6be5a [formerly 860aaa09c8659b40712ecfbde1503098cb18d26f] Former-commit-id: e13892bcca0dac59917554a6236ff53015c7cb2c
This commit is contained in:
parent
bd0c99c687
commit
7849eaf80f
|
|
@ -124,7 +124,7 @@ ACTION.Function = function ()
|
|||
-- Demo executable (OS X)
|
||||
table.insert(copyTargets, {
|
||||
Masks = {"Demo*"},
|
||||
Filter = function (path) return path.getextension(path) == "" end,
|
||||
Filter = function (filePath) return path.getextension(filePath) == "" end,
|
||||
Source = "../examples/bin/",
|
||||
Target = "examples/bin/"
|
||||
})
|
||||
|
|
@ -132,7 +132,7 @@ ACTION.Function = function ()
|
|||
-- Unit test (OS X)
|
||||
table.insert(copyTargets, {
|
||||
Masks = {"*.*"},
|
||||
Filter = function (path) return path.getextension(path) == "" end,
|
||||
Filter = function (filePath) return path.getextension(filePath) == "" end,
|
||||
Source = "../tests/",
|
||||
Target = "tests/"
|
||||
})
|
||||
|
|
@ -162,7 +162,7 @@ ACTION.Function = function ()
|
|||
-- Demo executable (Linux)
|
||||
table.insert(copyTargets, {
|
||||
Masks = {"Demo*"},
|
||||
Filter = function (path) return path.getextension(path) == "" end,
|
||||
Filter = function (filePath) return path.getextension(filePath) == "" end,
|
||||
Source = "../examples/bin/",
|
||||
Target = "examples/bin/"
|
||||
})
|
||||
|
|
@ -170,7 +170,7 @@ ACTION.Function = function ()
|
|||
-- Unit test (Linux)
|
||||
table.insert(copyTargets, {
|
||||
Masks = {"*.*"},
|
||||
Filter = function (path) return path.getextension(path) == "" end,
|
||||
Filter = function (filePath) return path.getextension(filePath) == "" end,
|
||||
Source = "../tests/",
|
||||
Target = "tests/"
|
||||
})
|
||||
|
|
@ -191,7 +191,7 @@ ACTION.Function = function ()
|
|||
local files = os.matchfiles(includePrefix .. mask)
|
||||
if (v.Filter) then
|
||||
for k,path in pairs(files) do
|
||||
if (not v.Filter(v)) then
|
||||
if (not v.Filter(path)) then
|
||||
files[k] = nil
|
||||
end
|
||||
end
|
||||
|
|
@ -213,7 +213,14 @@ ACTION.Function = function ()
|
|||
end
|
||||
end
|
||||
|
||||
local ok, err = os.copyfile(v, targetPath)
|
||||
local ok, err
|
||||
if (os.is("windows")) then
|
||||
ok, err = os.copyfile(v, targetPath)
|
||||
else
|
||||
-- Workaround: As premake is translating this to "cp %s %s", it fails if there are space in the paths.
|
||||
ok, err = os.copyfile(string.format("\"%s\"", v), string.format("\"%s\"", targetPath))
|
||||
end
|
||||
|
||||
if (not ok) then
|
||||
print("Failed to copy \"" .. v .. "\" to \"" .. targetPath .. "\": " .. err)
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue