Skip to content

Commit

Permalink
fixbug:nsis pack only support ascii path without blank space
Browse files Browse the repository at this point in the history
  • Loading branch information
jinke18 committed Jul 30, 2024
1 parent fce49a0 commit f469fe8
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions xmake/plugins/pack/nsis/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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})
Expand Down

0 comments on commit f469fe8

Please sign in to comment.