Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

How to extract only specific files and folders of a package in Qt Installer Framework (QtIFW)?



  • Let's say my application "MyApp" has a package "pkg1". In pkg1, there are 5 folders and 5 files. I know using the below piece of code I can extract the whole data folder of pkg1 into my specified folder during installation:

    Component.prototype.createOperationsForArchive = function(archive)
    {
        component.addOperation("Extract", archive, "@TargetDir@/pkg1");
    }
    

    But I do not wish to copy all 5 folders and 5 files. I wish to copy, say specific 3 folders and 3 files from it. This is because pkg1 has files folders for both Linux and Windows. During Windows installer creation, I need 3 files and 3 folders. During Linux installer creation, I need 4 files and 4 folders (some files folders are common on both platforms). I cannot maintain two separate file folder structure.

    Please suggest if this is possible with QtIFW or not. And if not, then what workaround should I follow that would be less time-consuming in building it.


Log in to reply