diff options
| author | ruki <[email protected]> | 2021-11-15 22:52:04 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-11-15 22:52:04 +0800 |
| commit | 6d4d034345f2332b47d8149322fea4237d53978f (patch) | |
| tree | 6eb851d3c8b17f588204c9790f4a8f034bd1ae6f | |
| parent | 0f6b878602f3d8e003b51ff34f9d12e6653129a9 (diff) | |
fix rule
| -rw-r--r-- | xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua b/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua index b7bc9c728..25bfad70a 100644 --- a/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua +++ b/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua @@ -19,6 +19,7 @@ -- -- imports +import("core.project.rule") import("core.project.config") import("core.project.project") import("core.language.language") @@ -376,11 +377,21 @@ function _get_command_string(cmd) local kind = cmd.kind local opt = cmd.opt if cmd.program then + local command = os.args(table.join(cmd.program, cmd.argv)) + if opt and opt.curdir then + command = "cd \"" .. opt.curdir .. "\"\n" .. command + end + return command elseif kind == "cp" then + return string.format("copy /Y \"%s\" \"%s\"", cmd.srcpath, cmd.dstpath) elseif kind == "rm" then + return string.format("del /F /Q \"%s\" || rmdir /S /Q \"%s\"", cmd.filepath, cmd.filepath) elseif kind == "mv" then + return string.format("rename \"%s\" \"%s\"", cmd.srcpath, cmd.dstpath) elseif kind == "cd" then + return string.format("cd \"%s\"", cmd.dir) elseif kind == "mkdir" then + return string.format("mkdir \"%s\"", cmd.dir) elseif kind == "show" then return string.format("echo %s", cmd.showtext) end |
