function Controller() { installer.setUpdater() installer.currentPageChanged.connect( function() { var pageName = gui.currentPageWidget().objectName; var pagePrettyTitle = gui.currentPageWidget().title; console.log("At page: " + pageName + " ('" + pagePrettyTitle + "')"); if (pageName == "CredentialsPage") { // Wait for recognition that the account data is there var connection = gui.currentPageWidget().completeChanged.connect(function() { var pageName = gui.currentPageWidget().objectName; if (pageName == "CredentialsPage") { if (gui.isButtonEnabled(buttons.NextButton)) gui.clickButton(buttons.NextButton); //gui.currentPageWidget().completeChanged.disconnect(connection); } }); } // if (pageName == "CredentialsPage") { else if (pageName != "ComponentSelectionPage" && pageName != "FinishedPage" && pageName != "PerformInstallationPage") { if (gui.isButtonEnabled(buttons.NextButton)) gui.clickButton(buttons.NextButton); } }) installer.finishButtonClicked.connect(this, function() { // installer.componentByName("qt.tools.qtcreator_gui").qtCreatorBinaryPath // ^^ does not work - so implement it here again // adding the checkbox would work value = installer.value("TargetDir"); if (installer.value("os") == "win") { qtCreatorBinaryPath = value + "\\Tools\\QtCreator\\bin\\qtcreator.exe"; qtCreatorBinaryPath = qtCreatorBinaryPath.replace(/\//g, "\\"); } else if (installer.value("os") == "mac") { qtCreatorBinaryPath = value + "/Qt Creator.app"; // fix duplicate forward slashes in path qtCreatorBinaryPath = qtCreatorBinaryPath.replace(/\/+/g, "/"); } else { qtCreatorBinaryPath = value + "/Tools/QtCreator/bin/qtcreator"; // fix duplicate forward slashes in path qtCreatorBinaryPath = qtCreatorBinaryPath.replace(/\/+/g, "/"); } if (installer.fileExists(qtCreatorBinaryPath)) { if (installer.value("os") == "mac") { // Start via open so that we run with the native architecture installer.executeDetached("/usr/bin/open", new Array(qtCreatorBinaryPath), "@homeDir@"); } else { installer.executeDetached(qtCreatorBinaryPath, new Array(), "@homeDir@"); } } }); } //Controller.prototype.ComponentSelectionPageCallback = function() //{ // // this would deselect optional installed telemetry plugin for example // // the installer does not differentiate between update or installation // // an unselected component gets uninstalled // gui.currentPageWidget().deselectAll() // installer.selectComponent("qt.tools.qtcreator_gui") // if (gui.isButtonEnabled(buttons.NextButton)) // gui.clickButton(buttons.NextButton); //}