最近Qt在线安装程序的元数据更新导致了一些重大变化,这破坏了我的Windows CI/CD安装脚本。我已经解决了一个问题(绕过统计收集屏幕-请参见下面的
DynamicTelemetryPluginFormCallback
),但我遇到了另一个问题。在“选择组件”屏幕上,默认选中的软件包类别只是LTS,似乎没有办法从脚本中更改它。这意味着我无法安装最新版本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);
}
我正在使用<安装程序路径>.exe --script <安装程序脚本路径>.qs --verbose
运行脚本。
使用此安装脚本运行在线安装程序不会导致任何错误,但是它只是没有安装qt.qt5.5131.win64_mingw73
。