summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2017-02-07 22:44:13 +0800
committerruki <[email protected]>2017-02-07 22:44:13 +0800
commit1ca683215e8dd97c3d5ad3861d61021f8acd52a1 (patch)
tree864af344151fde77892b77cfad43334b46cf5da4
parent81c6967e2c1b0466889375a374ab9282e7a20aa7 (diff)
add set_xmakever docs
-rw-r--r--CHANGELOG.md10
-rwxr-xr-xdocs/zh/manual.md16
2 files changed, 22 insertions, 4 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e40fabcb0..13d9d8062 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,8 +6,9 @@
* Add `--links`, `--linkdirs` and `--includedirs` configure arguments
* Add app2ipa plugin
-* Add dictionary syntax style for xmake.lua
-* Provide smart scanning and building mode without xmake.lua
+* Add dictionary syntax style for `xmake.lua`
+* Provide smart scanning and building mode without `xmake.lua`
+* Add `set_xmakever` interface for `xmake.lua`
### Changes
@@ -196,8 +197,9 @@
* 添加`--links`, `--linkdirs` and `--includedirs` 配置参数
* 添加app2ipa插件
-* 为xmake.lua工程描述增加dictionay语法风格
-* 提供智能扫描编译模式,在无任何xmake.lua等工程描述文件的情况下,也能直接快速编译
+* 为`xmake.lua`工程描述增加dictionay语法风格
+* 提供智能扫描编译模式,在无任何`xmake.lua`等工程描述文件的情况下,也能直接快速编译
+* 为`xmake.lua`工程描述添加`set_xmakever`接口,更加友好的处理版本兼容性问题
### 改进
diff --git a/docs/zh/manual.md b/docs/zh/manual.md
index 45311f530..7d0dbcc37 100755
--- a/docs/zh/manual.md
+++ b/docs/zh/manual.md
@@ -227,6 +227,7 @@ end
| ------------------------------------- | ----------------------------- |
| [set_project](#set_project) | 设置工程名 |
| [set_version](#set_version) | 设置工程版本 |
+| [set_xmakever](#set_xmakever) | 设置最小xmake版本 |
| [add_subdirs](#add_subdirs) | 添加子工程目录 |
| [add_subfiles](#add_subfiles) | 添加子工程文件 |
| [add_plugindirs](#add_plugindirs) | 添加插件目录 |
@@ -267,6 +268,21 @@ set_version("1.5.1")
#define TB_CONFIG_VERSION_BUILD 201510220917
```
+##### set_xmakever
+
+###### 设置最小xmake版本
+
+用于处理xmake版本兼容性问题,如果项目的`xmake.lua`,通过这个接口设置了最小xmake版本支持,那么用户环境装的xmake低于要求的版本,就会提示错误。
+
+一般情况下,建议默认对其进行设置,这样对用户比较友好,如果`xmake.lua`中用到了高版本的api接口,用户那边至少可以知道是否因为版本不对导致的构建失败。
+
+设置如下:
+
+```lua
+-- 设置最小版本为:2.1.0,低于此版本的xmake编译此工程将会提示版本错误信息
+set_xmakever("2.1.0")
+```
+
##### add_subdirs
###### 添加子工程目录