How to add a file by name to a directory tree ?

Comments

1 comment

  • Avatar
    juanjo

    Not sure if this would solve the issue but what I meant was, if you know the set of files you want to pack (file1, file2, file3, dir1, dir2, dir3), you can use their paths as patterns for the filters:

     <folder>
       <description>Program Files</description>
       <destination>${installdir}</destination>
       <name>programfiles</name>
       <platforms>all</platforms>
       <distributionFileList>
         <distributionDirectory>
           <origin>dist-files</origin>
           <onPackingFilterList>
              <fileNameFilter>
                <pattern>
        *dist-files/path/to/file1
        *dist-files/other/path/to/file2
        *dist-files/other/path/to/file3
        *dist-files/dir1
        *dist-files/other/dir/dir2
        *dist-files/some/other/dir3
        </pattern>
                <logic>matches</matches>
                <patternType>glob</patternType>
           </onPackingFilterList>
         </distributionDirectory>
       </distributionFileList>
     </folder>
    

    Where dist-files is the third-party directory containing the files. You can particularize the patterns as much as needed or use more relaxed patterns when possible.

    Was this what you were looking for?

Please sign in to leave a comment.