diff options
| author | ruki <[email protected]> | 2023-11-16 23:58:04 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-11-16 23:58:04 +0800 |
| commit | a986e4a3a2ead1ed96973529de357ab7dcc90095 (patch) | |
| tree | 66eefb51191441f04d5d554b124aec147cfc0a5c /xmake/plugins | |
| parent | d0f5f984219c480112a941d9de520254a844757a (diff) | |
prepare package for xmake/nsis
Diffstat (limited to 'xmake/plugins')
| -rw-r--r-- | xmake/plugins/pack/main.lua | 6 | ||||
| -rw-r--r-- | xmake/plugins/pack/nsis/main.lua | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/xmake/plugins/pack/main.lua b/xmake/plugins/pack/main.lua index a0c94f998..7a4ab0fbf 100644 --- a/xmake/plugins/pack/main.lua +++ b/xmake/plugins/pack/main.lua @@ -39,6 +39,12 @@ function _on_package(package) end function _pack_package(package) + + -- ensure build and output directories + os.tryrm(package:buildir()) + os.mkdir(package:outputdir()) + + -- do pack assert(package:formats(), "xpack(%s): formats not found, please use `set_formats()` to set it.", package:name()) local scripts = { package:script("package_before"), diff --git a/xmake/plugins/pack/nsis/main.lua b/xmake/plugins/pack/nsis/main.lua index 23749962a..02d31ac48 100644 --- a/xmake/plugins/pack/nsis/main.lua +++ b/xmake/plugins/pack/nsis/main.lua @@ -606,11 +606,7 @@ function main(package) -- get makensis local makensis, oldenvs = _get_makensis() - -- clean the build directory first - os.tryrm(package:buildir()) - -- pack nsis package - os.mkdir(package:outputdir()) _pack_nsis(makensis.program, package, opt) -- done |
