Skip to content

Commit 3cc3158

Browse files
committed
add wix to xmake installer
1 parent 5418438 commit 3cc3158

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

core/xpack.lua

+7-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ xpack("xmake")
55
set_copyright("Copyright (C) 2015-present, TBOOX Open Source Group")
66
set_author("[email protected]")
77
set_licensefile("../LICENSE.md")
8-
set_formats("nsis", "zip")
8+
set_formats("nsis", "wix", "zip")
99
add_targets("demo")
1010
set_bindir(".")
1111
set_iconfile("src/demo/xmake.ico")
@@ -33,7 +33,7 @@ xpack("xmake")
3333
import("utils.archive")
3434
import("core.base.global")
3535
local format = package:format()
36-
if package:is_plat("windows") and (format == "nsis" or format == "zip") then
36+
if package:is_plat("windows") and (format == "nsis" or format == "wix" or format == "zip") then
3737
local winenv = path.join(os.programdir(), "winenv")
3838
if os.isdir(winenv) then
3939
package:add("installfiles", path.join(winenv, "**"), {rootdir = path.directory(winenv)})
@@ -69,6 +69,11 @@ xpack_component("LongPath")
6969
; Enable long path
7070
WriteRegDWORD ${HKLM} "SYSTEM\CurrentControlSet\Control\FileSystem" "LongPathsEnabled" 1
7171
${EndIf}]])
72+
batchcmds:rawcmd("wix", [[
73+
<RegistryKey Root="HKLM" Key="SYSTEM\CurrentControlSet\Control\FileSystem">
74+
<RegistryValue Type="integer" Name="LongPathsEnabled" Value="1" KeyPath="yes"/>
75+
</RegistryKey>
76+
]])
7277
end)
7378

7479
xpack("xmakesrc")

tests/plugins/pack/xmake.lua

+3-3
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ xpack_component("LongPath")
6262
set_description("Increases the maximum path length limit, up to 32,767 characters (before 256).")
6363
on_installcmd(function (component, batchcmds)
6464
batchcmds:rawcmd("wix", [[
65-
<RegistryKey Root="HKLM" Key="SYSTEM\CurrentControlSet\Control\FileSystem">
66-
<RegistryValue Type="integer" Name="LongPathsEnabled" Value="1" KeyPath="yes"/>
67-
</RegistryKey>
65+
<RegistryKey Root="HKLM" Key="SYSTEM\CurrentControlSet\Control\FileSystem">
66+
<RegistryValue Type="integer" Name="LongPathsEnabled" Value="1" KeyPath="yes"/>
67+
</RegistryKey>
6868
]])
6969
batchcmds:rawcmd("nsis", [[
7070
${If} $NoAdmin == "false"

0 commit comments

Comments
 (0)