diff options
| author | ruki <[email protected]> | 2023-11-22 23:02:16 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-11-22 23:02:16 +0800 |
| commit | 0415ab4d9b7ba347aed638422a7b40885da2943e (patch) | |
| tree | 8428042084067b0b5821eae298466413611da4b9 /core/xpack.lua | |
| parent | 3cf88c4347b0605396b3d5c75f0b34a1c67128ab (diff) | |
enable long path for xmake/xpack
Diffstat (limited to 'core/xpack.lua')
| -rw-r--r-- | core/xpack.lua | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/core/xpack.lua b/core/xpack.lua index 18b7073d0..c81509da0 100644 --- a/core/xpack.lua +++ b/core/xpack.lua @@ -1,6 +1,6 @@ xpack("xmake") set_homepage("https://xmake.io") --- set_title("Xmake build utility ($(arch))") + set_title("Xmake build utility ($(arch))") set_description("A cross-platform build utility based on Lua.") set_copyright("Copyright (C) 2015-present, TBOOX Open Source Group") set_licensefile("../LICENSE.md") @@ -9,6 +9,8 @@ xpack("xmake") set_bindir(".") set_iconfile("src/demo/xmake.ico") + add_components("LongPath") + on_load(function (package) local arch = package:arch() if package:is_plat("windows") then @@ -63,6 +65,17 @@ xpack("xmake") end end) +xpack_component("LongPath") + set_title("Enable Long Path") + set_description("Increases the maximum path length limit, up to 32,767 characters (before 256).") + on_installcmd(function (component, batchcmds) + batchcmds:rawcmd("nsis", [[ + ${If} $NoAdmin == "false" + ; Enable long path + WriteRegDWORD ${HKLM} "SYSTEM\CurrentControlSet\Control\FileSystem" "LongPathsEnabled" 1 + ${EndIf}]]) + end) + xpack("xmakesrc") set_formats("src_zip", "src_targz") set_basename("xmake-v$(version)") |
