简体   繁体   English

如何从一组 qt 文件中获取 .pro 文件

[英]How to get .pro file from the set of qt files

I was trying to modify the source code of this open source project https://github.com/haiwen/seafile-client As I can see it contains .ui, .qrc etc files which is used in Qt, but there is no .pro files present in his repository.我试图修改这个开源项目的源代码https://github.com/haiwen/seafile-client正如我所见,它包含 Qt 中使用的.ui, .qrc等文件,但没有.pro文件存在于他的存储库中。 So how to get the .pro file for this repository code.那么如何获取此存储库代码的.pro文件。 Any idea?任何想法?

That was the Cmake project , you should install CMake in your system and build it like this :那是Cmake项目,你应该在你的系统中安装 CMake 并像这样构建它:

cmake .
make
make install

OR use CMakeLists.txt instead of .pro .或者使用CMakeLists.txt而不是.pro

You can use qmake to generate the .pro file for this repository.您可以使用qmake为这个存储库生成.pro文件。 Just do the following steps:只需执行以下步骤:

  1. Clone the repo .克隆repo
  2. cd into the repo cdrepo
  3. Run the following command运行以下命令
qmake -project -r *

It will repeatedly look into the directory and it's sub-directory files and will generate required .pro file for you.它将反复查看目录及其子目录文件,并为您生成所需的.pro文件。 You can learn more about this at below given link: https://doc.qt.io/qt-5/qmake-running.html#project-mode-options您可以在以下给定链接中了解更多信息: https : //doc.qt.io/qt-5/qmake-running.html#project-mode-options

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM