diff options
| author | ruki <[email protected]> | 2023-11-16 23:05:56 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-11-16 23:05:56 +0800 |
| commit | 41de52de7a82e4ed8ef7e0b86ebed344e69820ea (patch) | |
| tree | efc47095943cb54e64289d565a2243ea920e1272 /core | |
| parent | d7cac5b8d0cde98ab4979c6e7602042511a27833 (diff) | |
add xpack to xmake/core
Diffstat (limited to 'core')
| -rw-r--r-- | core/xmake.lua | 8 | ||||
| -rw-r--r-- | core/xpack.lua | 26 |
2 files changed, 33 insertions, 1 deletions
diff --git a/core/xmake.lua b/core/xmake.lua index 0c667af7c..a2029cff2 100644 --- a/core/xmake.lua +++ b/core/xmake.lua @@ -5,7 +5,7 @@ set_project("xmake") set_version("2.8.5", {build = "%Y%m%d"}) -- set xmake min version -set_xmakever("2.2.3") +set_xmakever("2.8.5") -- set all warnings as errors set_warnings("all", "error") @@ -111,3 +111,9 @@ end if is_plat("windows") then includes("src/pdcurses") end + +-- add xpack +includes("@builtin/xpack") +if xpack then + includes("xpack.lua") +end diff --git a/core/xpack.lua b/core/xpack.lua new file mode 100644 index 000000000..6da1680a4 --- /dev/null +++ b/core/xpack.lua @@ -0,0 +1,26 @@ +xpack("xmake") + set_formats("nsis") + set_description("A cross-platform build utility based on Lua. https://xmake.io") + set_licensefile("../LICENSE.md") + add_targets("demo") + set_bindir(".") + set_iconfile("src/demo/xmake.ico") + + on_load(function (package) + local arch = package:arch() + if package:is_plat("windows") then + if arch == "x64" then + arch = "win64" + elseif arch == "x86" then + arch = "win32" + end + end + package:set("basename", "xmake-v$(version)." .. arch) + end) + + add_nsis_installcmds("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)."}) + |
