|
|
#1 (permalink) |
|
Guest
Posts: n/a
|
My MSI provides a set of files for which the user selects a number of
locations for this set to be copied. Exactly the same files will be copied to each of the selected locations [1]. At the moment, this means that I have Directory entries like the following, where I have declared the same basic structure multiple times, but with a different suffix each time: TARGETDIR2.4, TARGETDIR, Python2.4 Lib2.4, TARGETDIR2.4, LIB|Lib site_packages2.4, Lib2.4, SITE-P~1|site-packages TARGETDIR2.5, TARGETDIR, Python2.5 Lib2.5, TARGETDIR2.5, LIB|Lib site_packages2.5, Lib2.5, SITE-P~1|site-packages .... Similarly, I have File entries like: module.py2.4, site_packages2.4, ... module.py2.5, site_packages2.5, ... The problem is, this means that I need to put many duplicates of the same file (module.py) into the CAB file, one for each possible Python version, since the MSI expects the name in the File table and the name in the CAB to match. What I really want to be able to do is to declare a single file that belongs to multiple components, but there doesn't seem to be a way to do that. Is there any way to avoid storing the same file multiple times? Thanks again, Steve [1] When you install a Python module, it can be installed to any or all of the existing Python directories, e.g. C:\Python24, C:\Python25, etc. So, as suggested in another thread, I have created a Feature for each Python version, allowing the user to select or deselect any or all of the existing Python installations. |
|
|
|
#2 (permalink) |
|
Guest
Posts: n/a
|
Steven Bethard <StevenBethard@discussions.microsoft.com> writes:
> What I really want to be able to do is to declare a single file that belongs > to multiple components, but there doesn't seem to be a way to do that. Is > there any way to avoid storing the same file multiple times? There is a hack for this, apparently: http://blogs.msdn.com/heaths/archive...r-patches.aspx http://robmensching.com/blog/posts/2...to-WiX-toolset |
|
|
|
#3 (permalink) |
|
Guest
Posts: n/a
|
"Kalle Olavi Niemitalo" wrote:
> Steven Bethard <StevenBethard@discussions.microsoft.com> writes: > > > What I really want to be able to do is to declare a single file that belongs > > to multiple components, but there doesn't seem to be a way to do that. Is > > there any way to avoid storing the same file multiple times? > > There is a hack for this, apparently: > > http://blogs.msdn.com/heaths/archive...r-patches.aspx > http://robmensching.com/blog/posts/2...to-WiX-toolset Thanks for the great pointers - among other things, they pointed out the presence of the DuplicateFile table to me. My solution now lists the files only once, in subdirectories of TARGETDIR. I then filled in the DuplicateFile table to also copy each of the files to the corresponding subdirectories of the TARGETDIRX.Y locations. The only trick was making sure that TARGETDIR was always assigned one of the TARGETDIRX.Y values, which I did by adding a series of ControlEvents with Event=[TARGETDIR] and Argument=[TARGETDIRX.Y]. Thanks again for all your help! |
|
|
|
#4 (permalink) |
|
Guest
Posts: n/a
|
Steven Bethard wrote:
> the TARGETDIRX.Y locations. The only trick was making sure that TARGETDIR was > always assigned one of the TARGETDIRX.Y values, which I did by adding a > series of ControlEvents with Event=[TARGETDIR] and Argument=[TARGETDIRX.Y]. Make sure you haven't broken silent install, where control events aren't processed. -- sig://boB http://joyofsetup.com/ |
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|