我在搜索5.8安装中的XML文件时,在名为
components.xml
的文件中找到了Windows标签值之一。在查看了整个文件后,我发现这个文件是由你在安装过程中所做的选择来生成的。因此,我安装了最新发布的Qt(5.9.0),除了我知道其中一个组件标签为
"qt.59.src"
以外,其他都进行了完整安装。
关于直接UI元素检查以获取这些信息,我尝试了
gui-inspect-tool库中的所有UI检查工具,但它们都不起作用。
UISpy.exe
提供了最多的信息,但非常不稳定。看起来Qt没有将其组件名称传播到“名称”字段,以便与WinAPI和本机Windows UI检查器轻松使用。 所有“名称”字段要么为空字符串,要么从所有UI检查工具返回错误。
安装完后,您可以在基本的Qt安装目录中打开components.xml。然后在整个文件中搜索术语
Prebuilt
。每个匹配项将带您进入一个描述字段,而上面两行则是您需要的名称字段。在5.9中,我认为对于预构建的二进制文件有一个例外,即(已弃用)Qt Script。
以下是components.xml中一个软件包的示例:
<Package>
<Name>qt.59.android_armv7</Name>
<Title>Android ARMv7</Title>
<Description>Qt 5.9.0 Prebuilt Components for Android ARMv7</Description>
<Version>5.9.0-0</Version>
<LastUpdateDate></LastUpdateDate>
<InstallDate>2017-06-16</InstallDate>
<Size>145381493</Size>
<Dependencies>qt.tools.qtcreator,qt.59.doc,qt.59.examples,qt.tools.win32_mingw530</Dependencies>
<Checkable>true</Checkable>
</Package>
<Name>
是您的QS文件中实际要使用的组件字符串,例如:qt.59.android_armv7
Controller.prototype.ComponentSelectionPageCallback = function() {
var widget = gui.currentPageWidget();
widget.selectAll();
widget.deselectComponent("qt.59.android_armv7");
gui.clickButton(buttons.NextButton);
}
为了节省一些人的时间,如果您正在使用5.9或类似结构的安装程序,以下是各种预构建平台的所有标签名称:
Android ARMv7: "qt.59.android_armv7"
Android x86: "qt.59.android_x86"
MinGW 5.3.0 32位: "qt.59.win32_mingw53"
msvc2017 64位: "qt.59.win64_msvc2017_64"
msvc2015 32位: "qt.59.win32_msvc2015"
msvc2015 64位: "qt.59.win64_msvc2015_64"
msvc2013 64位: "qt.59.win64_msvc2013_64"
UWP x64 (MSVC2015): "qt.59.win64_msvc2015_winrt_x64"
UWP x64 (MSVC2017): "qt.59.win64_msvc2017_winrt_x64"
UWP x86 (MSVC2015): "qt.59.win64_msvc2015_winrt_x86"
UWP x86 (MSVC2017): "qt.59.win64_msvc2017_winrt_x86"
UWP armv7 (MSVC2015): "qt.59.win64_msvc2015_winrt_armv7"
UWP armv7 (MSVC2017): "qt.59.win64_msvc2017_winrt_armv7"
作为进一步的礼貌,这里是所有组件的转储。其中一些实际上是您选择的组件的依赖项,因此您的使用体验可能会有所不同。
"qt"
"qt.59"
"qt.59.android_armv7"
"qt.59.android_x86"
"qt.59.doc"
"qt.59.doc.qtcharts"
"qt.59.doc.qtdatavis3d"
"qt.59.doc.qtnetworkauth"
"qt.59.doc.qtpurchasing"
"qt.59.doc.qtremoteobjects"
"qt.59.doc.qtscript"
"qt.59.doc.qtspeech"
"qt.59.doc.qtvirtualkeyboard"
"qt.59.doc.qtwebengine"
"qt.59.examples"
"qt.59.examples.qtcharts"
"qt.59.examples.qtdatavis3d"
"qt.59.examples.qtnetworkauth"
"qt.59.examples.qtpurchasing"
"qt.59.examples.qtremoteobjects"
"qt.59.examples.qtscript"
"qt.59.examples.qtspeech"
"qt.59.examples.qtvirtualkeyboard"
"qt.59.examples.qtwebengine"
"qt.59.qtcharts"
"qt.59.qtcharts.android_armv7"
"qt.59.qtcharts.android_x86"
"qt.59.qtcharts.win32_mingw53"
"qt.59.qtcharts.win32_msvc2015"
"qt.59.qtcharts.win64_msvc2013_64"
"qt.59.qtcharts.win64_msvc2015_64"
"qt.59.qtcharts.win64_msvc2015_winrt_armv7"
"qt.59.qtcharts.win64_msvc2015_winrt_x64"
"qt.59.qtcharts.win64_msvc2015_winrt_x86"
"qt.59.qtcharts.win64_msvc2017_64"
"qt.59.qtcharts.win64_msvc2017_winrt_armv7"
"qt.59.qtcharts.win64_msvc2017_winrt_x64"
"qt.59.qtcharts.win64_msvc2017_winrt_x86"
"qt.59.qtdatavis3d"
"qt.59.qtdatavis3d.android_armv7"
"qt.59.qtdatavis3d.android_x86"
"qt.59.qtdatavis3d.win32_mingw53"
"qt.59.qtdatavis3d.win32_msvc2015"
"qt.59.qtdatavis3d.win64_msvc2013_64"
"qt.59.qtdatavis3d.win64_msvc2015_64"
"qt.59.qtdatavis3d.win64_msvc2015_winrt_armv7"
"qt.59.qtdatavis3d.win64_msvc2015_winrt_x64"
"qt.59.qtdatavis3d.win64_msvc2015_winrt_x86"
"qt.59.qtdatavis3d.win64_msvc2017_64"
"qt.59.qtdatavis3d.win64_msvc2017_winrt_armv7"
"qt.59.qtdatavis3d.win64_msvc2017_winrt_x64"
"qt.59.qtdatavis3d.win64_msvc2017_winrt_x86"
"qt.59.qtnetworkauth"
"qt.59.qtnetworkauth.android_armv7"
"qt.59.qtnetworkauth.android_x86"
"qt.59.qtnetworkauth.win32_mingw53"
"qt.59.qtnetworkauth.win32_msvc2015"
"qt.59.qtnetworkauth.win64_msvc2013_64"
"qt.59.qtnetworkauth.win64_msvc2015_64"
"qt.59.qtnetworkauth.win64_msvc2015_winrt_armv7"
"qt.59.qtnetworkauth.win64_msvc2015_winrt_x64"
"qt.59.qtnetworkauth.win64_msvc2015_winrt_x86"
"qt.59.qtnetworkauth.win64_msvc2017_64"
"qt.59.qtnetworkauth.win64_msvc2017_winrt_armv7"
"qt.59.qtnetworkauth.win64_msvc2017_winrt_x64"
"qt.59.qtnetworkauth.win64_msvc2017_winrt_x86"
"qt.59.qtpurchasing"
"qt.59.qtpurchasing.android_armv7"
"qt.59.qtpurchasing.android_x86"
"qt.59.qtpurchasing.win32_mingw53"
"qt.59.qtpurchasing.win32_msvc2015"
"qt.59.qtpurchasing.win64_msvc2013_64"
"qt.59.qtpurchasing.win64_msvc2015_64"
"qt.59.qtpurchasing.win64_msvc2015_winrt_armv7"
"qt.59.qtpurchasing.win64_msvc2015_winrt_x64"
"qt.59.qtpurchasing.win64_msvc2015_winrt_x86"
"qt.59.qtpurchasing.win64_msvc2017_64"
"qt.59.qtpurchasing.win64_msvc2017_winrt_armv7"
"qt.59.qtpurchasing.win64_msvc2017_winrt_x64"
"qt.59.qtpurchasing.win64_msvc2017_winrt_x86"
"qt.59.qtremoteobjects"
"qt.59.qtremoteobjects.android_armv7"
"qt.59.qtremoteobjects.android_x86"
"qt.59.qtremoteobjects.win32_mingw53"
"qt.59.qtremoteobjects.win32_msvc2015"
"qt.59.qtremoteobjects.win64_msvc2013_64"
"qt.59.qtremoteobjects.win64_msvc2015_64"
"qt.59.qtremoteobjects.win64_msvc2015_winrt_armv7"
"qt.59.qtremoteobjects.win64_msvc2015_winrt_x64"
"qt.59.qtremoteobjects.win64_msvc2015_winrt_x86"
"qt.59.qtremoteobjects.win64_msvc2017_64"
"qt.59.qtremoteobjects.win64_msvc2017_winrt_armv7"
"qt.59.qtremoteobjects.win64_msvc2017_winrt_x64"
"qt.59.qtremoteobjects.win64_msvc2017_winrt_x86"
"qt.59.qtscript"
"qt.59.qtscript.android_armv7"
"qt.59.qtscript.android_x86"
"qt.59.qtscript.win32_mingw53"
"qt.59.qtscript.win32_msvc2015"
"qt.59.qtscript.win64_msvc2013_64"
"qt.59.qtscript.win64_msvc2015_64"
"qt.59.qtscript.win64_msvc2017_64"
"qt.59.qtspeech"
"qt.59.qtspeech.android_armv7"
"qt.59.qtspeech.android_x86"
"qt.59.qtspeech.win32_mingw53"
"qt.59.qtspeech.win32_msvc2015"
"qt.59.qtspeech.win64_msvc2013_64"
"qt.59.qtspeech.win64_msvc2015_64"
"qt.59.qtspeech.win64_msvc2017_64"
"qt.59.qtvirtualkeyboard"
"qt.59.qtvirtualkeyboard.win32_mingw53"
"qt.59.qtvirtualkeyboard.win32_msvc2015"
"qt.59.qtvirtualkeyboard.win64_msvc2013_64"
"qt.59.qtvirtualkeyboard.win64_msvc2015_64"
"qt.59.qtvirtualkeyboard.win64_msvc2017_64"
"qt.59.qtwebengine"
"qt.59.qtwebengine.win32_msvc2015"
"qt.59.qtwebengine.win64_msvc2015_64"
"qt.59.qtwebengine.win64_msvc2017_64"
"qt.59.src"
"qt.59.win32_mingw53"
"qt.59.win32_msvc2015"
"qt.59.win64_msvc2013_64"
"qt.59.win64_msvc2015_64"
"qt.59.win64_msvc2015_winrt_armv7"
"qt.59.win64_msvc2015_winrt_x64"
"qt.59.win64_msvc2015_winrt_x86"
"qt.59.win64_msvc2017_64"
"qt.59.win64_msvc2017_winrt_armv7"
"qt.59.win64_msvc2017_winrt_x64"
"qt.59.win64_msvc2017_winrt_x86"
"qt.enterpriseaddons"
"qt.enterpriseaddons.qtquickcompiler"
"qt.enterpriseaddons.qtquickcompiler.doc"
"qt.enterpriseaddons.qtquickcompiler.qt59.android_armv7"
"qt.enterpriseaddons.qtquickcompiler.qt59.android_x86"
"qt.enterpriseaddons.qtquickcompiler.qt59.win32_mingw53"
"qt.enterpriseaddons.qtquickcompiler.qt59.win32_msvc2015"
"qt.enterpriseaddons.qtquickcompiler.qt59.win64_msvc2013_64"
"qt.enterpriseaddons.qtquickcompiler.qt59.win64_msvc2015_64"
"qt.enterpriseaddons.qtquickcompiler.qt59.win64_msvc2015_winrt_armv7"
"qt.enterpriseaddons.qtquickcompiler.qt59.win64_msvc2015_winrt_x64"
"qt.enterpriseaddons.qtquickcompiler.qt59.win64_msvc2015_winrt_x86"
"qt.enterpriseaddons.qtquickcompiler.qt59.win64_msvc2017_64"
"qt.enterpriseaddons.qtquickcompiler.qt59.win64_msvc2017_winrt_armv7"
"qt.enterpriseaddons.qtquickcompiler.qt59.win64_msvc2017_winrt_x64"
"qt.enterpriseaddons.qtquickcompiler.qt59.win64_msvc2017_winrt_x86"
"qt.installer.changelog"
"qt.license.automotive"
"qt.license.embedded"
"qt.license.enterprise"
"qt.license.python"
"qt.tools"
"qt.tools.perl"
"qt.tools.qtcreator"
"qt.tools.qtcreator.enterprise.plugins"
"qt.tools.qtcreatorcdbext"
"qt.tools.vcredist_msvc2015_x64"
"qt.tools.vcredist_msvc2015_x86"
"qt.tools.win32_mingw530"
作为一个完整的功能,这是我用于我们Windows安装的实际功能:
Controller.prototype.ComponentSelectionPageCallback = function() {
var widget = gui.currentPageWidget();
widget.selectAll();
widget.deselectComponent("qt.59.android_x86");
widget.deselectComponent("qt.59.android_armv7");
widget.deselectComponent("qt.59.win32_mingw53");
widget.deselectComponent("qt.59.win64_msvc2013_64");
widget.deselectComponent("qt.59.win64_msvc2017_winrt_armv7");
widget.deselectComponent("qt.59.win64_msvc2015_winrt_armv7");
widget.deselectComponent("qt.59.src");
widget.deselectComponent("qt.tools.perl");
widget.deselectComponent("qt.tools.win32_mingw530");
gui.clickButton(buttons.NextButton);
}
如果你想了解如何从头开始编写这些脚本,可以查看此答案以开始:
https://dev59.com/Y18f5IYBdhLWcg3wB-7E#34032216
5.9.1更新:
更改所有具有
59.
的字符串为
591。
5.9.1; 如果您将相同的脚本用于5.9.0和5.9.1,则由于未取消选择正确的组件,它将尝试安装所有内容。
5.9.3 更新:
看起来他们很明智地坚持了5.9.1的相同约定,所以只需将
59
更改为
593
; 我假设对于5.9.2以及任何随后发布的5.9版本也是如此。