Browse Source

update qt docs

ruki 2 years ago
parent
commit
4424a74178

+ 74 - 0
guide/project_examples.md

@@ -243,6 +243,80 @@ success
 install ok!👌
 ```
 
+### Supported Qt SDKs
+
+#### The official Qt SDK installation package
+
+This is usually detected automatically on macos/windows, but it is possible to specify the Qt SDK path manually.
+
+```bash
+$ xmake f --qt=[qt sdk path]
+```
+
+#### The Unbuntu Apt package
+
+After installing the Qt SDK using qpt, xmake will also be able to detect it automatically.
+
+```bash
+$ sudo apt install -y qtcreator qtbase5-dev
+$ xmake
+```
+
+#### Qt Mingw SDK from msys2/pacman
+
+xmake also supports the Qt Mingw SDK installed from pacman
+
+```bash
+$ pacman -S mingw-w64-x86_64-qt5 mingw-w64-x86_64-qt-creator
+$ xmake
+```
+
+#### Qt SDK package from aqtinstall script
+
+The Qt SDK installed by [aqtinstall](https://github.com/miurahr/aqtinstall) is based entirely on the official SDK structure and is therefore fully supported by xmake.
+
+However, it is usually necessary to specify the SDK path yourself.
+
+```bash
+$ xmake f --qt=[Qt SDK]
+```
+
+#### Qt packages from the xmake-repo repository
+
+xmake now officially provides a variety of modules for the Qt5 SDK that can be integrated automatically without any manual installation.
+
+Just configure the integration packages and xmake will automatically handle the Qt installation and integration and compile the project automatically.
+
+```lua
+add_rules("mode.debug", "mode.release")
+
+add_requires("qt5widgets")
+
+target("test")
+    add_rules("qt.widgetapp")
+    add_packages("qt5widgets")
+
+    add_headerfiles("src/*.h")
+    add_files("src/*.cpp")
+    add_files("src/mainwindow.ui")
+    -- add files with Q_OBJECT meta (only for qt.moc)
+    add_files("src/mainwindow.h")
+```
+
+In addition to the `qt5widgets` package, the repository also provides `qt5gui`, `qt5network` and other packages that can be used.
+
+Once configured, simply execute:
+
+```bash
+$ xmake
+```
+
+!> The Qt6 package is still under development and only supports Qt5 for now
+
+#### Qt packages from vcpkg/conan
+
+There is no time to support it yet, so please try to integrate the Qt SDK in the same way as above.
+
 ## WDK Driver Program
 
 xmake will detect WDK automatically and we can also set the WDK directory manually.

+ 50 - 6
mirror/guide/project_examples.html

@@ -247,6 +247,50 @@ installing build/android/release/appdemo.apk ..
 success
 install ok!👌
 </code></pre>
+<h3 id="supportedqtsdks">Supported Qt SDKs</h3>
+<h4 id="theofficialqtsdkinstallationpackage">The official Qt SDK installation package</h4>
+<p>This is usually detected automatically on macos/windows, but it is possible to specify the Qt SDK path manually.</p>
+<pre><code class="lang-bash">$ xmake f --qt=[qt sdk path]
+</code></pre>
+<h4 id="theunbuntuaptpackage">The Unbuntu Apt package</h4>
+<p>After installing the Qt SDK using qpt, xmake will also be able to detect it automatically.</p>
+<pre><code class="lang-bash">$ sudo apt install -y qtcreator qtbase5-dev
+$ xmake
+</code></pre>
+<h4 id="qtmingwsdkfrommsys2pacman">Qt Mingw SDK from msys2/pacman</h4>
+<p>xmake also supports the Qt Mingw SDK installed from pacman</p>
+<pre><code class="lang-bash">$ pacman -S mingw-w64-x86_64-qt5 mingw-w64-x86_64-qt-creator
+$ xmake
+</code></pre>
+<h4 id="qtsdkpackagefromaqtinstallscript">Qt SDK package from aqtinstall script</h4>
+<p>The Qt SDK installed by <a href="https://github.com/miurahr/aqtinstall">aqtinstall</a> is based entirely on the official SDK structure and is therefore fully supported by xmake.</p>
+<p>However, it is usually necessary to specify the SDK path yourself.</p>
+<pre><code class="lang-bash">$ xmake f --qt=[Qt SDK]
+</code></pre>
+<h4 id="qtpackagesfromthexmakereporepository">Qt packages from the xmake-repo repository</h4>
+<p>xmake now officially provides a variety of modules for the Qt5 SDK that can be integrated automatically without any manual installation.</p>
+<p>Just configure the integration packages and xmake will automatically handle the Qt installation and integration and compile the project automatically.</p>
+<pre><code class="lang-lua">add_rules("mode.debug", "mode.release")
+
+add_requires("qt5widgets")
+
+target("test")
+    add_rules("qt.widgetapp")
+    add_packages("qt5widgets")
+
+    add_headerfiles("src/*.h")
+    add_files("src/*.cpp")
+    add_files("src/mainwindow.ui")
+    -- add files with Q_OBJECT meta (only for qt.moc)
+    add_files("src/mainwindow.h")
+</code></pre>
+<p>In addition to the <code>qt5widgets</code> package, the repository also provides <code>qt5gui</code>, <code>qt5network</code> and other packages that can be used.</p>
+<p>Once configured, simply execute:</p>
+<pre><code class="lang-bash">$ xmake
+</code></pre>
+<p>!> The Qt6 package is still under development and only supports Qt5 for now</p>
+<h4 id="qtpackagesfromvcpkgconan">Qt packages from vcpkg/conan</h4>
+<p>There is no time to support it yet, so please try to integrate the Qt SDK in the same way as above.</p>
 <h2 id="wdkdriverprogram">WDK Driver Program</h2>
 <p>xmake will detect WDK automatically and we can also set the WDK directory manually.</p>
 <pre><code class="lang-console">$ xmake f --wdk="G:\Program Files\Windows Kits\10" -c
@@ -1374,14 +1418,14 @@ target("test")
 <p>Through <code>add_requires("iverilog")</code> configuration, we can automatically pull the iverilog toolchain package, and then use <code>set_toolchains("@iverilog")</code> to automatically bind the toolchain to compile the project.</p>
 <pre><code class="lang-lua">add_requires("iverilog")
 target("hello")
-     add_rules("iverilog. binary")
+     add_rules("iverilog.binary")
      set_toolchains("@iverilog")
      add_files("src/*.v")
 </code></pre>
 <h4 id="setabstractconfiguration">Set abstract configuration</h4>
 <pre><code class="lang-Lua">add_requires("iverilog")
 target("hello")
-     add_rules("iverilog. binary")
+     add_rules("iverilog.binary")
      set_toolchains("@iverilog")
      add_files("src/*.v")
      add_defines("TEST")
@@ -1400,7 +1444,7 @@ target("hello")
 <h4 id="setcustomflags">Set custom flags</h4>
 <pre><code class="lang-lua">add_requires("iverilog")
 target("hello")
-     add_rules("iverilog. binary")
+     add_rules("iverilog.binary")
      set_toolchains("@iverilog")
      add_files("src/*.v")
      add_values("iverilogs.flags", "-DTEST")
@@ -1423,7 +1467,7 @@ src/main.v:6: $finish called at 0 (1s)
 <p>Through <code>add_requires("verilator")</code> configuration, we can automatically pull the verilator toolchain package, and then use <code>set_toolchains("@verilator")</code> to automatically bind to the toolchain to compile the project.</p>
 <pre><code class="lang-lua">add_requires("verilator")
 target("Hello")
-     add_rules("verilator. binary")
+     add_rules("verilator.binary")
      set_toolchains("@verilator")
      add_files("src/*.v")
      add_files("src/*.cpp")
@@ -1445,7 +1489,7 @@ int main(int argc, char** argv) {
 <h4 id="setabstractconfiguration">Set abstract configuration</h4>
 <pre><code class="lang-lua">add_requires("verilator")
 target("Hello")
-     add_rules("verilator. binary")
+     add_rules("verilator.binary")
      set_toolchains("@verilator")
      add_files("src/*.v")
      add_defines("TEST")
@@ -1467,7 +1511,7 @@ target("Hello")
 <h4 id="setcustomflags">Set custom flags</h4>
 <pre><code class="lang-lua">add_requires("verilator")
 target("Hello")
-     add_rules("verilator. binary")
+     add_rules("verilator.binary")
      set_toolchains("@verilator")
      add_files("src/*.v")
      add_files("src/*.cpp")

+ 15 - 46
mirror/manual/builtin_modules.html

@@ -737,7 +737,7 @@ $ xmake --version
 </tr>
 <tr>
 <td><a href="#ossetenvs">os.setenvs</a></td>
-<td>Set a environment variable</td>
+<td>Set environment variables</td>
 <td>>= 2.2.6</td>
 </tr>
 <tr>
@@ -781,11 +781,6 @@ $ xmake --version
 <td>>= 2.1.9</td>
 </tr>
 <tr>
-<td><a href="#osmatch">os.match</a></td>
-<td>Match files or directories</td>
-<td>>= 2.3.1</td>
-</tr>
-<tr>
 <td><a href="#osisroot">os.isroot</a></td>
 <td>Test if xmake is running as root</td>
 <td>>= 2.1.9</td>
@@ -815,6 +810,11 @@ $ xmake --version
 <td>Get memory information</td>
 <td>>= 2.1.5</td>
 </tr>
+<tr>
+<td><a href="#osdefault_njob">os.default_njob</a></td>
+<td>Get default paralled jobs</td>
+<td>>= 2.5.8</td>
+</tr>
 </tbody>
 </table>
 <h4 id="oscp">os.cp</h4>
@@ -1149,6 +1149,7 @@ os.ln("xxx.txt", "xxx.txt.ln")
 <pre><code class="lang-lua">-- Raise exception with message "an error occurred"
 os.raise("an error occurred")
 </code></pre>
+<p>!> recommanded to use builtin function <code>raise</code> instead of <code>os.raise</code></p>
 <h4 id="osraiselevel">os.raiselevel</h4>
 <ul>
 <li>Similar to <a href="#osraise">os.raise</a> but you can specify the level of the error</li>
@@ -1170,15 +1171,15 @@ print(envs["HOME"])
 </code></pre>
 <h4 id="ossetenvs">os.setenvs</h4>
 <ul>
-<li>Set environment variables. Replace the current envs by a new one</li>
+<li>Set environment variables. Replace the current envs by a new one and return old envs</li>
 </ul>
 <h4 id="osaddenvs">os.addenvs</h4>
 <ul>
-<li>Add environment variables to current envs, return the old one</li>
+<li>Add environment variables to current envs, return the all old envs</li>
 </ul>
 <pre><code class="lang-lua">os.setenvs({EXAMPLE = "a/path"}) -- add a custom variable to see addenvs impact on it
 
-local oldenvs = os.addenvs({CUSTOM = "some/path/"})
+local oldenvs = os.addenvs({EXAMPLE = "some/path/"})
 print(os.getenvs()["EXAMPLE"]) --got some/path/;a/path
 print(oldenvs["EXAMPLE"]) -- got a/path
 </code></pre>
@@ -1222,42 +1223,6 @@ os.addenv("PATH", "bin")
 <ul>
 <li>Get the working directory</li>
 </ul>
-<h4 id="osmatch">os.match</h4>
-<ul>
-<li>Match files or directories with a pattern</li>
-</ul>
-<pre><code class="lang-lua">-- @param pattern   the search pattern
---                  uses "*" to match any part of a file or directory name,
---                  uses "**" to recurse into subdirectories.
---
--- @param mode      the match mode
---                  - only find file:           &#39;f&#39; or false or nil
---                  - only find directory:      &#39;d&#39; or true
---                  - find file and directory:  &#39;a&#39;
--- @return          the result array and count
-
-local files, count = os.match("./about/*", false)
-print(files)
--- In xmake-docs repo
--- got { 
---   "about\awesome.md",
---   "about\changelog.md",
---   "about\contact.md",
---   "about\introduction.md",
---   "about\sponsor.md",
---   "about\technical_support.md",
---   "about\who_is_using_xmake.md"
--- }
-
-local dirs, count = os.match("./assets/*", true)
-print(dirs)
--- In xmake-docs repo
--- got {
---   "assets\img",
---   "assets\npm",
---   "assets\scripts"
--- }
-</code></pre>
 <h4 id="osisroot">os.isroot</h4>
 <ul>
 <li>Test if xmake is running as root</li>
@@ -1294,7 +1259,7 @@ print(dirs)
 --   model = 158,
 --   family = 6
 -- }
-print(os.cpuinfo("march")) -- got Kaby Lake
+print(os.cpuinfo("march")) -- got "Kaby Lake"
 </code></pre>
 <h4 id="osmeminfo">os.meminfo</h4>
 <ul>
@@ -1308,6 +1273,10 @@ print(os.cpuinfo("march")) -- got Kaby Lake
 --   pagesize = 4096
 -- }
 </code></pre>
+<h4 id="osdefault_njob">os.default_njob</h4>
+<ul>
+<li>Get default paralled jobs</li>
+</ul>
 <h3 id="winos">winos</h3>
 <p>The windows system operation module is a built-in module, no need to use <a href="#import">import</a> to import, you can directly call its interface in the script domain.</p>
 <table>

+ 44 - 0
mirror/zh-cn/guide/project_examples.html

@@ -247,6 +247,50 @@ installing build/android/release/appdemo.apk ..
 Success
 install ok!👌
 </code></pre>
+<h3 id="qtsdk">目前支持的 Qt SDK</h3>
+<h4 id="qtsdk">来自 Qt 官方提供的 SDK 安装包</h4>
+<p>在 macos/windows 上通常能自动探测到,但是也可以手动指定 Qt SDK 路径。</p>
+<pre><code class="lang-bash">$ xmake f --qt=[qt sdk path]
+</code></pre>
+<h4 id="unbuntuapt">来自 Unbuntu Apt 安装包</h4>
+<p>使用 qpt 安装完 Qt SDK,xmake 也能够自动检测到。</p>
+<pre><code class="lang-bash">$ sudo apt install -y qtcreator qtbase5-dev
+$ xmake
+</code></pre>
+<h4 id="msys2pacmanqtmingw">来自 msys2/pacman 的 Qt Mingw 安装包</h4>
+<p>xmake 也支持从 pacman 安装的 Qt Mingw SDK</p>
+<pre><code class="lang-bash">$ pacman -S mingw-w64-x86_64-qt5 mingw-w64-x86_64-qt-creator
+$ xmake
+</code></pre>
+<h4 id="aqtinstallqtsdk">来自 aqtinstall 脚本的 Qt SDK 包</h4>
+<p><a href="https://github.com/miurahr/aqtinstall">aqtinstall</a> 安装的 Qt SDK 是完全基于官方 SDK 结构的,所以 xmake 也完全支持。</p>
+<p>但是,通常需要自己指定 SDK 路径。</p>
+<pre><code class="lang-bash">$ xmake f --qt=[Qt SDK]
+</code></pre>
+<h4 id="xmakerepoqt">来自 xmake-repo 仓库的 Qt 包</h4>
+<p>xmake 现在官方提供了 Qt5 SDK 的各种模块包,可以自动集成使用,无需任何手动安装。</p>
+<p>只需要配置集成包就行了,xmake 会自动处理 Qt 的安装集成,并且自动编译项目。</p>
+<pre><code class="lang-lua">add_rules("mode.debug", "mode.release")
+
+add_requires("qt5widgets")
+
+target("test")
+    add_rules("qt.widgetapp")
+    add_packages("qt5widgets")
+
+    add_headerfiles("src/*.h")
+    add_files("src/*.cpp")
+    add_files("src/mainwindow.ui")
+    -- add files with Q_OBJECT meta (only for qt.moc)
+    add_files("src/mainwindow.h")
+</code></pre>
+<p>除了 <code>qt5widgets</code> 包,仓库还提供了 <code>qt5gui</code>, <code>qt5network</code> 等包,可以使用。</p>
+<p>配置完,只需要执行:</p>
+<pre><code class="lang-bash">$ xmake
+</code></pre>
+<p>!> Qt6 的包还在开发中,暂时仅仅只支持 Qt5</p>
+<h4 id="vcpkgconanqt">来自 vcpkg/conan 的 Qt 包</h4>
+<p>暂时还没时间支持,请尽量使用上面的方式集成 Qt SDK。</p>
 <h2 id="wdk">WDK驱动程序</h2>
 <p>默认会自动探测wdk所在环境,当然也可以指定wdk sdk环境目录:</p>
 <pre><code class="lang-console">$ xmake f --wdk="G:\Program Files\Windows Kits\10" -c

+ 283 - 1
mirror/zh-cn/manual/builtin_modules.html

@@ -655,6 +655,11 @@ $ xmake --version
 <td>>= 2.1.5</td>
 </tr>
 <tr>
+<td><a href="#osprogramfile">os.programfile</a></td>
+<td>获取xmake可执行文件路径</td>
+<td>>= 2.1.5</td>
+</tr>
+<tr>
 <td><a href="#osprojectdir">os.projectdir</a></td>
 <td>获取工程主目录</td>
 <td>>= 2.1.5</td>
@@ -669,6 +674,131 @@ $ xmake --version
 <td>获取当前主机系统</td>
 <td>>= 2.0.1</td>
 </tr>
+<tr>
+<td><a href="#ossubhost">os.subhost</a></td>
+<td>获取子系统</td>
+<td>>= 2.3.1</td>
+</tr>
+<tr>
+<td><a href="#ossubarch">os.subarch</a></td>
+<td>获取子系统架构</td>
+<td>>= 2.3.1</td>
+</tr>
+<tr>
+<td><a href="#osis_host">os.is_host</a></td>
+<td>判断给定系统是否正确</td>
+<td>>= 2.3.1</td>
+</tr>
+<tr>
+<td><a href="#osis_arch">os.is_arch</a></td>
+<td>判断给定架构是否正确</td>
+<td>>= 2.3.1</td>
+</tr>
+<tr>
+<td><a href="#osis_subhost">os.is_subhost</a></td>
+<td>判断给定子系统是否正确</td>
+<td>>= 2.3.1</td>
+</tr>
+<tr>
+<td><a href="#osis_subarch">os.is_subarch</a></td>
+<td>判断子系统架构是否正确</td>
+<td>>= 2.3.1</td>
+</tr>
+<tr>
+<td><a href="#osln">os.ln</a></td>
+<td>创建指向文件或文件夹的符号链接</td>
+<td>>= 2.2.2</td>
+</tr>
+<tr>
+<td><a href="#osreadlink">os.readlink</a></td>
+<td>读取符号链接</td>
+<td>>= 2.2.2</td>
+</tr>
+<tr>
+<td><a href="#osraise">os.raise</a></td>
+<td>抛出一个异常并中止脚本运行</td>
+<td>>= 2.2.8</td>
+</tr>
+<tr>
+<td><a href="#osraiselevel">os.raiselevel</a></td>
+<td>抛出一个异常并中止脚本运行</td>
+<td>>= 2.2.8</td>
+</tr>
+<tr>
+<td><a href="#osfeatures">os.features</a></td>
+<td>获取系统特性</td>
+<td>>= 2.3.1</td>
+</tr>
+<tr>
+<td><a href="#osgetenvs">os.getenvs</a></td>
+<td>获取所有环境变量</td>
+<td>>= 2.2.6</td>
+</tr>
+<tr>
+<td><a href="#ossetenvs">os.setenvs</a></td>
+<td>替换当前所有环境变量</td>
+<td>>= 2.2.6</td>
+</tr>
+<tr>
+<td><a href="#osaddenvs">os.addenvs</a></td>
+<td>向当前环境变量中添加新值</td>
+<td>>= 2.5.6</td>
+</tr>
+<tr>
+<td><a href="#osjoinenvs">os.joinenvs</a></td>
+<td>拼接环境变量</td>
+<td>>= 2.5.6</td>
+</tr>
+<tr>
+<td><a href="#ossetenvp">os.setenvp</a></td>
+<td>使用给定分隔符设置环境变量</td>
+<td>>= 2.1.5</td>
+</tr>
+<tr>
+<td><a href="#osaddenvp">os.addenvp</a></td>
+<td>使用给定分隔符向环境变量添加新值</td>
+<td>>= 2.1.5</td>
+</tr>
+<tr>
+<td><a href="#osworkingdir">os.workingdir</a></td>
+<td>获取工作路径</td>
+<td>>= 2.1.9</td>
+</tr>
+<tr>
+<td><a href="#osisroot">os.isroot</a></td>
+<td>判断当前xmake是否以管理员权限运行</td>
+<td>>= 2.1.9</td>
+</tr>
+<tr>
+<td><a href="#osfscase">os.fscase</a></td>
+<td>判断当前系统的文件系统是否大小写敏感</td>
+<td>>= 2.1.9</td>
+</tr>
+<tr>
+<td><a href="#osterm">os.term</a></td>
+<td>获取当前终端</td>
+<td>>= 2.7.3</td>
+</tr>
+<tr>
+<td><a href="#osshell">os.shell</a></td>
+<td>获取当前shell</td>
+<td>>= 2.7.3</td>
+</tr>
+<tr>
+<td><a href="#oscpuinfo">os.cpuinfo</a></td>
+<td>获取CPU信息</td>
+<td>>= 2.1.5</td>
+</tr>
+<tr>
+<td><a href="#osmeminfo">os.meminfo</a></td>
+<td>获取内存信息</td>
+<td>>= 2.1.5</td>
+</tr>
+<tr>
+<td><a href="#osdefault_njob">os.default_njob</a></td>
+<td>获取默认编译任务数</td>
+<td>>= 2.5.8</td>
+</tr>
 </tbody>
 </table>
 <h4 id="oscp">os.cp</h4>
@@ -854,7 +984,7 @@ os.run("ls -l $(buildir)")
 <pre><code class="lang-lua">os.runv("echo", {"hello", "xmake!"})
 </code></pre>
 <p>另外,此接口也支持envs参数设置:</p>
-<pre><code class="lang-lua">os.runv("echo", {"hello", "xmake!"}, {envs = {PATH = "xxx;xx", CFLAGS = "xx"}}
+<pre><code class="lang-lua">os.runv("echo", {"hello", "xmake!"}, {envs = {PATH = "xxx;xx", CFLAGS = "xx"}})
 </code></pre>
 <h4 id="osexec">os.exec</h4>
 <ul>
@@ -944,6 +1074,10 @@ os.run("ls -l $(buildir)")
 <li>获取xmake安装主程序脚本目录</li>
 </ul>
 <p>跟<a href="#var-programdir">$(programdir)</a>结果一致,只不过是直接获取返回一个变量,可以用后续字符串维护。</p>
+<h4 id="osprogramfile">os.programfile</h4>
+<ul>
+<li>获取xmake可执行文件路径</li>
+</ul>
 <h4 id="osprojectdir">os.projectdir</h4>
 <ul>
 <li>获取工程主目录</li>
@@ -959,6 +1093,154 @@ os.run("ls -l $(buildir)")
 <li>获取当前主机的操作系统</li>
 </ul>
 <p>跟<a href="#var-host">$(host)</a>结果一致,例如我在<code>linux x86_64</code>上执行xmake进行构建,那么返回值是:<code>linux</code></p>
+<h4 id="ossubhost">os.subhost</h4>
+<ul>
+<li>获取当前子系统,如:在Windows上的msys、cygwin</li>
+</ul>
+<h4 id="ossubarch">os.subarch</h4>
+<ul>
+<li>获取子系统架构</li>
+</ul>
+<h4 id="osis_host">os.is_host</h4>
+<ul>
+<li>判断给定系统是否为当前系统</li>
+</ul>
+<h4 id="osis_arch">os.is_arch</h4>
+<ul>
+<li>判断给定架构是否为当前架构</li>
+</ul>
+<h4 id="osis_subhost">os.is_subhost</h4>
+<ul>
+<li>判断给定子系统是否为当前子系统</li>
+</ul>
+<h4 id="osis_subarch">os.is_subarch</h4>
+<ul>
+<li>判断给定子系统架构是否为当前子系统架构</li>
+</ul>
+<h4 id="osln">os.ln</h4>
+<ul>
+<li>为一个文件或目录创建符号链接</li>
+</ul>
+<pre><code class="lang-lua">-- 创建一个指向 "tmp.txt" 文件的符号链接 "tmp.txt.ln"
+os.ln("xxx.txt", "xxx.txt.ln")
+</code></pre>
+<h4 id="osreadlink">os.readlink</h4>
+<ul>
+<li>读取符号链接内容</li>
+</ul>
+<h4 id="osraise">os.raise</h4>
+<ul>
+<li>抛出一个异常并且中止当前脚本运行</li>
+</ul>
+<pre><code class="lang-lua">-- 抛出一个带 "an error occurred" 信息的异常
+os.raise("an error occurred")
+</code></pre>
+<p>!> 推荐使用与 <code>os.raise</code> 等价的内置接口 <code>raise</code>,用法与 <code>os.raise</code> 一致</p>
+<h4 id="osraiselevel">os.raiselevel</h4>
+<ul>
+<li>与 <a href="#osraise">os.raise</a> 类似但是可以指定异常等级</li>
+</ul>
+<pre><code class="lang-lua">-- 抛出一个带 "an error occurred" 信息的异常
+os.raise(3, "an error occurred")
+</code></pre>
+<h4 id="osfeatures">os.features</h4>
+<ul>
+<li>获取系统特性</li>
+</ul>
+<h4 id="osgetenvs">os.getenvs</h4>
+<ul>
+<li>获取所有当前系统变量</li>
+</ul>
+<pre><code class="lang-lua">local envs = os.getenvs()
+-- home directory (on linux)
+print(envs["HOME"])
+</code></pre>
+<h4 id="ossetenvs">os.setenvs</h4>
+<ul>
+<li>使用给定系统变量替换当前所有系统变量,并返回旧系统变量</li>
+</ul>
+<h4 id="osaddenvs">os.addenvs</h4>
+<ul>
+<li>向当前系统变量添加新变量,并且返回所有旧系统变量</li>
+</ul>
+<pre><code class="lang-lua">os.setenvs({EXAMPLE = "a/path"}) -- add a custom variable to see addenvs impact on it
+
+local oldenvs = os.addenvs({EXAMPLE = "some/path/"})
+print(os.getenvs()["EXAMPLE"]) --got some/path/;a/path
+print(oldenvs["EXAMPLE"]) -- got a/path
+</code></pre>
+<h4 id="osjoinenvs">os.joinenvs</h4>
+<ul>
+<li>拼接系统变量,与 <a href="#osaddenvs">os.addenvs</a> 类似,但是不会对当前环境变量产生影响,若第二个参数为 <code>nil</code>,则使用原有环境变量</li>
+</ul>
+<pre><code class="lang-lua">-- os.joinenvs(envs, oldenvs)
+--
+-- @param envs      table 类型,新插入的环境变量
+--
+-- @param oldenvs   table 类型,被插入的环境变量,若为 nil, 则为原有环境变量
+--
+-- @return          table 类型,拼接后的环境变量
+local envs0 = {CUSTOM = "a/path"}
+local envs1 = {CUSTOM = "some/path/"}
+print(os.joinenvs(envs0, envs1)) -- result is : { CUSTION = "a/path;some/path/" }
+</code></pre>
+<h4 id="ossetenvp">os.setenvp</h4>
+<ul>
+<li>使用给定分隔符设置环境变量</li>
+</ul>
+<h4 id="osworkingdir">os.workingdir</h4>
+<ul>
+<li>获取工作目录</li>
+</ul>
+<h4 id="osisroot">os.isroot</h4>
+<ul>
+<li>判断xmake是否以管理员权限运行</li>
+</ul>
+<h4 id="osfscase">os.fscase</h4>
+<ul>
+<li>判断操作系统的文件系统是否大小写敏感</li>
+</ul>
+<h4 id="osterm">os.term</h4>
+<ul>
+<li>获取当前终端 (windows-terminal, vscode, xterm, ...)</li>
+</ul>
+<h4 id="osshell">os.shell</h4>
+<ul>
+<li>获取当前shell (pwsh, cmd, bash, zsh, ...)</li>
+</ul>
+<h4 id="oscpuinfo">os.cpuinfo</h4>
+<ul>
+<li>获取当前CPU信息</li>
+</ul>
+<pre><code class="lang-lua">print(os.cpuinfo())
+-- probably got {
+--   march = "Alder Lake",
+--   model = 154,
+--   ncpu = 20,
+--   model_name = "12th Gen Intel(R) Core(TM) i9-12900H",
+--   usagerate = 0.041839182376862,
+--   vendor = "GenuineIntel",
+--   family = 6
+-- }
+print(os.cpuinfo("march")) -- probably got "Alder Lake"
+</code></pre>
+<h4 id="osmeminfo">os.meminfo</h4>
+<ul>
+<li>获取内存信息</li>
+</ul>
+<pre><code class="lang-lua">print(os.meminfo())
+-- probably got {
+--   pagesize = 4096,
+--   usagerate = 0.60694103194103,
+--   availsize = 12798,
+--   totalsize = 32560
+-- }
+print(os.meminfo("pagesize")) -- probably got 4096
+</code></pre>
+<h4 id="osdefault_njob">os.default_njob</h4>
+<ul>
+<li>获取默认编译任务数</li>
+</ul>
 <h3 id="winos">winos</h3>
 <p>windows 系统操作模块,属于内置模块,无需使用<a href="#import">import</a>导入,可直接脚本域调用其接口。</p>
 <table>

+ 102 - 102
sitemap.xml

@@ -12,512 +12,512 @@
 
 <url>
   <loc>https://xmake.io/mirror/guide/project_examples.html</loc>
-  <lastmod>2023-04-23T13:52:23+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:29+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/guide/quickstart.html</loc>
-  <lastmod>2023-04-23T13:52:23+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:29+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/guide/faq.html</loc>
-  <lastmod>2023-04-23T13:52:23+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:29+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/guide/build_policies.html</loc>
-  <lastmod>2023-04-23T13:52:23+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:30+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/guide/configuration.html</loc>
-  <lastmod>2023-04-23T13:52:24+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:30+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/guide/syntax_description.html</loc>
-  <lastmod>2023-04-23T13:52:24+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:30+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/guide/installation.html</loc>
-  <lastmod>2023-04-23T13:52:24+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:30+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/features/remote_build.html</loc>
-  <lastmod>2023-04-23T13:52:25+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:30+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/features/unity_build.html</loc>
-  <lastmod>2023-04-23T13:52:25+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:30+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/features/distcc_build.html</loc>
-  <lastmod>2023-04-23T13:52:25+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:31+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/features/trybuild.html</loc>
-  <lastmod>2023-04-23T13:52:25+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:31+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/features/autogen.html</loc>
-  <lastmod>2023-04-23T13:52:25+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:31+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/features/build_cache.html</loc>
-  <lastmod>2023-04-23T13:52:26+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:31+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/plugin/plugin_development.html</loc>
-  <lastmod>2023-04-23T13:52:26+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:31+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/plugin/more_plugins.html</loc>
-  <lastmod>2023-04-23T13:52:26+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:32+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/plugin/builtin_plugins.html</loc>
-  <lastmod>2023-04-23T13:52:26+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:32+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/about/awesome.html</loc>
-  <lastmod>2023-04-23T13:52:26+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:32+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/about/technical_support.html</loc>
-  <lastmod>2023-04-23T13:52:27+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:32+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/about/changelog.html</loc>
-  <lastmod>2023-04-23T13:52:27+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:32+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/about/contact.html</loc>
-  <lastmod>2023-04-23T13:52:27+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:33+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/about/introduction.html</loc>
-  <lastmod>2023-04-23T13:52:27+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:33+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/about/who_is_using_xmake.html</loc>
-  <lastmod>2023-04-23T13:52:27+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:33+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/about/sponsor.html</loc>
-  <lastmod>2023-04-23T13:52:28+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:33+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/index.html</loc>
-  <lastmod>2023-04-23T13:52:28+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:34+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/guide/project_examples.html</loc>
-  <lastmod>2023-04-23T13:52:28+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:34+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/guide/quickstart.html</loc>
-  <lastmod>2023-04-23T13:52:28+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:34+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/guide/faq.html</loc>
-  <lastmod>2023-04-23T13:52:28+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:34+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/guide/build_policies.html</loc>
-  <lastmod>2023-04-23T13:52:29+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:34+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/guide/configuration.html</loc>
-  <lastmod>2023-04-23T13:52:29+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:34+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/guide/syntax_description.html</loc>
-  <lastmod>2023-04-23T13:52:29+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:35+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/guide/installation.html</loc>
-  <lastmod>2023-04-23T13:52:29+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:35+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/features/remote_build.html</loc>
-  <lastmod>2023-04-23T13:52:29+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:35+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/features/unity_build.html</loc>
-  <lastmod>2023-04-23T13:52:30+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:36+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/features/distcc_build.html</loc>
-  <lastmod>2023-04-23T13:52:30+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:36+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/features/trybuild.html</loc>
-  <lastmod>2023-04-23T13:52:30+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:36+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/features/autogen.html</loc>
-  <lastmod>2023-04-23T13:52:30+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:36+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/features/build_cache.html</loc>
-  <lastmod>2023-04-23T13:52:30+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:36+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/plugin/plugin_development.html</loc>
-  <lastmod>2023-04-23T13:52:31+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:37+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/plugin/more_plugins.html</loc>
-  <lastmod>2023-04-23T13:52:31+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:37+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/plugin/builtin_plugins.html</loc>
-  <lastmod>2023-04-23T13:52:31+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:37+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/about/awesome.html</loc>
-  <lastmod>2023-04-23T13:52:31+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:37+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/about/technical_support.html</loc>
-  <lastmod>2023-04-23T13:52:31+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:38+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/about/changelog.html</loc>
-  <lastmod>2023-04-23T13:52:32+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:38+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/about/contact.html</loc>
-  <lastmod>2023-04-23T13:52:32+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:38+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/about/peripheral_items.html</loc>
-  <lastmod>2023-04-23T13:52:32+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:38+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/about/introduction.html</loc>
-  <lastmod>2023-04-23T13:52:32+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:38+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/about/who_is_using_xmake.html</loc>
-  <lastmod>2023-04-23T13:52:33+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:39+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/about/sponsor.html</loc>
-  <lastmod>2023-04-23T13:52:33+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:39+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/about/course.html</loc>
-  <lastmod>2023-04-23T13:52:33+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:39+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/index.html</loc>
-  <lastmod>2023-04-23T13:52:33+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:39+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/getting_started.html</loc>
-  <lastmod>2023-04-23T13:52:34+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:40+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/manual/specification.html</loc>
-  <lastmod>2023-04-23T13:52:34+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:40+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/manual/builtin_variables.html</loc>
-  <lastmod>2023-04-23T13:52:34+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:40+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/manual/conditions.html</loc>
-  <lastmod>2023-04-23T13:52:34+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:40+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/manual/custom_rule.html</loc>
-  <lastmod>2023-04-23T13:52:35+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:41+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/manual/target_instance.html</loc>
-  <lastmod>2023-04-23T13:52:35+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:41+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/manual/project_target.html</loc>
-  <lastmod>2023-04-23T13:52:35+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:41+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/manual/builtin_modules.html</loc>
-  <lastmod>2023-04-23T13:52:35+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:41+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/manual/custom_toolchain.html</loc>
-  <lastmod>2023-04-23T13:52:36+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:41+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/manual/plugin_task.html</loc>
-  <lastmod>2023-04-23T13:52:36+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:42+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/manual/package_dependencies.html</loc>
-  <lastmod>2023-04-23T13:52:36+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:42+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/manual/configuration_option.html</loc>
-  <lastmod>2023-04-23T13:52:36+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:42+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/manual/extension_modules.html</loc>
-  <lastmod>2023-04-23T13:52:36+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:42+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/manual/helper_interfaces.html</loc>
-  <lastmod>2023-04-23T13:52:37+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:42+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/manual/global_interfaces.html</loc>
-  <lastmod>2023-04-23T13:52:37+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:43+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/manual/package_instance.html</loc>
-  <lastmod>2023-04-23T13:52:37+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:43+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/manual/option_instance.html</loc>
-  <lastmod>2023-04-23T13:52:37+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:43+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/theme/builtin_themes.html</loc>
-  <lastmod>2023-04-23T13:52:37+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:43+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/theme/switch_theme.html</loc>
-  <lastmod>2023-04-23T13:52:38+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:43+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/package/local_3rd_source_library.html</loc>
-  <lastmod>2023-04-23T13:52:38+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:44+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/package/local_package_old.html</loc>
-  <lastmod>2023-04-23T13:52:38+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:44+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/package/local_package.html</loc>
-  <lastmod>2023-04-23T13:52:38+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:44+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/package/system_package.html</loc>
-  <lastmod>2023-04-23T13:52:38+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:44+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/package/remote_package.html</loc>
-  <lastmod>2023-04-23T13:52:39+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:44+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/toolchain/remote_toolchain.html</loc>
-  <lastmod>2023-04-23T13:52:39+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:45+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/zh-cn/toolchain/builtin_toolchains.html</loc>
-  <lastmod>2023-04-23T13:52:39+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:45+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/getting_started.html</loc>
-  <lastmod>2023-04-23T13:52:39+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:45+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/manual/specification.html</loc>
-  <lastmod>2023-04-23T13:52:39+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:45+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/manual/builtin_variables.html</loc>
-  <lastmod>2023-04-23T13:52:40+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:45+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/manual/conditions.html</loc>
-  <lastmod>2023-04-23T13:52:40+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:46+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/manual/custom_rule.html</loc>
-  <lastmod>2023-04-23T13:52:40+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:46+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/manual/target_instance.html</loc>
-  <lastmod>2023-04-23T13:52:40+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:46+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/manual/project_target.html</loc>
-  <lastmod>2023-04-23T13:52:40+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:46+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/manual/builtin_modules.html</loc>
-  <lastmod>2023-04-23T13:52:41+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:46+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/manual/custom_toolchain.html</loc>
-  <lastmod>2023-04-23T13:52:41+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:47+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/manual/plugin_task.html</loc>
-  <lastmod>2023-04-23T13:52:41+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:47+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/manual/package_dependencies.html</loc>
-  <lastmod>2023-04-23T13:52:41+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:47+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/manual/configuration_option.html</loc>
-  <lastmod>2023-04-23T13:52:42+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:47+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/manual/extension_modules.html</loc>
-  <lastmod>2023-04-23T13:52:42+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:47+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/manual/helper_interfaces.html</loc>
-  <lastmod>2023-04-23T13:52:42+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:48+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/manual/global_interfaces.html</loc>
-  <lastmod>2023-04-23T13:52:42+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:48+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/manual/package_instance.html</loc>
-  <lastmod>2023-04-23T13:52:43+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:48+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/manual/option_instance.html</loc>
-  <lastmod>2023-04-23T13:52:43+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:48+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/theme/builtin_themes.html</loc>
-  <lastmod>2023-04-23T13:52:43+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:49+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/theme/switch_theme.html</loc>
-  <lastmod>2023-04-23T13:52:43+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:49+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/package/local_3rd_source_library.html</loc>
-  <lastmod>2023-04-23T13:52:43+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:49+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/package/local_package_old.html</loc>
-  <lastmod>2023-04-23T13:52:44+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:49+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/package/local_package.html</loc>
-  <lastmod>2023-04-23T13:52:44+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:49+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/package/system_package.html</loc>
-  <lastmod>2023-04-23T13:52:44+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:50+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/package/remote_package.html</loc>
-  <lastmod>2023-04-23T13:52:44+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:50+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/toolchain/remote_toolchain.html</loc>
-  <lastmod>2023-04-23T13:52:44+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:50+08:00</lastmod>
 </url>
 
 <url>
   <loc>https://xmake.io/mirror/toolchain/builtin_toolchains.html</loc>
-  <lastmod>2023-04-23T13:52:45+08:00</lastmod>
+  <lastmod>2023-04-28T11:57:50+08:00</lastmod>
 </url>
 
 </urlset>

+ 74 - 0
zh-cn/guide/project_examples.md

@@ -245,6 +245,80 @@ Success
 install ok!👌
 ```
 
+### 目前支持的 Qt SDK
+
+#### 来自 Qt 官方提供的 SDK 安装包
+
+在 macos/windows 上通常能自动探测到,但是也可以手动指定 Qt SDK 路径。
+
+```bash
+$ xmake f --qt=[qt sdk path]
+```
+
+#### 来自 Unbuntu Apt 安装包
+
+使用 qpt 安装完 Qt SDK,xmake 也能够自动检测到。
+
+```bash
+$ sudo apt install -y qtcreator qtbase5-dev
+$ xmake
+```
+
+#### 来自 msys2/pacman 的 Qt Mingw 安装包
+
+xmake 也支持从 pacman 安装的 Qt Mingw SDK
+
+```bash
+$ pacman -S mingw-w64-x86_64-qt5 mingw-w64-x86_64-qt-creator
+$ xmake
+```
+
+#### 来自 aqtinstall 脚本的 Qt SDK 包
+
+[aqtinstall](https://github.com/miurahr/aqtinstall) 安装的 Qt SDK 是完全基于官方 SDK 结构的,所以 xmake 也完全支持。
+
+但是,通常需要自己指定 SDK 路径。
+
+```bash
+$ xmake f --qt=[Qt SDK]
+```
+
+#### 来自 xmake-repo 仓库的 Qt 包
+
+xmake 现在官方提供了 Qt5 SDK 的各种模块包,可以自动集成使用,无需任何手动安装。
+
+只需要配置集成包就行了,xmake 会自动处理 Qt 的安装集成,并且自动编译项目。
+
+```lua
+add_rules("mode.debug", "mode.release")
+
+add_requires("qt5widgets")
+
+target("test")
+    add_rules("qt.widgetapp")
+    add_packages("qt5widgets")
+
+    add_headerfiles("src/*.h")
+    add_files("src/*.cpp")
+    add_files("src/mainwindow.ui")
+    -- add files with Q_OBJECT meta (only for qt.moc)
+    add_files("src/mainwindow.h")
+```
+
+除了 `qt5widgets` 包,仓库还提供了 `qt5gui`, `qt5network` 等包,可以使用。
+
+配置完,只需要执行:
+
+```bash
+$ xmake
+```
+
+!> Qt6 的包还在开发中,暂时仅仅只支持 Qt5
+
+#### 来自 vcpkg/conan 的 Qt 包
+
+暂时还没时间支持,请尽量使用上面的方式集成 Qt SDK。
+
 ## WDK驱动程序
 
 默认会自动探测wdk所在环境,当然也可以指定wdk sdk环境目录: