diff options
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)") |
