Page MenuHomePhabricator

Unattended Qt installation
Closed, DuplicatePublic

Description

In order to run MITK on systems with no graphical user interface, a headless Qt install is required.

We have a script for unattended Qt installation.
However, there are multiple options to do a headless unattended Qt installation so in this task we will show the results of different variants.

For more information, see:

Event Timeline

kalali triaged this task as Normal priority.Nov 26 2019, 5:54 PM
kalali created this task.

Currently, the script is unfortunately the only option until Qt 6 possibly introduces package management. BTW, we should create a CI or FS-E scripts repository were I can push my script. Currently I am working on the script to also install the correct Visual Studio runtime on clean clients. Also OpenSSL is included in the latest installers but has to be selected explicitly.

kislinsk renamed this task from Install Qt via command line to Unattended Qt installation.Nov 28 2019, 10:53 AM
kislinsk claimed this task.

+1 for accessing the script online for Azure.

Here is the currently working script.

You want to edit at least the text values of EmailLineEdit and PasswordLineEdit (have to be valid Qt account credentials).

The target directory is set as text of TargetDirectoryLineEdit, Qt components (including Qt version) are added in lines containing selectComponent.

unattended.qs
function Controller() {
  gui.pageWidgetByObjectName("WelcomePage").completeChanged.connect(function() {
    gui.clickButton(buttons.NextButton);
  });

  installer.installationFinished.connect(function() {
    gui.clickButton(buttons.CommitButton);
  });
}

Controller.prototype.WelcomePageCallback = function() {
}

Controller.prototype.CredentialsPageCallback = function() {
  var loginWidget = gui.currentPageWidget().loginWidget;

  loginWidget.EmailLineEdit.text = "...@dkfz-heidelberg.de";
  loginWidget.PasswordLineEdit.text = "...";

  gui.clickButton(buttons.NextButton);
}

Controller.prototype.ObligationsPageCallback = function()
{
  var obligationsPage = gui.currentPageWidget();
  var companyNameLineEdit = gui.findChild(obligationsPage, "CompanyName");

  obligationsPage.obligationsAgreement.setChecked(true);

  if (null != companyNameLineEdit) {
    companyNameLineEdit.text = "German Cancer Research Center (DKFZ)";
  }

  obligationsPage.completeChanged();

  gui.clickButton(buttons.NextButton);
}

Controller.prototype.IntroductionPageCallback = function() {
  gui.clickButton(buttons.NextButton);
}

Controller.prototype.DynamicTelemetryPluginFormCallback = function() {
  var disableStatisticRadioButton = gui.findChild(gui.currentPageWidget(), "disableStatisticRadioButton");

  if (null != disableStatisticRadioButton) {
    disableStatisticRadioButton.checked = true;
  }

  gui.clickButton(buttons.NextButton);
}

Controller.prototype.TargetDirectoryPageCallback = function() {
  gui.currentPageWidget().TargetDirectoryLineEdit.text = "/home/ubuntu/Qt";
  gui.clickButton(buttons.NextButton);
}

Controller.prototype.ComponentSelectionPageCallback = function() {
  var componentSelectionPage = gui.currentPageWidget();
  var archiveCheckBox = gui.findChild(componentSelectionPage, "Archive");
  var fetchCategoryButton = gui.findChild(componentSelectionPage, "FetchCategoryButton");

  if (null != archiveCheckBox && null != fetchCategoryButton) {
    archiveCheckBox.checked = true;
    fetchCategoryButton.click();
  }

  componentSelectionPage.deselectAll();
  componentSelectionPage.selectComponent("qt.qt5.5129.gcc_64");
  componentSelectionPage.selectComponent("qt.qt5.5129.qtscript");
  componentSelectionPage.selectComponent("qt.qt5.5129.qtwebengine");

  gui.clickButton(buttons.NextButton);
}

Controller.prototype.LicenseAgreementPageCallback = function() {
  gui.currentPageWidget().AcceptLicenseRadioButton.checked = true;
  gui.clickButton(buttons.NextButton);
}

Controller.prototype.StartMenuDirectoryPageCallback = function() {
  gui.clickButton(buttons.NextButton);
}

Controller.prototype.ReadyForInstallationPageCallback = function() {
  gui.clickButton(buttons.CommitButton);
}

Controller.prototype.PerformInstallationPageCallback = function() {
}

Controller.prototype.FinishedPageCallback = function() {
  var runItCheckBox = gui.findChild(gui.currentPageWidget(), "launchQtCreatorCheckBox");

  if (null != runItCheckBox) {
    runItCheckBox.checked = false;
  }

  gui.clickButton(buttons.FinishButton);
}

This seems to be superfluous if {T27960} works for us.

Yes. In fact, this task can already be closed as it doesn't work anymore. :-)

kislinsk closed this task as a duplicate of Restricted Maniphest Task.Nov 16 2020, 10:12 AM
kalali moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.