summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-05-28 00:47:17 +0800
committerruki <[email protected]>2024-05-28 00:47:17 +0800
commit3cc3158ba9bb4a75ab600876efa538de851bdaee (patch)
tree84485fdf83b684f5c74181f908f83a1505779f7c
parent5418438129181e769244553cde207082baf85077 (diff)
add wix to xmake installer
-rw-r--r--core/xpack.lua9
-rw-r--r--tests/plugins/pack/xmake.lua6
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("[email protected]")
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", [[
+ <RegistryKey Root="HKLM" Key="SYSTEM\CurrentControlSet\Control\FileSystem">
+ <RegistryValue Type="integer" Name="LongPathsEnabled" Value="1" KeyPath="yes"/>
+ </RegistryKey>
+ ]])
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", [[
- <RegistryKey Root="HKLM" Key="SYSTEM\CurrentControlSet\Control\FileSystem">
- <RegistryValue Type="integer" Name="LongPathsEnabled" Value="1" KeyPath="yes"/>
- </RegistryKey>
+ <RegistryKey Root="HKLM" Key="SYSTEM\CurrentControlSet\Control\FileSystem">
+ <RegistryValue Type="integer" Name="LongPathsEnabled" Value="1" KeyPath="yes"/>
+ </RegistryKey>
]])
batchcmds:rawcmd("nsis", [[
${If} $NoAdmin == "false"