Is it possible for a component to install to two different directories?

Comments

2 comments

  • Avatar
    wojciechka

    It is possible to specify a different location for each of the <folder> in the same component.

    If you want to install the same files multiple times, InstallBuilder automatically detects same file contents and will only package the same file once. So the simplest solution is to package the files multiple times.

    You can also use the <copyFile> action to copy a file or directory structure. However, in most cases it is a much easier solution to simply put the same files multiple times.

  • Avatar
    gt8967884

    How about this, will MyCommonFile only be packed once if they're identical but from two different directories?

    ComponentA
    <folder>
      <destination>DirectoryA</destination>
      <distributionFileList>
      <distributionDirectory allowWildcards="1">
      <origin>DirectoryA/*</origin>
      <includeFiles>
       MyCommonFile
      </includeFiles>
    ...
    </folder>
    ComponentB
    <folder>
      <destination>DirectoryB</destination>
      <distributionFileList>
      <distributionDirectory allowWildcards="1">
      <origin>DirectoryB/*</origin>
      <includeFiles>
       MyCommonFile
      </includeFiles>
    ...
    </folder>
    

Please sign in to leave a comment.