Neil
Have you considered using a variant of Heat to generate the WiX code
dynamically? I have done this sort of think in v2 using a tool called mallow
(it is a variant of tallow) I think you should find it on the web if you search
but if not let me know and I send you a copy. It can scan a folder full of
files and generate WiX code and manage the GUIDs for you so it shouldn't break
the component rules.
I know this sort of thing it considered bad but in the real world we have to
consider things like this!
Neil
Neil Sleightholm
X2 Systems Limited
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
________________________________
From: [EMAIL PROTECTED] on behalf of Neil Enns
Sent: Fri 11/07/2008 07:01
To: General discussion for Windows Installer XML toolset.
Subject: [WiX-users] Automating the inclusion of a mess of files
My application will wind up shipping with a ton of loose resource files on
disk*. We will have several items with the following well-defined structure:
MyFile1.foo
MyFile1_files
\ 0
\ somefile.txt
\ 1
\ somefile.txt
...
\ 9
\ somefile.txt
This is how the files live on disk as source, and how we need them to live on
disk on the target machine. As you can imagine, I have no desire to author the
WiX to install these suckers by hand, especially since they're going to change
relatively often between now and when we ship. I want to automate the process
somehow.
I started tonight by thinking a custom extension would do. My plan was to
create a new <MyFile> element that took the root .foo file, then would
automatically add all the necessary entries into the MSI for all the files and
subdirectories. I got a custom extension up and running pretty quickly, but
when it came time to actually think about adding the things to the MSI this
approach seemed, well, insane. I have no desire to recreate what the <File>,
<Directory>, and <Component> elements do in code.
My new alternate approach is to do this via a custom MSBuild task that runs
before Candle and generates a WiX file that then gets added to the list of
things to compile.
Anyone have any other suggestions for good ways to automate this?
Thanks,
Neil
* Don't ask why we have this structure and why they are loose files. It's a
very long story best told over a frosty beverage.
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users