summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2018-08-22 22:42:55 +0800
committerruki <[email protected]>2018-08-22 10:17:33 +0800
commit292245939ce68aa6116722dda51b520ef15f7474 (patch)
tree138215e75e217c2edc905c7b3941fdf518cb5d54
parent0681bad37f0b566b3f19072c46d8efdbf7987536 (diff)
modify readme
-rw-r--r--README.md188
-rw-r--r--README_zh.md155
2 files changed, 99 insertions, 244 deletions
diff --git a/README.md b/README.md
index 97570d951..a482b4211 100644
--- a/README.md
+++ b/README.md
@@ -129,11 +129,11 @@ $ xmake
$ xmake f --menu
```
-<img src="http://xmake.io/assets/img/index/menuconf.gif" width="60%" />
+<img src="/assets/img/index/menuconf.gif" width="60%" />
## Support platforms
-* Windows (x86, x64, amd64, x86_amd64)
+* Windows (x86, x64)
* Macosx (i386, x86_64)
* Linux (i386, x86_64, cross-toolchains ...)
* Android (armv5te, armv6, armv7-a, armv8-a, arm64-v8a)
@@ -150,7 +150,17 @@ $ xmake f --menu
* Golang
* Rust
* Dlang
-* Cuda
+* Cuda
+
+## Support Projects
+
+* Static Library
+* Shared Library
+* Console
+* Cuda Program
+* Qt Application
+* WDK Driver (umdf/kmdf/wdm)
+* WinSDK Application
## Builtin Plugins
@@ -178,6 +188,12 @@ $ xmake l lib.detect.find_tool gcc
$ xmake project -k vs2017 -m "debug,release"
```
+#### Generate doxygen document plugin
+
+```bash
+$ xmake doxygen [srcdir]
+```
+
## More Plugins
Please download and install from the plugins repository [xmake-plugins](https://github.com/tboox/xmake-plugins).
@@ -198,163 +214,63 @@ Please download and install from the plugins repository [xmake-plugins](https://
* [xmake.vim](https://github.com/luzhlon/xmake.vim) (third-party, thanks [@luzhlon](https://github.com/luzhlon))
-## Examples
-
-<a href="https://asciinema.org/a/133693">
-<img src="https://asciinema.org/a/133693.png" width="60%" />
-</a>
-
-Create a c++ console project:
-
-```bash
- xmake create -l c++ -t 1 console
- or xmake create --language=c++ --template=1 console
-```
+## More Examples
-Project xmakefile: xmake.lua
+Debug and release modes:
```lua
+add_rules("mode.debug", "mode.release")
+
target("console")
set_kind("binary")
add_files("src/*.c")
```
-Configure project:
-
-This is optional, if you compile the targets only for linux, macosx and windows and the default compilation mode is release.
-
-```bash
- xmake f -p iphoneos -m debug
-or xmake f --plat=macosx --arch=x86_64
-or xmake f -p windows
-or xmake config --plat=iphoneos --mode=debug
-or xmake config --plat=android --arch=armv7-a --ndk=xxxxx
-or xmake config -p linux -a i386
-or xmake config -p mingw --cross=i386-mingw32- --toolchains=/xxx/bin
-or xmake config -p mingw --sdk=/mingwsdk
-or xmake config --help
-```
-
-Compile project:
-
-```bash
- xmake
-or xmake -r
-or xmake --rebuild
-```
-
-Run target:
-
-```bash
- xmake r console
-or xmake run console
-```
-
-Debug target:
-
-```bash
- xmake r -d console
-or xmake run -d console
-```
-
-Package all:
+Custom script:
-```bash
- xmake p
-or xmake package
-or xmake package console
-or xmake package -o /tmp
-or xmake package --output=/tmp
-```
-
-Package all archs using macro:
-
-```bash
- xmake m package
-or xmake m package -p iphoneos
-or xmake m package -p macosx -f "-m debug" -o /tmp/
-or xmake m package --help
-```
-
-Install targets:
-
-```bash
- xmake i
-or xmake install
-or xmake install console
-or xmake install -o /tmp
-or xmake install --output=/tmp
-```
-
-If you need known more detailed usage,please refer to [documents](https://github.com/waruqi/xmake/wiki/documents)
-or run:
-
-```bash
- xmake -h
-or xmake --help
-or xmake config --help
-or xmake package --help
-or xmake macro --help
-...
+```lua
+target("test")
+ set_kind("static")
+ add_files("src/*.cpp")
+ after_build(function (target)
+ print("build %s ok!", target:targetfile())
+ end)
```
-The simple xmake.lua file:
-
-```c
--- the debug mode
-if is_mode("debug") then
-
- -- enable the debug symbols
- set_symbols("debug")
+Extension Modules:
- -- disable optimization
- set_optimize("none")
-end
-
--- the release mode
-if is_mode("release") then
-
- -- set the symbols visibility: hidden
- set_symbols("hidden")
-
- -- enable fastest optimization
- set_optimize("fastest")
-
- -- strip all symbols
- set_strip("all")
-end
-
--- add target
+```lua
target("test")
-
- -- set kind
- set_kind("static")
-
- -- add files
- add_files("src/*.c")
+ set_kind("shared")
+ add_files("src/*.c")
+ on_load(function (target)
+ import("lib.detect.find_package")
+ target:add(find_package("zlib"))
+ end)
```
-If you want to know more, please refer to:
+## Project Examples
-## Documents
-
-* [Documents](https://github.com/waruqi/xmake/wiki/documents)
-* [Codes](https://github.com/waruqi/xmake)
+Some projects using xmake:
-## Projects
+* [tbox](https://github.com/tboox/tbox)
+* [gbox](https://github.com/tboox/gbox)
+* [vm86](https://github.com/tboox/vm86)
+* [more](https://github.com/tboox/awesome-xmake)
-Some projects using xmake:
+## Example Video
-* [tbox](https://github.com/waruqi/tbox)
-* [gbox](https://github.com/waruqi/gbox)
-* [libsvx](https://github.com/caikelun/libsvx)
-* [more](https://github.com/waruqi/xmake/wiki/xmake-projects)
+<a href="https://asciinema.org/a/133693">
+<img src="https://asciinema.org/a/133693.png" width="60%" />
+</a>
## Contacts
* Homepage:[tboox.org](http://www.tboox.org)
-* Community:[/r/tboox on Reddit](https://www.reddit.com/r/tboox/)
+* Community:[/r/tboox on reddit](https://www.reddit.com/r/tboox/)
+* ChatRoom:[Char on telegram](https://t.me/tbooxorg), [Chat on gitter](https://gitter.im/tboox/tboox?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+* Source Code:[Github](https://github.com/tboox/xmake), [Gitee](https://gitee.com/tboox/xmake)
## Thanks
diff --git a/README_zh.md b/README_zh.md
index 07fd2d2c9..bcf6a39cf 100644
--- a/README_zh.md
+++ b/README_zh.md
@@ -135,11 +135,11 @@ $ xmake
$ xmake f --menu
```
-<img src="http://xmake.io/assets/img/index/menuconf.gif" width="60%" />
+<img src="/assets/img/index/menuconf.gif" width="60%" />
## 支持平台
-* Windows (x86, x64, amd64, x86_amd64)
+* Windows (x86, x64)
* Macosx (i386, x86_64)
* Linux (i386, x86_64, cross-toolchains ...)
* Android (armv5te, armv6, armv7-a, armv8-a, arm64-v8a)
@@ -158,6 +158,16 @@ $ xmake f --menu
* Dlang
* Cuda
+## 工程类型
+
+* 静态库程序
+* 动态库类型
+* 控制台程序
+* Cuda程序
+* Qt应用程序
+* WDK驱动程序
+* WinSDK应用程序
+
## 内置插件
#### 宏记录脚本和回放插件
@@ -210,137 +220,66 @@ $ xmake doxygen [srcdir]
* [xmake.vim](https://github.com/luzhlon/xmake.vim) (third-party, thanks [@luzhlon](https://github.com/luzhlon))
-## 简单例子
-
-<a href="https://asciinema.org/a/133693">
-<img src="https://asciinema.org/a/133693.png" width="60%" />
-</a>
-
-创建一个c++ console项目:
+## 更多例子
-```bash
- xmake create -l c++ -t 1 console
-or xmake create --language=c++ --template=1 console
-```
-
-工程描述文件:xmake.lua
+Debug和Release模式:
```lua
+add_rules("mode.debug", "mode.release")
+
target("console")
set_kind("binary")
add_files("src/*.c")
```
-配置工程:
-
- 这个是可选的步骤,如果只想编译当前主机平台的项目,是可以不用配置的,默认编译release版本。
-
-```bash
- xmake f -p iphoneos -m debug
-or xmake f --plat=macosx --arch=x86_64
-or xmake f -p windows
-or xmake config --plat=iphoneos --mode=debug
-or xmake config --plat=android --arch=armv7-a --ndk=xxxxx
-or xmake config -p linux -a i386
-or xmake config -p mingw --cross=i386-mingw32- --toolchains=/xxx/bin
-or xmake config -p mingw --sdk=/mingwsdk
-or xmake config --help
-```
-
-编译工程:
-
-```bash
- xmake
-or xmake -r
-or xmake --rebuild
-```
-
-运行目标:
-
-```bash
- xmake r console
-or xmake run console
-```
-
-调试目标:
-
-```bash
- xmake r -d console
-or xmake run -d console
-```
+自定义脚本:
-打包所有:
-
-```bash
- xmake p
-or xmake package
-or xmake package console
-or xmake package -o /tmp
-or xmake package --output=/tmp
-```
-
-通过宏脚本打包所有架构:
-
-```bash
- xmake m package
-or xmake m package -p iphoneos
-or xmake m package -p macosx -f "-m debug" -o /tmp/
-or xmake m package --help
-```
-
-安装目标:
-
-```bash
- xmake i
-or xmake install
-or xmake install console
-or xmake install -o /tmp
-or xmake install --output=/tmp
+```lua
+target("test")
+ set_kind("static")
+ add_files("src/*.cpp")
+ after_build(function (target)
+ print("build %s ok!", target:targetfile())
+ end)
```
-详细使用方式和参数说明,请参考[文档](https://github.com/waruqi/xmake/wiki/%E7%9B%AE%E5%BD%95)
-或者运行:
+使用扩展模块:
-```bash
- xmake -h
-or xmake --help
-or xmake config --help
-or xmake package --help
-or xmake macro --help
-...
+```lua
+target("test")
+ set_kind("shared")
+ add_files("src/*.c")
+ on_load(function (target)
+ import("lib.detect.find_package")
+ target:add(find_package("zlib"))
+ end)
```
-## 一些使用xmake的项目:
+## 项目例子
-* [tbox](https://github.com/waruqi/tbox)
-* [gbox](https://github.com/waruqi/gbox)
-* [libsvx](https://github.com/caikelun/libsvx)
-* [更多项目](https://github.com/waruqi/xmake/wiki/%E4%BD%BF%E7%94%A8xmake%E7%9A%84%E5%BC%80%E6%BA%90%E5%BA%93)
+一些使用xmake的项目:
-## 简单例子
-
-```c
--- add modes: debug and release
-add_rules("mode.debug", "mode.release")
+* [tbox](https://github.com/tboox/tbox)
+* [gbox](https://github.com/tboox/gbox)
+* [vm86](https://github.com/tboox/vm86)
+* [更多](https://github.com/tboox/awesome-xmake)
--- add target
-target("test")
-
- -- set kind
- set_kind("static")
+## 演示视频
- -- add files
- add_files("src/*.c")
-```
+<a href="https://asciinema.org/a/133693">
+<img src="https://asciinema.org/a/133693.png" width="60%" />
+</a>
## 联系方式
* 主页:[tboox.org](http://www.tboox.org/cn)
-* 社区:[reddit论坛](https://www.reddit.com/r/tboox/)
+* 社区:[Reddit论坛](https://www.reddit.com/r/tboox/)
+* 聊天:[Telegram群组](https://t.me/tbooxorg), [Gitter聊天室](https://gitter.im/tboox/tboox?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+* 源码:[Github](https://github.com/tboox/xmake), [Gitee](https://gitee.com/tboox/xmake)
* QQ群:343118190
* 微信公众号:tboox-os
-
+
## 感谢
感谢所有对xmake有所[贡献](CONTRIBUTING.md)的人: