File: qt_installscript_windows.js

package info (click to toggle)
bornagain 23.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 103,948 kB
  • sloc: cpp: 423,131; python: 40,997; javascript: 11,167; awk: 630; sh: 318; ruby: 173; xml: 130; makefile: 51; ansic: 24
file content (41 lines) | stat: -rw-r--r-- 1,822 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// Installer javascript needed to create the desktop icon and start-menu shortcut Windows.
// The script is referenced in PackWindows.cmake and used by Qt IFW installer at install time.

function Component()
{
    // default constructor
}

Component.prototype.createOperations = function ()
{
    // call the base createOperations
    component.createOperations();

    // see: <https://doc.qt.io/qtinstallerframework/operations.html>
    if (systemInfo.productType === "windows")
    {
        // add desktop shortcut for the app
        component.addOperation("CreateShortcut",
                               "@TargetDir@/bin/bornagain.exe",
                               "@DesktopDir@/BornAgain.lnk",
                               "workingDirectory=@TargetDir@/bin",
                               "iconPath=@TargetDir@/bin/bornagain.exe", "iconId=0",
                               "description=Start BornAgain");

        // add start-menu shortcut to start the app
        component.addOperation("CreateShortcut",
                               "@TargetDir@/bin/bornagain.exe",
                               "@StartMenuDir@/Start BornAgain.lnk",
                               "workingDirectory=@TargetDir@/bin",
                               "iconPath=@TargetDir@/bin/bornagain.exe", "iconId=0",
                               "description=Start BornAgain");

        // add start-menu shortcut to uninstall the app
        component.addOperation("CreateShortcut",
                               "@TargetDir@/maintenancetool.exe",
                               "@StartMenuDir@/Uninstall BornAgain.lnk",
                               "iconPath=@TargetDir@/bin/bornagain.exe", "iconId=0",
                               "description=Uninstall BornAgain",
                               " --uninstall");
    }
}