From 82f6bd6ecec423edcd59dde22ae414fc52e78676 Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 28 May 2024 22:21:22 +0800 Subject: fix wix id --- xmake/plugins/pack/wix/main.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xmake/plugins/pack/wix/main.lua b/xmake/plugins/pack/wix/main.lua index e3550a6ab..659075692 100644 --- a/xmake/plugins/pack/wix/main.lua +++ b/xmake/plugins/pack/wix/main.lua @@ -139,13 +139,14 @@ function _get_feature_string(name, title, opt) local allow_advertise = opt.force and "false" or "true" local typical_default = [[TypicalDefault="install"]] local directory = opt.config_dir and [[ConfigurableDirectory="INSTALLFOLDER"]] or "" - local feature = string.format([[]], name:gsub(" ", ""), title, description, level, allow_advertise, allow_absent, typical_default, directory) + local feature = string.format([[]], + name:gsub("[ ()]", ""), title, description, level, allow_advertise, allow_absent, typical_default, directory) return feature end function _get_component_string(id, subdirectory) local subdirectory = (subdirectory ~= "." and subdirectory ~= nil) and string.format([[Subdirectory="%s"]], subdirectory) or "" - return string.format([[]], id:gsub(" ", ""), hash.uuid(id), subdirectory) + return string.format([[]], id:gsub("[ ()]", ""), hash.uuid(id), subdirectory) end -- for each id/guid in the file wix want them to be unique @@ -189,7 +190,7 @@ function _build_feature(package, opt) table.insert(result, "") end - table.insert(result, _get_component_string(name.. "Cmds")) + table.insert(result, _get_component_string(name .. "Cmds")) for _, cmd in ipairs(installcmds) do table.insert(result, _get_other_commands(package, cmd, {install = true})) end -- cgit v1.3.1