2018-06-26 10:07:46 +03:00
|
|
|
function Controller()
|
|
|
|
{
|
|
|
|
installer.uninstallationFinished.connect(this, Controller.prototype.uninstallationFinished);
|
|
|
|
installer.installationFinished.connect(this, Controller.prototype.installationFinished);
|
2018-06-11 15:23:52 +03:00
|
|
|
}
|
|
|
|
|
2018-06-26 10:07:46 +03:00
|
|
|
Controller.prototype.installationFinished = function()
|
|
|
|
{
|
2018-06-24 19:30:56 +03:00
|
|
|
|
2018-06-26 10:07:46 +03:00
|
|
|
if (systemInfo.kernelType === "winnt") {
|
|
|
|
component.addOperation("CreateShortcut",
|
|
|
|
"@TargetDir@/@Name@.exe",
|
|
|
|
"@DesktopDir@/@Name@.lnk");
|
2018-06-24 19:30:56 +03:00
|
|
|
}
|
|
|
|
|
2018-06-26 10:07:46 +03:00
|
|
|
if (systemInfo.kernelType === "linux") {
|
|
|
|
component.addOperation("CreateDesktopEntry",
|
|
|
|
"@HomeDir@/.local/share/applications/@Name@.desktop",
|
|
|
|
"Version=@Version@\n
|
|
|
|
Type=Application\n
|
|
|
|
Terminal=false\n
|
|
|
|
Exec=@TargetDir@/@Name@.sh\n
|
|
|
|
Name=@Name@\n
|
|
|
|
Icon=@TargetDir@/bin/%0\n
|
|
|
|
Name[en_US]=YourApp_name");
|
|
|
|
|
|
|
|
component.addElevatedOperation("Copy",
|
|
|
|
"@HomeDir@/.local/share/applications/@Name@.desktop",
|
|
|
|
"@HomeDir@/Desktop/@Name@.desktop");
|
2018-06-24 19:30:56 +03:00
|
|
|
}
|
2018-06-26 10:07:46 +03:00
|
|
|
}
|
2018-06-24 19:30:56 +03:00
|
|
|
|
|
|
|
|
2018-06-26 10:07:46 +03:00
|
|
|
Controller.prototype.uninstallationFinished = function()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
2018-06-24 19:30:56 +03:00
|
|
|
|
|
|
|
|
|
|
|
|