diff options
| author | ruki <[email protected]> | 2023-11-15 00:30:10 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-11-15 00:30:10 +0800 |
| commit | 6e6b5bb6959d2e0f6b393d881170b3a0eb81fe9d (patch) | |
| tree | 795b558a85bdde95c213d5db101e2a1e972c6651 | |
| parent | 11fc253727573ac7822d42a818056be410b3f266 (diff) | |
add rmdir to vs201x
| -rw-r--r-- | xmake/plugins/pack/nsis/main.lua | 11 | ||||
| -rw-r--r-- | xmake/plugins/project/vstudio/impl/vs201x.lua | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/xmake/plugins/pack/nsis/main.lua b/xmake/plugins/pack/nsis/main.lua index a4365dea3..5acb3c055 100644 --- a/xmake/plugins/pack/nsis/main.lua +++ b/xmake/plugins/pack/nsis/main.lua @@ -116,6 +116,9 @@ function _on_target_installcmd_binary(target, batchcmds_, opt) -- install target file batchcmds_:cp(target:targetfile(), path.join(bindir, target:filename())) + if os.isfile(target:symbolfile()) then + batchcmds_:cp(target:symbolfile(), path.join(bindir, path.filename(target:symbolfile()))) + end end -- on install shared target command @@ -125,6 +128,9 @@ function _on_target_installcmd_shared(target, batchcmds_, opt) -- install target file batchcmds_:cp(target:targetfile(), path.join(bindir, target:filename())) + if os.isfile(target:symbolfile()) then + batchcmds_:cp(target:symbolfile(), path.join(bindir, path.filename(target:symbolfile()))) + end end -- on install static target command @@ -134,6 +140,9 @@ function _on_target_installcmd_static(target, batchcmds_, opt) -- install target file batchcmds_:cp(target:targetfile(), path.join(libdir, target:filename())) + if os.isfile(target:symbolfile()) then + batchcmds_:cp(target:symbolfile(), path.join(libdir, path.filename(target:symbolfile()))) + end end -- on install headeronly target command @@ -171,6 +180,8 @@ function _on_target_uninstallcmd_binary(target, batchcmds_, opt) -- uninstall target file batchcmds_:rm(path.join(bindir, target:filename())) + + -- TODO: tryrm symbolfile end -- on uninstall shared target command diff --git a/xmake/plugins/project/vstudio/impl/vs201x.lua b/xmake/plugins/project/vstudio/impl/vs201x.lua index 3b6f145f4..a8b48dada 100644 --- a/xmake/plugins/project/vstudio/impl/vs201x.lua +++ b/xmake/plugins/project/vstudio/impl/vs201x.lua @@ -102,6 +102,8 @@ function _get_command_string(cmd, vcxprojdir) return string.format("copy /Y \"%s\" \"%s\"", _translate_path(cmd.srcpath, vcxprojdir), _translate_path(cmd.dstpath, vcxprojdir)) elseif kind == "rm" then return string.format("del /F /Q \"%s\" || rmdir /S /Q \"%s\"", _translate_path(cmd.filepath, vcxprojdir), _translate_path(cmd.filepath, vcxprojdir)) + elseif kind == "rmdir" then + return string.format("rmdir /S /Q \"%s\"", _translate_path(cmd.filepath, vcxprojdir)) elseif kind == "mv" then return string.format("rename \"%s\" \"%s\"", _translate_path(cmd.srcpath, vcxprojdir), _translate_path(cmd.dstpath, vcxprojdir)) elseif kind == "cd" then |
