exluding folders from installation

Comments

1 comment

  • Avatar
    wojciechka

    You can simply specify pattern of /win64/ with <allowWildcards> set to 1 and contents of for example */win64 it will be installed in destination folder.

    For example:

    <component>
      <!-- ... -->
      <folderList>
        <folder>
          <description>Linux</description>
          <destination>${installdir}</destination>
          <name>linux</name>
          <platforms>linux</platforms>
          <distributionFileList>
            <distributionFile allowWildcards="1">
              <origin>/path/to/*/lnx_x23.64/*</origin>
            </distributionFile>
          </distributionFileList>
        </folder>
        <folder>
          <description>Windows</description>
          <destination>${installdir}</destination>
          <name>windows</name>
          <platforms>windows</platforms>
          <distributionFileList>
            <distributionFile allowWildcards="1">
              <origin>/path/to/*/win64/*</origin>
            </distributionFile>
          </distributionFileList>
        </folder>
      </folderList>
    </component>
    

    Based on feedback from the comment, the best solution is to use advanced filters and simply exclude all files and directories matching pattern - such as:

    <folder>
      <description>Windows</description>
      <destination>${installdir}</destination>
      <name>windows</name>
      <platforms>windows</platforms>
      <distributionFileList>
        <distributionFile allowWildcards="1">
          <origin>/path/to/*/win64/*</origin>
          <onPackingFilterList>
            <fileNameFilter logic="does_not_match" pattern="*/lnx_x23.6/*"/>
          </onPackingFilterList>
        </distributionFile>
      </distributionFileList>
    </folder>
    

    The filters are described in Advanced Filters section of InstallBuilder User Guide.

Please sign in to leave a comment.