简体   繁体   English

如何从静态Qt运行qmake

[英]How to run qmake from the static Qt

For making a very simple Qt app "installable" on other systems, I'm using Qt Installer Framework following this link . 为了使一个非常简单的Qt应用程序“可安装”在其他系统上,我在此链接后面使用了Qt Installer Framework
In bottom, in Setting up Qt Installer Framework , number 1 orders to have Qt Installer Framework source code . 在底部的“ 设置Qt Installer Framework”中 ,编号1的命令具有Qt Installer Framework源代码 I downloaded it from here . 从这里下载的。 ( qt-installer-framework-opensource-2.0.1-src.zip ) qt-installer-framework-opensource-2.0.1-src.zip

Now I don't understand the next instruction there :( 现在我不明白那里的下一条指令:(
It says: 它说:
2- Build the tools by running the "qmake" from the static Qt, followed by "make" or "nmake". 2-通过从静态Qt运行“ qmake”,然后运行“ make”或“ nmake”来构建工具。

My question is, first what does it mean? 我的问题是,首先是什么意思?
And from what path? 从哪走?
I don't know how to do it:( 我不知道该怎么做:(

qmake comes with the qt-framework and is a make file generator. qmake带有qt-framework,是一个make文件生成器。 (an alternative to cmake). (替代cmake)。 You call qmake on a .pro file from your project. 您在项目中的.pro文件上调用qmake。 This .pro file have to contain your source code files project dependencies and more. .pro文件必须包含您的源代码文件项目依赖项以及更多内容。

Consider that you have a project folder with your source code and the .pro file. 考虑到您有一个包含源代码和.pro文件的项目文件夹。 Then you call the qmake command in this folder. 然后,在此文件夹中调用qmake命令。 qmake is an program itself, which you can find in the bin folder of your qt-installation. qmake本身就是一个程序,您可以在qt安装的bin文件夹中找到该程序。 If qmake is in your path variable, you go to the terminal, navigate to the specific folder and just write: 如果qmake在您的path变量中,请转到终端,导航到特定文件夹,然后编写:

qmake

After that qmake will create a makefile. 之后,qmake将创建一个makefile。 Then you could call make and your program will be build. 然后,您可以调用make ,然后将构建您的程序。

I hope my answer helps you. 希望我的回答对您有所帮助。 You can learn more about qmake on the website of Qt . 您可以在Qt网站上了解有关qmake的更多信息。 Here is also a very good qmake tutorial: klick 这也是一个非常好的qmake教程: klick

edit: 编辑:

how to call make on windows: download and install cygwin from 如何在Windows上调用make:从以下位置下载并安装cygwin

http://www.cygwin.com/setup-x86.exe - 32 bit installer or http://www.cygwin.com/setup-x86.exe-32位安装程序或

http://www.cygwin.com/setup-x86_64.exe - 64 bit installer. http://www.cygwin.com/setup-x86_64.exe-64位安装程序。

then start the Cygwin terminal (Cygwin.bat) and navigate to your folder and call 然后启动Cygwin终端(Cygwin.bat)并导航到您的文件夹并调用

make

and that will build your qt-installer! 这将建立您的qt安装程序!

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

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