From 3cc3158ba9bb4a75ab600876efa538de851bdaee Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 28 May 2024 00:47:17 +0800 Subject: add wix to xmake installer --- core/xpack.lua | 9 +++++++-- tests/plugins/pack/xmake.lua | 6 +++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/core/xpack.lua b/core/xpack.lua index 4262ef1b5..1a204e6b6 100644 --- a/core/xpack.lua +++ b/core/xpack.lua @@ -5,7 +5,7 @@ xpack("xmake") set_copyright("Copyright (C) 2015-present, TBOOX Open Source Group") set_author("waruqi@gmail.com") set_licensefile("../LICENSE.md") - set_formats("nsis", "zip") + set_formats("nsis", "wix", "zip") add_targets("demo") set_bindir(".") set_iconfile("src/demo/xmake.ico") @@ -33,7 +33,7 @@ xpack("xmake") import("utils.archive") import("core.base.global") local format = package:format() - if package:is_plat("windows") and (format == "nsis" or format == "zip") then + if package:is_plat("windows") and (format == "nsis" or format == "wix" or format == "zip") then local winenv = path.join(os.programdir(), "winenv") if os.isdir(winenv) then package:add("installfiles", path.join(winenv, "**"), {rootdir = path.directory(winenv)}) @@ -69,6 +69,11 @@ xpack_component("LongPath") ; Enable long path WriteRegDWORD ${HKLM} "SYSTEM\CurrentControlSet\Control\FileSystem" "LongPathsEnabled" 1 ${EndIf}]]) + batchcmds:rawcmd("wix", [[ + + + + ]]) end) xpack("xmakesrc") diff --git a/tests/plugins/pack/xmake.lua b/tests/plugins/pack/xmake.lua index 2506d2fc4..437ae8a37 100644 --- a/tests/plugins/pack/xmake.lua +++ b/tests/plugins/pack/xmake.lua @@ -62,9 +62,9 @@ xpack_component("LongPath") set_description("Increases the maximum path length limit, up to 32,767 characters (before 256).") on_installcmd(function (component, batchcmds) batchcmds:rawcmd("wix", [[ - - - + + + ]]) batchcmds:rawcmd("nsis", [[ ${If} $NoAdmin == "false" -- cgit v1.3.1