summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjinke18 <[email protected]>2024-07-30 21:02:13 +0800
committerjinke18 <[email protected]>2024-07-30 21:02:13 +0800
commitf469fe804aa5d3cbf89cd531c458b769913f4b92 (patch)
tree5c2d87b7de2ee7700fb08e91792957387bee2054
parentfce49a0940ba7b950d37b5d0ad1217614c6e2bd5 (diff)
fixbug:nsis pack only support ascii path without blank space
-rw-r--r--xmake/plugins/pack/nsis/main.lua10
1 files changed, 7 insertions, 3 deletions
diff --git a/xmake/plugins/pack/nsis/main.lua b/xmake/plugins/pack/nsis/main.lua
index ac6d008b7..a22c1a071 100644
--- a/xmake/plugins/pack/nsis/main.lua
+++ b/xmake/plugins/pack/nsis/main.lua
@@ -113,7 +113,7 @@ function _get_command_strings(package, cmd, opt)
local dstname = path.filename(dstfile)
local dstdir = path.normalize(path.directory(dstfile))
table.insert(result, string.format("SetOutPath \"%s\"", dstdir))
- table.insert(result, string.format("File /oname=%s \"%s\"", dstname, srcfile))
+ table.insert(result, string.format("File \"/oname=%s\" \"%s\"", dstname, srcfile))
end
elseif kind == "rm" then
local filepath = _translate_filepath(package, cmd.filepath)
@@ -268,7 +268,9 @@ function _pack_nsis(makensis, package)
local specvars_values = {}
io.gsub(specfile, "(" .. pattern .. ")", function(_, name)
table.insert(specvars_names, name)
- end)
+ end,
+ {encoding="ansi"}
+ )
for _, name in ipairs(specvars_names) do
name = name:trim()
if specvars_values[name] == nil then
@@ -288,7 +290,9 @@ function _pack_nsis(makensis, package)
io.gsub(specfile, "(" .. pattern .. ")", function(_, name)
name = name:trim()
return specvars_values[name]
- end)
+ end,
+ {encoding="ansi"}
+ )
-- make package
os.vrunv(makensis, {specfile})