2018-12-17 20:32:27 +03:00
|
|
|
function Controller()
|
|
|
|
{
|
|
|
|
generateTr();
|
|
|
|
|
|
|
|
installer.setMessageBoxAutomaticAnswer("OverwriteTargetDirectory", QMessageBox.Yes);
|
|
|
|
installer.uninstallationFinished.connect(this, Controller.prototype.uninstallationFinished);
|
|
|
|
installer.installationFinished.connect(this, Controller.prototype.installationFinished);
|
2018-12-19 00:42:39 +03:00
|
|
|
runProgramm();
|
2018-12-17 20:32:27 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
function generateTr() {
|
|
|
|
console.log("generate tr start ")
|
|
|
|
|
2018-12-23 19:04:20 +03:00
|
|
|
installer.setValue("Name", qsTr("Snake"));
|
|
|
|
installer.setValue("Title", qsTr("Install Snake"));
|
2018-12-17 20:32:27 +03:00
|
|
|
}
|
|
|
|
|
2018-12-19 00:42:39 +03:00
|
|
|
function runProgramm() {
|
|
|
|
if (systemInfo.kernelType === "winnt") {
|
2018-12-23 19:04:20 +03:00
|
|
|
installer.setValue("RunProgram", "@TargetDir@/snake.exe")
|
2018-12-19 00:42:39 +03:00
|
|
|
} else {
|
2018-12-23 19:04:20 +03:00
|
|
|
installer.setValue("RunProgram", "@TargetDir@/snake.sh")
|
2018-12-19 00:42:39 +03:00
|
|
|
}
|
|
|
|
}
|
2018-12-17 20:32:27 +03:00
|
|
|
|
|
|
|
Controller.prototype.uninstallationFinished = function()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Controller.prototype.installationFinished = function()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|