diff options
| author | ruki <[email protected]> | 2023-11-14 23:29:37 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-11-14 23:29:37 +0800 |
| commit | 4e42868246bbdc59197e048f5d2d001fae23266b (patch) | |
| tree | dadf7ca7a3c774656b32a52ba3bded43b80f9618 /xmake/plugins | |
| parent | aa38c3aa417f60f1015446ac4254cae3fa1e16be (diff) | |
install target files in nsis
Diffstat (limited to 'xmake/plugins')
| -rw-r--r-- | xmake/plugins/pack/nsis/main.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/xmake/plugins/pack/nsis/main.lua b/xmake/plugins/pack/nsis/main.lua index 15afe9881..1eb11bd0c 100644 --- a/xmake/plugins/pack/nsis/main.lua +++ b/xmake/plugins/pack/nsis/main.lua @@ -119,6 +119,12 @@ function _get_installcmds(package) for idx, srcfile in ipairs(srcfiles) do batchcmds_:cp(srcfile, dstfiles[idx]) end + for _, target in ipairs(package:targets()) do + srcfiles, dstfiles = target:installfiles(".") + for idx, srcfile in ipairs(srcfiles) do + batchcmds_:cp(srcfile, dstfiles[idx]) + end + end -- get custom install commands local script = package:script("installcmd") @@ -141,6 +147,12 @@ function _get_uninstallcmds(package) for _, dstfile in ipairs(dstfiles) do batchcmds_:rm(dstfile) end + for _, target in ipairs(package:targets()) do + local _, dstfiles = target:installfiles(".") + for _, dstfile in ipairs(dstfiles) do + batchcmds_:rm(dstfile) + end + end -- get custom uninstall commands local script = package:script("uninstallcmd") |
