summaryrefslogtreecommitdiff
path: root/tests/plugins
diff options
context:
space:
mode:
authorruki <[email protected]>2023-11-15 23:39:08 +0800
committerruki <[email protected]>2023-11-15 23:39:08 +0800
commit355df6fd41db138b340dee56248f8c3fe0dcc75f (patch)
treecb65f33b54de72ad3e275060437dd10c37c6ae98 /tests/plugins
parent3e5f3c41e0eebf9103118b5127a0b78f5df6873f (diff)
add nsis sections
Diffstat (limited to 'tests/plugins')
-rw-r--r--tests/plugins/pack/xmake.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/plugins/pack/xmake.lua b/tests/plugins/pack/xmake.lua
index 94ad97409..f964d58bc 100644
--- a/tests/plugins/pack/xmake.lua
+++ b/tests/plugins/pack/xmake.lua
@@ -26,12 +26,20 @@ xpack("test")
set_basename("test-$(plat)-$(arch)-v$(version)")
add_installfiles("src/(assets/*.png)", {prefixdir = "images"})
set_iconfile("src/assets/xmake.ico")
+
after_installcmd(function (package, batchcmds)
batchcmds:cp("src/assets/*.txt", "resources/", {rootdir = "src"})
batchcmds:mkdir("stub")
end)
+
after_uninstallcmd(function (package, batchcmds)
batchcmds:rmdir("resources")
batchcmds:rmdir("stub")
end)
+ add_nsis_sections("Enable Long Path", [[
+ ${If} $NoAdmin == "false"
+ ; Enable long path
+ WriteRegDWORD ${HKLM} "SYSTEM\CurrentControlSet\Control\FileSystem" "LongPathsEnabled" 1
+ ${EndIf}]], {description = "Increases the maximum path length limit, up to 32,767 characters (before 256)."})
+