installscript.js Example File | Qt Installer Framework Documentation 4.11.0

- Qt Installer Framework Documentation
- Modify Extract Installer Example
- installscript.js Example File
- Qt Installer Framework 4.11.0

# installscript.js Example File

modifyextract/packages/org.qtproject.ifw.example.modifyextract/meta/installscript.js

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

     function Component()
     {
     }

     Component.prototype.createOperationsForArchive = function(archive)
     {
         // don't use the default operation
         // component.createOperationsForArchive(archive);

         // add an extract operation with a modified path
         component.addOperation("Extract", archive, "@TargetDir@/extractToAnotherPath");
     }