Package: Fix resource copy on Linux
This commit is contained in:
parent
be8cc08ba9
commit
52033c8697
|
|
@ -84,13 +84,13 @@ ACTION.Function = function ()
|
||||||
local libFileMasks
|
local libFileMasks
|
||||||
local exeFileExt
|
local exeFileExt
|
||||||
local exeFilterFunc
|
local exeFilterFunc
|
||||||
if (os.is("windows")) then
|
if (os.ishost("windows")) then
|
||||||
binFileMasks = {"**.dll", "**.pdb"}
|
binFileMasks = {"**.dll", "**.pdb"}
|
||||||
libFileMasks = {"**.lib", "**.a"}
|
libFileMasks = {"**.lib", "**.a"}
|
||||||
exeFileExt = ".exe"
|
exeFileExt = ".exe"
|
||||||
exeFilterFunc = function (filePath) return true end
|
exeFilterFunc = function (filePath) return true end
|
||||||
else
|
else
|
||||||
if (os.is("macosx")) then
|
if (os.ishost("macosx")) then
|
||||||
binFileMasks = {"**.dynlib"}
|
binFileMasks = {"**.dynlib"}
|
||||||
else
|
else
|
||||||
binFileMasks = {"**.so"}
|
binFileMasks = {"**.so"}
|
||||||
|
|
@ -183,14 +183,7 @@ ACTION.Function = function ()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local ok, err
|
local ok, err = os.copyfile(v, targetPath)
|
||||||
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 space are presents in source/destination paths.
|
|
||||||
ok, err = os.copyfile(string.format("\"%s\"", v), string.format("\"%s\"", targetPath))
|
|
||||||
end
|
|
||||||
|
|
||||||
if (not ok) then
|
if (not ok) then
|
||||||
print("Failed to copy \"" .. v .. "\" to \"" .. targetPath .. "\": " .. err)
|
print("Failed to copy \"" .. v .. "\" to \"" .. targetPath .. "\": " .. err)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue