Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt linux online installer 3.0.2 - my unattended script broken
Forum Updated to NodeBB v4.3 + New Features

Qt linux online installer 3.0.2 - my unattended script broken

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
3 Posts 2 Posters 1.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    magist3r
    wrote on last edited by
    #1

    Hi.
    I have js script to install qt on headless server something like this:
    ./qt-unified-linux-x64-online.run --platform minimal --script ./qt5-unattended-install.js

    My script:

    function Controller() {
        installer.autoRejectMessageBoxes();
        installer.installationFinished.connect(function() {
            gui.clickButton(buttons.NextButton);
        })
    }
    
    Controller.prototype.WelcomePageCallback = function() {
        gui.clickButton(buttons.NextButton);
    }
    
    Controller.prototype.CredentialsPageCallback = function() {
        gui.clickButton(buttons.NextButton);
    }
    
    Controller.prototype.IntroductionPageCallback = function() {
        gui.clickButton(buttons.NextButton);
    }
    
    Controller.prototype.TargetDirectoryPageCallback = function()
    {
        gui.currentPageWidget().TargetDirectoryLineEdit.setText(installer.value("HomeDir") + "/Qt5");
        gui.clickButton(buttons.NextButton);
    }
    
    Controller.prototype.ComponentSelectionPageCallback = function() {
        var widget = gui.currentPageWidget();
    
        widget.deselectAll();
        widget.selectComponent("qt.56.gcc_64");
    
        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);
    }
    

    But with new online installer 3.0.2 this script doesn't work anymore. I run this script on machine with graphics and see that installer stucks on first (welcome) page. For some reason the Next button on Welcome page is disabled immediately after start and gets enabled after few seconds. I have no idea how to catch the moment when it happens and click Next button from script.
    Thoughts?

    1 Reply Last reply
    1
    • S Offline
      S Offline
      Skycoder
      wrote on last edited by
      #2

      I encountered this problem too.

      The solution is to delay the next clicks, like this:

      gui.clickButton(buttons.NextButton, 3000);
      

      This code will click the button after 3 seconds, which should be long enough.

      1 Reply Last reply
      3
      • M Offline
        M Offline
        magist3r
        wrote on last edited by magist3r
        #3

        Wow! How did I miss that second argument in doc?!
        Thanks a lot!

        1 Reply Last reply
        1

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved