CQtDeployer/QIFData/config/controlScript.js

52 lines
1.4 KiB
JavaScript
Raw Normal View History

2019-11-16 15:11:38 +03:00
function Controller()
{
generateTr();
installer.setMessageBoxAutomaticAnswer("OverwriteTargetDirectory", QMessageBox.Yes);
installer.uninstallationFinished.connect(this, Controller.prototype.uninstallationFinished);
installer.installationFinished.connect(this, Controller.prototype.installationFinished);
}
Controller.prototype.ComponentSelectionPageCallback = function()
{
var widget = gui.currentPageWidget(); // get the current wizard page
if (widget !== null && installer.isInstaller()) {
widget.deselectAll();
2020-03-21 15:35:08 +03:00
widget.selectComponent('cqtdeployer.1_4');
2019-11-16 15:11:38 +03:00
}
}
function generateTr() {
console.log("generate tr start ")
installer.setValue("Name", qsTr("CQtDeployer"));
installer.setValue("Title", qsTr("Install CQtDeployer"));
}
Controller.prototype.uninstallationFinished = function()
{
}
Controller.prototype.installationFinished = function()
{
if (systemInfo.kernelType === "winnt") {
QMessageBox["information"](qsTr("install in system"), qsTr("Installer"),
2020-03-13 20:11:40 +03:00
qsTr("CQtDeployer successfully installed on your computer to use the call \"cqtdeployer\"."),
2019-11-16 15:11:38 +03:00
QMessageBox.Ok);
} else {
QMessageBox["information"](qsTr("install in system"), qsTr("Installer"),
2020-03-13 20:11:40 +03:00
qsTr("CQtDeployer successfully installed on your computer to use the call \"cqtdeployer\", cqt or cqtdeployer.cqt."),
2019-11-16 15:11:38 +03:00
QMessageBox.Ok);
}
}