I have some common files but need to be put in two different locations. Can I declare one component, but point it to install to two different locations? I'm trying to reduce the installer size by only packaging the files once.

asked 01 Feb '13, 18:03

gt8967884's gravatar image

gt8967884
116747678
accept rate: 12%


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.

link

answered 04 Feb '13, 12:16

wojciechka's gravatar image

wojciechka ♦♦
7.8k61122
accept rate: 26%

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>
link

answered 04 Feb '13, 14:07

gt8967884's gravatar image

gt8967884
116747678
accept rate: 12%

Yes, it will only be packed once.

InstallBuilder compares contents of each file included in the installer and then detects same files and reuses the data from already packed one.

You can check it by trying to package the same large file(s) multiple times and comparing installer sizes.

(04 Feb '13, 14:30) wojciechka ♦♦

Thanks, good to know.

(04 Feb '13, 15:21) gt8967884
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×49
×2
×2

Asked: 01 Feb '13, 18:03

Seen: 1,023 times

Last updated: 04 Feb '13, 15:21