summaryrefslogtreecommitdiff
path: root/core/xpack.lua
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 /core/xpack.lua
parent5418438129181e769244553cde207082baf85077 (diff)
add wix to xmake installer
Diffstat (limited to 'core/xpack.lua')
-rw-r--r--core/xpack.lua9
1 files changed, 7 insertions, 2 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")