summaryrefslogtreecommitdiff
path: root/xmake/plugins
diff options
context:
space:
mode:
authorruki <[email protected]>2023-11-17 22:50:34 +0800
committerruki <[email protected]>2023-11-17 22:50:34 +0800
commite0f074c79be1f712d09df9f7b4b32245ba95f1c9 (patch)
tree732f74fe2fd2922f3c95e8542de82cb6ee108f1c /xmake/plugins
parent6a4c1a917ef785489af8cdbed042fdf369f75d75 (diff)
add nsis display name
Diffstat (limited to 'xmake/plugins')
-rw-r--r--xmake/plugins/pack/nsis/main.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/xmake/plugins/pack/nsis/main.lua b/xmake/plugins/pack/nsis/main.lua
index a99370a01..3c4fa3bbd 100644
--- a/xmake/plugins/pack/nsis/main.lua
+++ b/xmake/plugins/pack/nsis/main.lua
@@ -25,6 +25,7 @@ import("lib.detect.find_tool")
import("private.utils.batchcmds")
import("private.action.require.impl.packagenv")
import("private.action.require.impl.install_packages")
+import(".filter")
-- get the makensis
function _get_makensis()
@@ -514,6 +515,15 @@ function _get_uninstallcmds(package)
return _get_commands_string(package, batchcmds_:cmds(), {install = false})
end
+-- get value and filter it
+function _get_filter_value(package, name)
+ local value = package:get(name)
+ if type(value) == "string" then
+ value = filter.handle(value, package)
+ end
+ return value
+end
+
-- get specvars
function _get_specvars(package)
local specvars = table.clone(package:specvars())
@@ -526,6 +536,7 @@ function _get_specvars(package)
specvars.PACKAGE_UNINSTALLCMDS = function ()
return _get_uninstallcmds(package)
end
+ specvars.PACKAGE_NSIS_DISPLAY_NAME = _get_filter_value(package, "nsis_displayname") or package:name()
specvars.PACKAGE_NSIS_INSTALL_SECTIONS = function ()
local result = {}
local cmds = package:get("nsis_installcmds")