diff options
| author | ruki <[email protected]> | 2020-12-12 22:28:24 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-12-12 22:28:24 +0800 |
| commit | cba3c243091aef9ed81bdc429ee4958a81a31122 (patch) | |
| tree | 86e6177329c56df2937fb0ed64f032c8af27f08d | |
| parent | 82d2af8609752533b9d13b39e3e09616e4cea4c4 (diff) | |
improve autoupdate
| -rw-r--r-- | xmake/rules/plugin/vsxmake/xmake.lua | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/xmake/rules/plugin/vsxmake/xmake.lua b/xmake/rules/plugin/vsxmake/xmake.lua index 03f6a2779..f981e7071 100644 --- a/xmake/rules/plugin/vsxmake/xmake.lua +++ b/xmake/rules/plugin/vsxmake/xmake.lua @@ -29,16 +29,19 @@ -- rule("plugin.vsxmake.autoupdate") before_build(function (target) - import("core.project.depend") - import("core.project.project") - if os.getenv("XMAKE_IN_VSTUDIO") then - depend.on_changed(function () - print("autoupdate vsxmake project ..") - project.unlock() - os.execv("xmake", {"project", "-k", "vsxmake"}) - project.lock() - print("autoupdate vsxmake project ok") - end, {files = project.allfiles()}) + if not _g.autoupdate then + import("core.project.depend") + import("core.project.project") + if os.getenv("XMAKE_IN_VSTUDIO") then + depend.on_changed(function () + print("autoupdate vsxmake project ..") + project.unlock() + os.execv("xmake", {"project", "-k", "vsxmake"}) + project.lock() + print("autoupdate vsxmake project ok") + end, {files = project.allfiles()}) + end + _g.autoupdate = true end end) |
