Thanks Rob. I'm currently exploring another approach, although if I wind up going the HeatTask route I'll keep all the below in mind.
Neil -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rob Mensching Sent: Friday, July 11, 2008 9:01 AM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] Automating the inclusion of a mess of files Answering the questions backwards: 1. The rules are called the "Component Rules". They are documented in the MSI SDK and I added a bunch of color commentary here: http://blogs.msdn.com/robmen/archive/2003/10/18/56497.aspx 2. It appears that HeatTask does have the support the heat auto-generate-guid switch. 3. First, understand what you are up against. If you don't understand the rules you stand a good chance of breaking them. Basically, it comes down to no Component may ever overlap with the contents of another Component. After that, if the auto-generated-guid (Component/@Guid="*") works for you then that is a nice way out. There are limitations in its use but they tend to push you towards Components that have higher chance of being patched/updated/upgraded anyway. Also, if you can simplify your application to be completely isolated, things get a lot easier as well. Note: the auto-generate-guid on Components is still a bit experimental. I'm using it on a couple of my smaller projects at work and things seem to be okay. However, if you find a bug in it (i.e. two Components get the same Id or the same Component Id changes) then to let us know. The other nasty part about the auto-generate-guid is that if we find a bug in the algorithm (we've found 3 in its lifetime and I'm pretty confident in it now) then you're going to be pretty much screwed (cause, in the worse case, all the GUIDs will change)... so buyer-beware. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Neil Enns Sent: Friday, July 11, 2008 07:13 To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] Automating the inclusion of a mess of files Rob, Any pointers on tips for getting the GUIDs right? Will HeatTask take care of this for me? If not, what rules do I need to follow? Neil ________________________________ From: [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of Rob Mensching [EMAIL PROTECTED] Sent: Friday, July 11, 2008 1:48 AM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] Automating the inclusion of a mess of files There is a "HeatTask" provided by the WiX toolset already. Getting the GUIDs right is the hardest part of "autogenerating" .wxs files. The Windows Installer is brutally unforgiving for messing up your Component/@Guids. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Neil Sleightholm Sent: Friday, July 11, 2008 00:30 To: General discussion for Windows Installer XML toolset.; General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] Automating the inclusion of a mess of files 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 WiX-users@lists.sourceforge.net 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 WiX-users@lists.sourceforge.net 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 WiX-users@lists.sourceforge.net 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 WiX-users@lists.sourceforge.net 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 WiX-users@lists.sourceforge.net 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 WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users