installscript.qs Example File | Qt Installer Framework Documentation 4.11.0

- Qt Installer Framework Documentation
- Start Menu Shortcut Example
- installscript.qs Example File
- Qt Installer Framework 4.11.0

# installscript.qs Example File

startmenu/packages/org.qtproject.ifw.example/meta/installscript.qs

     /* Copyright (C) 2026 The Qt Company Ltd.
      *
      * SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
     */

     function Component()
     {
         // default constructor
     }

     Component.prototype.createOperations = function()
     {
         // call default implementation to actually install README.txt!
         component.createOperations();

         if (systemInfo.productType === "windows") {
             component.addOperation("CreateShortcut", "@TargetDir@/README.txt", "@StartMenuDir@/README.lnk",
                 "workingDirectory=@TargetDir@", "iconPath=%SystemRoot%/system32/SHELL32.dll",
                 "iconId=2", "description=Open README file");
         }
     }