OK, so my first foray into the 'Wix-dev' world was somewhat faltering
;-)
I've just realised that my changes are incomplete, as any ComponentGroup
elements still refer to the original Component IDs (doh!).
Incidentally, is it normal for the objects that hang off the 'Wix'
aliased namespace (e.g. Wix.Directory, Wix.Component etc.) to show up as
'symbol not found' in Visual Studio but compile OK, or is it something
I've not setup properly?
Cheers,
James.
From: Dawson, James [mailto:[EMAIL PROTECTED]
Sent: 31 October 2008 14:29
To: [email protected]
Subject: [WiX-devs] Patch for CNDL0014 & LGHT0091 errors when using
HEATwith VSProjectHarvester
Hi,
I've been re-acquainting myself with Heat, in particular the
VSProjectHarvester scenario - I'd really prefer to not have to rely on
scraping the file-system for files to package any more, but still want
the automated fragment generation.
During my meanderings I hit a couple of issues:
1. Filenames with hyphens and Directories with spaces were causing
CNDL0014 errors
2. ID collisions when a project contains multiple files with the
same filename (e.g. Web.config in a web application project)
So I pulled down the source and started poking around - the first two
seemed pretty trivial to resolve, just adding some additional
String.Replace logic to what was already there.
The second issue took me somewhat longer, but after figuring out that
UtilMutator was responsible for the unique ID magic it didn't take long
to realise that it only does its stuff if an element does not already
have an ID. Unlike the DirectoryHarvester, the VSProjectHarvester
generates an ID based off the VS Project name and the Output Group name,
hence why the IDs were not being made unique by the mutator.
It struck me that there were 2 obvious ways to resolve this one:
* Change the ID generation logic in VSProjectHarvester to make
them more unique
* Change the logic in UtilMutator to not ignore elements with a
pre-existing ID
After some initial stabs at the first, I eventually got something
working taking the second approach - though arguably it's not an
entirely clean solution, as IDs get a number appended even if they were
unique in the first place. (I suspect that this could be overcome with
further refactoring, but I was trying minimise how much code I touched!)
I've attached my changes as a patch (against 3.0.4624), but I'd be
interested to know if any of the above was by design and your thoughts
on my attempted resolutions.
<<patch.udiff>>
Cheers,
James.
Blog: blogs.conchango.com/jamesdawson
<http://blogs.conchango.com/jamesdawson>
_____________________________________________________________________
The information contained in this message is confidential and is
intended for the addressee only. If you have received this message in
error, please notify Conchango plc as soon as possible. The unauthorised
use, disclosure, copying or alteration of this message is prohibited and
may be unlawful. The internet cannot guarantee the integrity of this
message and therefore Conchango plc will not be liable for the message
if modified.
Reg. Heritage House, Church Road, Egham, Surrey, TW20 9QD T 44 (0) 1784
222 222 F 44 (0) 1784 222 200 E [EMAIL PROTECTED] No. 2771938
_____________________________________________________________________
The information contained in this message is confidential and is intended for
the addressee only. If you have received this message in error, please notify
Conchango plc as soon as possible. The unauthorised use, disclosure, copying or
alteration of this message is prohibited and may be unlawful. The internet
cannot guarantee the integrity of this message and therefore Conchango plc will
not be liable for the message if modified.
Reg. Heritage House, Church Road, Egham, Surrey, TW20 9QD T 44 (0) 1784 222 222
F 44 (0) 1784 222 200 E [EMAIL PROTECTED] No. 2771938
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-devs