forked from jamulussoftware/jamulus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the Qt installer automation script to account for the latest changes in the installation process. The Qt online installer now requires a valid Qt user account. Also use the updated Windows deployment script.
- Loading branch information
1 parent
e0131c9
commit 8e544e5
Showing
3 changed files
with
95 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,92 +1,126 @@ | ||
/* | ||
* Qt Installer script for a non-interactive installation of Qt5 on Windows. | ||
* Installs the 64-bit package if environment variable PLATFORM="x64". | ||
* | ||
* Run with: | ||
* qt-unified-windows-x86-online.exe --verbose --script qt_installer_windows.qs | ||
* | ||
* globals QInstaller, QMessageBox, buttons, gui, installer, console | ||
*/ | ||
|
||
// jshint strict:false | ||
/* globals QInstaller, QMessageBox, buttons, gui, installer, console */ | ||
|
||
// Run with: | ||
// .\qt-unified-windows-x86-3.0.4-online.exe --verbose --script tools\qt-installer-windows.qs | ||
|
||
// Look for Name elements in | ||
// https://download.qt.io/online/qtsdkrepository/windows_x86/desktop/qt5_5123/Updates.xml | ||
// Unfortunately it is not possible to disable deps like qt.tools.qtcreator | ||
var INSTALL_COMPONENTS = [ | ||
installer.environmentVariable("PLATFORM") == "x64" ? | ||
"qt.qt5.5123.win64_msvc2017_64" : | ||
"qt.qt5.5123.win32_msvc2017", | ||
]; | ||
|
||
function Controller() { | ||
// Continue on installing to an existing (possibly empty) directory. | ||
installer.setMessageBoxAutomaticAnswer("installationError", QMessageBox.Retry); | ||
installer.setMessageBoxAutomaticAnswer("installationErrorWithRetry", QMessageBox.Retry); | ||
installer.setMessageBoxAutomaticAnswer("DownloadError", QMessageBox.Retry); | ||
installer.setMessageBoxAutomaticAnswer("archiveDownloadError", QMessageBox.Retry); | ||
|
||
// Continue on installation to an existing (possibly empty) directory. | ||
installer.setMessageBoxAutomaticAnswer("OverwriteTargetDirectory", QMessageBox.Yes); | ||
// Continue at "SHOW FINISHED PAGE" | ||
|
||
// Continue at the end of the installation | ||
installer.installationFinished.connect(function() { | ||
console.log("installationFinished"); | ||
console.log("Step: InstallationFinished"); | ||
gui.clickButton(buttons.NextButton); | ||
}); | ||
} | ||
|
||
Controller.prototype.WelcomePageCallback = function() { | ||
|
||
Controller.prototype.WelcomePageCallback = function() | ||
{ | ||
console.log("Step: " + gui.currentPageWidget()); | ||
// At least for 3.0.4 immediately clicking Next fails, so wait a bit. | ||
// https://github.com/benlau/qtci/commit/85cb986b66af4807a928c70e13d82d00dc26ebf0 | ||
gui.clickButton(buttons.NextButton, 1000); | ||
}; | ||
|
||
Controller.prototype.CredentialsPageCallback = function() { | ||
Controller.prototype.CredentialsPageCallback = function() | ||
{ | ||
console.log("Step: " + gui.currentPageWidget()); | ||
|
||
var page = gui.pageWidgetByObjectName("CredentialsPage"); | ||
var username = installer.environmentVariable("QT_ACCOUNT_USERNAME"); | ||
var password = installer.environmentVariable("QT_ACCOUNT_PASSWORD"); | ||
page.loginWidget.EmailLineEdit.setText(username); | ||
page.loginWidget.PasswordLineEdit.setText(password); | ||
|
||
gui.clickButton(buttons.NextButton); | ||
}; | ||
|
||
Controller.prototype.IntroductionPageCallback = function() { | ||
Controller.prototype.IntroductionPageCallback = function() | ||
{ | ||
console.log("Step: " + gui.currentPageWidget()); | ||
gui.clickButton(buttons.NextButton); | ||
}; | ||
|
||
Controller.prototype.TargetDirectoryPageCallback = function() { | ||
Controller.prototype.ObligationsPageCallback = function() | ||
{ | ||
console.log("Step: " + gui.currentPageWidget()); | ||
|
||
var page = gui.pageWidgetByObjectName("ObligationsPage"); | ||
page.obligationsAgreement.setChecked(true); | ||
page.completeChanged(); | ||
gui.clickButton(buttons.NextButton); | ||
} | ||
|
||
Controller.prototype.DynamicTelemetryPluginFormCallback = function() | ||
{ | ||
console.log("Step: " + gui.currentPageWidget()); | ||
|
||
var page = gui.pageWidgetByObjectName("DynamicTelemetryPluginForm"); | ||
page.statisticGroupBox.disableStatisticRadioButton.setChecked(true); | ||
gui.clickButton(buttons.NextButton); | ||
} | ||
|
||
Controller.prototype.TargetDirectoryPageCallback = function() | ||
{ | ||
console.log("Step: " + gui.currentPageWidget()); | ||
// Keep default at "C:\Qt". | ||
//gui.currentPageWidget().TargetDirectoryLineEdit.setText("E:\\Qt"); | ||
gui.clickButton(buttons.NextButton); | ||
}; | ||
|
||
Controller.prototype.ComponentSelectionPageCallback = function() { | ||
console.log("Step: " + gui.currentPageWidget()); | ||
var page = gui.currentPageWidget(); | ||
page.deselectAll(); | ||
for (var i = 0; i < INSTALL_COMPONENTS.length; i++) { | ||
page.selectComponent(INSTALL_COMPONENTS[i]); | ||
} | ||
|
||
var selection = gui.pageWidgetByObjectName("ComponentSelectionPage"); | ||
gui.findChild(selection, "Latest releases").checked = false; | ||
gui.findChild(selection, "LTS").checked = true; | ||
gui.findChild(selection, "FetchCategoryButton").click(); | ||
|
||
// Look for Name elements in | ||
// https://download.qt.io/online/qtsdkrepository/windows_x86/desktop/qt5_5123/Updates.xml | ||
var widget = gui.currentPageWidget(); | ||
widget.deselectAll(); | ||
widget.selectComponent("qt.qt5.5123.win32_msvc2017"); | ||
widget.selectComponent("qt.qt5.5123.win64_msvc2017_64"); | ||
|
||
gui.clickButton(buttons.NextButton); | ||
}; | ||
} | ||
|
||
Controller.prototype.LicenseAgreementPageCallback = function() { | ||
Controller.prototype.LicenseAgreementPageCallback = function() | ||
{ | ||
console.log("Step: " + gui.currentPageWidget()); | ||
|
||
gui.currentPageWidget().AcceptLicenseRadioButton.setChecked(true); | ||
gui.clickButton(buttons.NextButton); | ||
}; | ||
|
||
Controller.prototype.StartMenuDirectoryPageCallback = function() { | ||
Controller.prototype.StartMenuDirectoryPageCallback = function() | ||
{ | ||
console.log("Step: " + gui.currentPageWidget()); | ||
gui.clickButton(buttons.NextButton); | ||
}; | ||
|
||
Controller.prototype.ReadyForInstallationPageCallback = function() { | ||
Controller.prototype.ReadyForInstallationPageCallback = function() | ||
{ | ||
console.log("Step: " + gui.currentPageWidget()); | ||
gui.clickButton(buttons.NextButton); | ||
}; | ||
|
||
Controller.prototype.FinishedPageCallback = function() { | ||
Controller.prototype.FinishedPageCallback = function() | ||
{ | ||
console.log("Step: " + gui.currentPageWidget()); | ||
// TODO somehow the installer crashes after this step. | ||
// https://stackoverflow.com/questions/25105269/silent-install-qt-run-installer-on-ubuntu-server | ||
|
||
var checkBoxForm = gui.currentPageWidget().LaunchQtCreatorCheckBoxForm; | ||
if (checkBoxForm && checkBoxForm.launchQtCreatorCheckBox) { | ||
checkBoxForm.launchQtCreatorCheckBox.checked = false; | ||
} | ||
gui.clickButton(buttons.FinishButton); | ||
}; | ||
|
||
// vim: set ft=javascript: |