diff options
| author | ruki <[email protected]> | 2023-11-16 23:36:15 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-11-16 23:36:15 +0800 |
| commit | d0f5f984219c480112a941d9de520254a844757a (patch) | |
| tree | 00095948c674cd339c6b40cba691f9218d14b6f5 /core/xpack.lua | |
| parent | 2013ee491dbc719aa674d4d8be5d40a2408b5213 (diff) | |
install winenv
Diffstat (limited to 'core/xpack.lua')
| -rw-r--r-- | core/xpack.lua | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/core/xpack.lua b/core/xpack.lua index 6da1680a4..c41220dc2 100644 --- a/core/xpack.lua +++ b/core/xpack.lua @@ -18,6 +18,20 @@ xpack("xmake") package:set("basename", "xmake-v$(version)." .. arch) end) + before_package(function (package) + import("net.http") + import("utils.archive") + local format = package:format() + if package:is_plat("windows") and (format == "nsis" or format == "zip") then + local winenv = path.join(os.programdir(), "winenv") + if os.isdir(winenv) then + package:add("installfiles", path.join(winenv, "**"), {rootdir = path.directory(winenv)}) + else + -- TODO download + end + end + end) + add_nsis_installcmds("Enable Long Path", [[ ${If} $NoAdmin == "false" ; Enable long path |
