Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/qt/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Qt安装程序脚本API:无法在联机安装程序中选择最新的Qt版本_Qt_Qt5_Qt Installer - Fatal编程技术网

Qt安装程序脚本API:无法在联机安装程序中选择最新的Qt版本

Qt安装程序脚本API:无法在联机安装程序中选择最新的Qt版本,qt,qt5,qt-installer,Qt,Qt5,Qt Installer,Qt online安装程序最近对元数据进行了更新,对元数据进行了一些重大更改,这些更改破坏了我的Windows CI/CD安装脚本 我绕过统计数据收集屏幕解决了一个问题-请参阅下面的DynamicTelemetryPluginFormCallback,但我遇到了另一个问题。在SelectComponents屏幕上,默认选择的包类别现在只是LTS,并且似乎没有办法从脚本中更改它。这意味着我无法安装最新的Qt版本Qt 5.13.1。我不能使用5.12,因为它没有我在应用程序中使用的。这是我当前的安装

Qt online安装程序最近对元数据进行了更新,对元数据进行了一些重大更改,这些更改破坏了我的Windows CI/CD安装脚本

我绕过统计数据收集屏幕解决了一个问题-请参阅下面的DynamicTelemetryPluginFormCallback,但我遇到了另一个问题。在SelectComponents屏幕上,默认选择的包类别现在只是LTS,并且似乎没有办法从脚本中更改它。这意味着我无法安装最新的Qt版本Qt 5.13.1。我不能使用5.12,因为它没有我在应用程序中使用的。这是我当前的安装程序脚本,部分源于。2019年10月8日前工作正常:

功能控制器{ 安装程序。自动弹出消息框; installer.SetMessageBoxAutomaticanswerinInstallationErrorWithRetry,QMessageBox.Ignore; installer.SetMessageBoxAutomaticanSwerinInstallationError,QMessageBox.Ignore; installer.installationFinished.connectfunction{ gui.clickButtons.NextButton; }; } Controller.prototype.WelcomePageCallback=函数{ //单击此处的延迟,因为“下一步”按钮最初被禁用约1秒 gui.clickButtonbuttons.NextButton,10000; } Controller.prototype.CredentialsPageCallback=函数{ gui.clickButtons.NextButton; } Controller.prototype.IntroductionPageCallback=函数{ gui.clickButtons.NextButton; } Controller.prototype.DynamicTelemetryPluginFormCallback=函数{ var widget=gui.currentPageWidget; widget.TelemetryPlugInfo.statisticGroupBox.disableStatisticRadioButton.checked=true; gui.clickButtons.NextButton; } Controller.prototype.TargetDirectoryPageCallback=函数{ gui.currentPageWidget.TargetDirectoryLineEdit.setTextC:\\Qt; gui.clickButtons.NextButton; } Controller.prototype.ComponentSelectionPageCallback=函数{ var widget=gui.currentPageWidget; console.logJSON.stringifywidget; widget.ComponentsTreeView。 widget.all; widget.selectComponentqt.qt5.5131.win64_mingw73; widget.selectComponentqt.tools.win64_mingw730; gui.clickButtons.NextButton; } Controller.prototype.LicenseAgreementPageCallback=函数{ gui.currentPageWidget.AcceptLicenseRadioButton.setCheckedtrue; gui.clickButtons.NextButton; } Controller.prototype.StartMenuDirectoryPageCallback=函数{ gui.clickButtons.NextButton; } Controller.prototype.ReadyForInstallationPageCallback=函数{ gui.clickButtons.NextButton; } Controller.prototype.FinishedPageCallback=函数{ var checkBoxForm=gui.currentPageWidget.LaunchQtCreatorCheckBoxForm; 如果checkBoxForm&&checkBoxForm.launchQtCreatorCheckBox{ checkBoxForm.launchQtCreatorCheckBox.checked=false; } gui.clickbuttons.FinishButton; } 我正在使用.exe-script.qs-verbose运行脚本


使用此安装脚本运行联机安装程序不会导致任何错误,但它不会安装qt.qt5.5131.win64_mingw73。

我在Github上找到了一个解决我的问题的示例。我的ComponentSelectionPageCallback现在如下所示:

Controller.prototype.ComponentSelectionPageCallback=函数{ var page=gui.pageWidgetByObjectNameComponentSelectionPage; var checkBox=gui.findChildpage,最新版本; var fetchButton=gui.findChildpage,FetchCategoryButton; 复选框。单击; fetchButton.click; var widget=gui.currentPageWidget; widget.all; widget.selectComponentqt.qt5.5131.win64_mingw73; widget.selectComponentqt.tools.win64_mingw730; gui.clickButtons.NextButton; }
请参阅以获取完整的示例。

您不能直接从下载吗?我可能遗漏了一些内容,但我认为这仍然是一个安装程序,我仍然需要将其自动化。我使用在线安装程序是因为我在本例中的CI/CD服务器Github操作一直挂在非常大的下载上,包括该安装程序。出于这个原因,我实际上还没有检查离线安装程序,看看它是否有不同的行为,事后看来很可能是这样。即使Github操作没有,我仍然希望避免下载完整的5.13.1安装程序,因为我不需要下载的大部分内容。子模块在子模块/子目录中提供