From 58fb7a62e69faa0df45902c1e2e8fa7be0af9396 Mon Sep 17 00:00:00 2001 From: MoonFeather Date: Fri, 26 Jul 2024 17:32:28 +0800 Subject: [PATCH] chore: Update README.md with deployment instructions for Windows Co-authored-by: Dylan Liu --- README(zh-cn).md | 10 ++++++++++ README.md | 11 +++++++++++ 2 files changed, 21 insertions(+) diff --git a/README(zh-cn).md b/README(zh-cn).md index b9c6008..448cc0d 100644 --- a/README(zh-cn).md +++ b/README(zh-cn).md @@ -102,6 +102,16 @@ RibbonUI是一个参考微软Ribbon风格(即Office 2016后的风格)设计 # -DCMAKE_PREFIX_PATH={你的Qt安装目录} cmake --build . --target all --config Release --parallel ``` + - 运行或部署 + + ***在其它系统中,编译过后生成的应用可以直接运行,但在Windows上需要先使用Qt的`bin`目录下的`windeployqt.exe`部署相关必需库后才可以不通过`Qt Creator`而直接在编译目录下双击可执行文件运行。*** + + ```powershell + #build文件夹下 + cd app\release + C:\Qt\6.6.3\mingw_64\bin\windeployqt.exe --qmldir C:\Qt\6.6.3\mingw_64\qml .\RibbonUI-APP.exe + #指定"--qmldir"参数是必须的 + ``` + 在其他项目中使用RibbonUI - 遵循***编译例程和库***的下载仓库和进入build目录步骤 - 在CMakeLists.txt中加入以下语句 diff --git a/README.md b/README.md index 13251b4..96db35a 100644 --- a/README.md +++ b/README.md @@ -101,6 +101,17 @@ The current design is based on Qt 6, and it support for Qt 5 as well(***ONLY sup # -DCMAKE_PREFIX_PATH={YOUR QT INSTALL FOLDER} cmake --build . --target all --config Release --parallel ``` + - Run or Deploy + + ***On the other system, you could directly start the app after the build process, while you have to use `windeployqt.exe` in Qt's `bin` directory to deploy the required libs first on Windows if you want to click to run rather than through `Qt Creator`.*** + + ```powershell + #in the build folder + cd app\release + C:\Qt\6.6.3\mingw_64\bin\windeployqt.exe --qmldir C:\Qt\6.6.3\mingw_64\qml .\RibbonUI-APP.exe + #"--qmldir" is essential. + ``` + + Use library with other project - Follow the same steps like clone and enter build folder as ***Compile the example and library*** - Add the following code to your CMakeLists.txt