Skip to content

Commit

Permalink
Fix Travis deployment for Windows
Browse files Browse the repository at this point in the history
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
doloopuntil committed May 8, 2020
1 parent e0131c9 commit 8e544e5
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 74 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ ui_*.h
moc_predefs.h
src/res/qrc_resources.cpp
windows/ASIOSDK2
windows/VC_redist.x64.exe
windows/vc_redist.x86.exe
windows/NSIS
debug/
release/
build/
Expand Down
54 changes: 21 additions & 33 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,37 +44,25 @@ matrix:
# on:
# repo: corrados/jamulus
# tags: true
# - os: windows
# before_install:
# - dir C:/Program\ Files\ \(x86\)/Windows\ Kits/10/bin/10.0.17134.0/x64
# - cmd.exe /C 'cd && "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat"
# x86 && cd && cd "C:/Users/travis/build/corrados/jamulus/windows" && dir'
# - curl -vLO http://download.qt.io/official_releases/online_installers/qt-unified-windows-x86-online.exe
# - curl -vLO http://www.steinberg.net/sdk_downloads/ASIOSDK2.3.2.zip
# - unzip ASIOSDK2.3.2.zip
# - mkdir ASIOSDK2
# - cp -rvu ASIOSDK2.3.2/* ASIOSDK2
# - pwd
# - mv qt-unified-windows-x86-online.exe windows
# - mv ASIOSDK2 windows
# - cd windows
# - "./qt-unified-windows-x86-online.exe --verbose --script qt-installer-windows.qs"
# - ls -la C:/Qt/5.12.3/msvc2017/bin/qtenv2.bat
# script:
# - cmd.exe /C 'cd && "C:\Qt\5.12.3\msvc2017\bin\qtenv2.bat" && cd && "C:\Program
# Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat"
# x86 && cd "C:\Users\travis\build\corrados\jamulus" && cd && qmake Jamulus.pro
# && nmake'
# #deploy function is only available in travis-ci.com (not free) but not in travis-ci.org (free)
# #deploy:
# # provider: releases
# # api_key:
# # secure: aQ93/8XU3HEGTif0/rSiF+gcm4uRhyWFdr3Va50BprwQOrZkNg8zIMwIKKODwjLDqxaH4msgNYutcr/VLdLjo4YP43It0UIfv3LGa2VFAkFhuQurMXZlVyx8RhIGLjIaWVWN1GCbNdAQwWNNo2mAkEdRaBrj/26geZotGcYZiztGwTAdy0t/vyYjO1sLZdBKcf7dJ06Pm2ktZO/rDyE4UtCTQiRfqLCKsQ/SILbewOMG/auaSUdU0utsbvXxr+dCzqBPwdSSptWqhIORXORL5oPn6242URzIJkmw5XPwhSabhdbzUjCIN9E24z1vp+cffAohuGXyXXZy9/bGeKa0mXfAaXV+TnJkpMd+i3fN5dY+vhFrlLOpRojRK6NqvaMID6tcNNtZMmFSgaZGyCUJQn4/0X+LdPwvK3/dXY+qElJW62QiJmQAt9OBGcq8EFqQDmEtRivRlbpbERsd/IJoOxP7nI2T00g04uV543ZmhU4fmGw6MVPAlIGRsBECjB0AMTp+3xW3OaUp7jy3WZpZXRrXNI41nZogrxhevPME1BRNk3V+MWQo8R3C+bIaCa5Um/3DZxnMxZgXjI9yzzR7Z8f4RWaQCKjXx41/pk7jxm1TcEyBfRVsb313l/fRLg+fjCmaEnnxu43333XGIv4eIyAGDR8ydF2VpmyP2ejzh8I=
# # file:
# # - Jamulus.exe
# # skip_cleanup: true
# # on:
# # repo: corrados/jamulus
# # tags: true

- os: windows
env:
# QT_ACCOUNT_USERNAME and QT_ACCOUNT_PASSWORD variables for Qt registration at install time
- secure: WlWyUMU53vGPwZ340bZZy3PVJJfuFZ8gegyLHGYXo1Hp++BCtHJ5FH2kVYxW0pUNqKobkrlGdNMLrhfDD5qATj6TqbRTQr/XKqK5Qhe8sf7Ag/Z+AUjguED7QL0th2Ll6eBlSc9ayrQfvCjvzmyFXGB85iXvuJlbqUCya6xRyiflq37KimLGjx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AH45ShiiMIMOk9HP9zKnDnyG6hI0q9wPFxWrkc3RZpRmQO1S9QjB2gD3cWiVMNTBYI+XNOqZEUicTc4XwOByf8bm5SyH4H1+8o1RytgbEZY=
before_install:
- curl -vL -o "${TEMP}/qt-installer.exe" http://download.qt.io/official_releases/online_installers/qt-unified-windows-x86-online.exe
- "${TEMP}/qt-installer.exe --verbose --script ./windows/qt-installer-windows.qs"
script:
- powershell -ExecutionPolicy ByPass -Command "./windows/deploy_windows.ps1"
#deploy function is only available in travis-ci.com (not free) but not in travis-ci.org (free)
#deploy:
# provider: releases
# api_key:
# secure: aQ93/8XU3HEGTif0/rSiF+gcm4uRhyWFdr3Va50BprwQOrZkNg8zIMwIKKODwjLDqxaH4msgNYutcr/VLdLjo4YP43It0UIfv3LGa2VFAkFhuQurMXZlVyx8RhIGLjIaWVWN1GCbNdAQwWNNo2mAkEdRaBrj/26geZotGcYZiztGwTAdy0t/vyYjO1sLZdBKcf7dJ06Pm2ktZO/rDyE4UtCTQiRfqLCKsQ/SILbewOMG/auaSUdU0utsbvXxr+dCzqBPwdSSptWqhIORXORL5oPn6242URzIJkmw5XPwhSabhdbzUjCIN9E24z1vp+cffAohuGXyXXZy9/bGeKa0mXfAaXV+TnJkpMd+i3fN5dY+vhFrlLOpRojRK6NqvaMID6tcNNtZMmFSgaZGyCUJQn4/0X+LdPwvK3/dXY+qElJW62QiJmQAt9OBGcq8EFqQDmEtRivRlbpbERsd/IJoOxP7nI2T00g04uV543ZmhU4fmGw6MVPAlIGRsBECjB0AMTp+3xW3OaUp7jy3WZpZXRrXNI41nZogrxhevPME1BRNk3V+MWQo8R3C+bIaCa5Um/3DZxnMxZgXjI9yzzR7Z8f4RWaQCKjXx41/pk7jxm1TcEyBfRVsb313l/fRLg+fjCmaEnnxu43333XGIv4eIyAGDR8ydF2VpmyP2ejzh8I=
# file:
# - Jamulus.exe
# skip_cleanup: true
# on:
# repo: corrados/jamulus
# tags: true

112 changes: 73 additions & 39 deletions windows/qt-installer-windows.qs
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:

0 comments on commit 8e544e5

Please sign in to comment.