Go Back   PackageDeploy Application Packaging Forums > Package Development > Application Packaging > Platformsdk MSI

Reply
 
LinkBack Thread Tools Display Modes
Old 06-03-2009, 06:02 AM   #1 (permalink)
Steven Bethard
Guest
 
Posts: n/a
Default Installing the same files to multiple directories

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.
  Reply With Quote
Old 06-03-2009, 06:02 AM   #2 (permalink)
Kalle Olavi Niemitalo
Guest
 
Posts: n/a
Default Re: Installing the same files to multiple directories

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
  Reply With Quote
Old 06-03-2009, 06:02 AM   #3 (permalink)
Steven Bethard
Guest
 
Posts: n/a
Default Re: Installing the same files to multiple directories

"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!
  Reply With Quote
Old 06-03-2009, 06:02 AM   #4 (permalink)
Bob Arnson [MSFT]
Guest
 
Posts: n/a
Default Re: Installing the same files to multiple directories

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/
  Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:46 PM.


vBulletin, Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
2007 - 2012 PackageDeploy.com