From 52033c8697ad7298f6ee765158ac1f9c857f901d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Leclercq?= Date: Fri, 6 Oct 2017 15:03:03 +0200 Subject: [PATCH] Package: Fix resource copy on Linux --- build/scripts/actions/package.lua | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/build/scripts/actions/package.lua b/build/scripts/actions/package.lua index 0797d5441..f1ddb5087 100644 --- a/build/scripts/actions/package.lua +++ b/build/scripts/actions/package.lua @@ -84,13 +84,13 @@ ACTION.Function = function () local libFileMasks local exeFileExt local exeFilterFunc - if (os.is("windows")) then + if (os.ishost("windows")) then binFileMasks = {"**.dll", "**.pdb"} libFileMasks = {"**.lib", "**.a"} exeFileExt = ".exe" exeFilterFunc = function (filePath) return true end else - if (os.is("macosx")) then + if (os.ishost("macosx")) then binFileMasks = {"**.dynlib"} else binFileMasks = {"**.so"} @@ -183,14 +183,7 @@ ACTION.Function = function () end end - 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 space are presents in source/destination paths. - ok, err = os.copyfile(string.format("\"%s\"", v), string.format("\"%s\"", targetPath)) - end - + local ok, err = os.copyfile(v, targetPath) if (not ok) then print("Failed to copy \"" .. v .. "\" to \"" .. targetPath .. "\": " .. err) end