Qt联机安装程序提取的元数据的最新更新进行了一些重大更改,这些更改破坏了我的Windows CI / CD安装脚本。
我已经解决了一个问题(绕过了统计信息收集屏幕-参见DynamicTelemetryPluginFormCallback
下文),但是我遇到了另一个问题。在“选择组件”屏幕上,默认选择的包类别现在只是LTS,似乎没有办法从脚本中更改它。这意味着我无法安装最新的Qt版本Qt 5.13.1。我不能使用5.12,因为它没有在我的应用程序中使用的Qt Controls 2 SplitView。这是我当前的安装脚本,部分源于此答案。在2019年10月8日之前运行良好:
function Controller() {
installer.autoRejectMessageBoxes();
installer.setMessageBoxAutomaticAnswer("installationErrorWithRetry", QMessageBox.Ignore);
installer.setMessageBoxAutomaticAnswer("installationError", QMessageBox.Ignore);
installer.installationFinished.connect(function() {
gui.clickButton(buttons.NextButton);
});
}
Controller.prototype.WelcomePageCallback = function() {
// click delay here because the next button is initially disabled for ~1 second
gui.clickButton(buttons.NextButton, 10000);
}
Controller.prototype.CredentialsPageCallback = function() {
gui.clickButton(buttons.NextButton);
}
Controller.prototype.IntroductionPageCallback = function() {
gui.clickButton(buttons.NextButton);
}
Controller.prototype.DynamicTelemetryPluginFormCallback = function() {
var widget = gui.currentPageWidget();
widget.TelemetryPluginForm.statisticGroupBox.disableStatisticRadioButton.checked = true;
gui.clickButton(buttons.NextButton);
}
Controller.prototype.TargetDirectoryPageCallback = function() {
gui.currentPageWidget().TargetDirectoryLineEdit.setText("C:\\Qt");
gui.clickButton(buttons.NextButton);
}
Controller.prototype.ComponentSelectionPageCallback = function() {
var widget = gui.currentPageWidget();
console.log(JSON.stringify(widget));
widget.ComponentsTreeView.
widget.deselectAll();
widget.selectComponent("qt.qt5.5131.win64_mingw73");
widget.selectComponent("qt.tools.win64_mingw730");
gui.clickButton(buttons.NextButton);
}
Controller.prototype.LicenseAgreementPageCallback = function() {
gui.currentPageWidget().AcceptLicenseRadioButton.setChecked(true);
gui.clickButton(buttons.NextButton);
}
Controller.prototype.StartMenuDirectoryPageCallback = function() {
gui.clickButton(buttons.NextButton);
}
Controller.prototype.ReadyForInstallationPageCallback = function() {
gui.clickButton(buttons.NextButton);
}
Controller.prototype.FinishedPageCallback = function() {
var checkBoxForm = gui.currentPageWidget().LaunchQtCreatorCheckBoxForm;
if (checkBoxForm && checkBoxForm.launchQtCreatorCheckBox) {
checkBoxForm.launchQtCreatorCheckBox.checked = false;
}
gui.clickButton(buttons.FinishButton);
}
我正在运行脚本 <path to installer>.exe --script <path to installer script>.qs --verbose
使用此安装脚本运行在线安装程序不会导致任何错误,但是不会安装qt.qt5.5131.win64_mingw73
。
我在Github上找到了一个可以解决我的问题的示例。我ComponentSelectionPageCallback
现在看起来像这样:
Controller.prototype.ComponentSelectionPageCallback = function() {
var page = gui.pageWidgetByObjectName("ComponentSelectionPage");
var checkBox = gui.findChild(page, "Latest releases");
var fetchButton = gui.findChild(page, "FetchCategoryButton");
checkBox.click();
fetchButton.click();
var widget = gui.currentPageWidget();
widget.deselectAll();
widget.selectComponent("qt.qt5.5131.win64_mingw73");
widget.selectComponent("qt.tools.win64_mingw730");
gui.clickButton(buttons.NextButton);
}
有关完整示例,请参见Github上的此文件。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句