aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <waruqi@gmail.com>2019-07-16 22:33:19 +0800
committerruki <waruqi@gmail.com>2019-07-16 09:19:57 +0800
commit66c9fa90a988edb47b4f65092173e5fc90e59943 (patch)
tree85609627944b87213e21f9f5d0cd025b71279049
parentd82d0f8b20be535c65d0087bd3abf7f2561853b2 (diff)
downloadxmake-docs-66c9fa90a988edb47b4f65092173e5fc90e59943.tar.gz
xmake-docs-66c9fa90a988edb47b4f65092173e5fc90e59943.zip
update plugin docs
-rw-r--r--assets/img/manual/qt_vs.pngbin0 -> 193798 bytes
-rw-r--r--plugin/builtin_plugins.md18
-rw-r--r--zh-cn/plugin/builtin_plugins.md22
3 files changed, 37 insertions, 3 deletions
diff --git a/assets/img/manual/qt_vs.png b/assets/img/manual/qt_vs.png
new file mode 100644
index 00000000..587fba29
--- /dev/null
+++ b/assets/img/manual/qt_vs.png
Binary files differ
diff --git a/plugin/builtin_plugins.md b/plugin/builtin_plugins.md
index 500fd683..9ef9cee6 100644
--- a/plugin/builtin_plugins.md
+++ b/plugin/builtin_plugins.md
@@ -348,6 +348,24 @@ Please see [JSONCompilationDatabase](#https://clang.llvm.org/docs/JSONCompilatio
### Generate VisualStudio Project
+#### Compile with xmake integration
+
+v2.2.8 or later, provides a new version of the vs project generation plugin extension, which is very different from the previous plugin processing mode for generating vs. The previously generated vs project is the compilation of all files and then transferred to vs. To handle compilation.
+
+But this mode, there is no way to support the rules of xmake. Because xmake's rules use a lot of custom scripts like `on_build`, they can't be expanded, so projects like qt, wdk can't support exporting to vs. compile.
+
+Therefore, in order to solve this problem, the new version of the vs. build plugin performs the compile operation by directly calling the xmake command under vs, and also supports intellsence and definition jumps, as well as breakpoint debugging.
+
+The specific use is similar to the old version:
+
+```console
+$ xmake project -k [vsxmake2010|vsxmake2013|vsxmake2015|..] -m "debug,release"
+```
+
+![](/static/img/manual/qt_vs.png)
+
+#### Using vs built-in compilation mechanism
+
```bash
$ xmake project -k [vs2008|vs2013|vs2015|..]
```
diff --git a/zh-cn/plugin/builtin_plugins.md b/zh-cn/plugin/builtin_plugins.md
index 5553b84a..5e334ec9 100644
--- a/zh-cn/plugin/builtin_plugins.md
+++ b/zh-cn/plugin/builtin_plugins.md
@@ -378,6 +378,24 @@ $ xmake project -k compile_commands
### 生成VisualStudio工程
+#### 使用xmake集成编译
+
+v2.2.8以上版本,提供了新版本的vs工程生成插件扩展,跟之前的生成vs的插件处理模式上有很大的不同,之前生成的vs工程是吧所有文件的编译展开后,转交给vs来处理编译。
+
+但是这种模式,对xmake的rules是没法支持的。因为xmake的rules里面用了很多的`on_build`此类自定义脚本,无法展开,所以像qt, wdk此类的项目就没法支持导出到vs里面进行编译了。
+
+因此,为了解决这个问题,新版本的vs生成插件通过在vs下直接调用xmake命令,去执行编译操作,并且对intellsence和定义跳转,还有断点调试也做了支持。
+
+具体使用方式跟老版本类似:
+
+```console
+$ xmake project -k [vsxmake2010|vsxmake2013|vsxmake2015|..] -m "debug,release"
+```
+
+![](/static/img/manual/qt_vs.png)
+
+#### 使用vs内置编译机制
+
```console
$ xmake project -k [vs2008|vs2013|vs2015|..]
```
@@ -394,11 +412,9 @@ $ xmake project -k vs2017 -m "debug,release"
```lua
-- 配置当前的工程,支持哪些编译模式
-set_modes("debug", "release")
+add_rules("mode.debug", "mode.release")
```
-具体`set_modes`的使用,可以参考对应的接口手册文档。
-
## 生成doxygen文档
请先确保本机已安装`doxygen`工具,然后在工程目录下运行: