installscript.js Example File | Qt Installer Framework Documentation 4.11.0

- Qt Installer Framework Documentation
- Component Error Example
- installscript.js Example File
- Qt Installer Framework 4.11.0

# installscript.js Example File

componenterror/packages/root.component1/meta/installscript.js

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

     function Component()
     {
         var error = true;
         if (error) {
             installer.setValue("component_errors", installer.value("component_errors") + ";;;"
                 + "Error in component: " + component.name);
         }
         installer.setValue("ComponentError", true);
     }