There are two reasons that this type of work is done in heat.exe instead of
candle.exe.  One just moves the problem to the correct place and the other
is why we don't do this at all:

1.  candle.exe (more specifically the Compiler object) never accesses files
on disk.  This is to preserve the ability to "compile everything" then "link
everything" in two distinct phases.  So, doing this work as an extension to
the Compiler would violate that tenet.  You would have to move the work to
the Binder which is the only thing that actually touches the files that end
up in the MSI.

2.  The WiX toolset pushes the problem out to support tools because
auto-generating Resources into Components is a very dangerous process that
can create installations that cannot be properly upgraded, patched, or
uninstalled.  If you go back through the archive, you'll see I explain this
tenet many times and note that there are teams that were completely screwed
because they didn't realize what had happened to them until it was too late.

Yes, it is more work to get the Resources declaratively stated up front
instead of having the Compiler/Linker/Binder just auto-generate them all.
However, as long as the Component Rules work the way they do,
auto-generating the composition of a Component is a very bad idea and the
WiX toolset should not support it in the Compiler/Linker/Binder.


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of BradW
Sent: Friday, September 15, 2006 08:12
To: [email protected]
Subject: Re: [WiX-devs] auto-generation of file registration data (heat?)


Either I don't understand what you're saying, or you're not understanding
what I'm wanting to do.. Thus, let me try to be more clear....

Here is an example component wix file that we are wanting to implement:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns:inin="http://www.inin.com/i3WixExtensions";
xmlns="http://schemas.microsoft.com/wix/2006/wi";>
  <Fragment>
    <DirectoryRef Id="INSTALLDIR">
      <Component Id="eicauthps.d"
Guid="6BEB27AC-14BC-46E1-AF1C-2CE104724EC8" SharedDllRefCount="yes">
        <File Name="EICAuthPS.dll" inin:FileRegister="yes" ReadOnly="no"
KeyPath="yes" Source="../../../../../eic/bin/EICAuthPS.dll"
Id="EICAuthPS.dll" DiskId="1" />
      </Component>
    </DirectoryRef>
  </Fragment>
</Wix>

Notice the inin:FileRegister="yes" custom attribute in the File element.
What our extension would do at candle time, is call heat and create a
tmp.wxs file that would result in something like this:

<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";>
    <Fragment>
        <DirectoryRef Id="TARGETDIR">
            <Directory Id="bin" Name="bin" />
        </DirectoryRef>
    </Fragment>
    <Fragment>
        <DirectoryRef Id="bin">
            <Component Id="EICAuthPS.dll" Guid="PUT-GUID-HERE">
                <File Id="EICAuthPS.dll" Name="EICAuthPS.dll" KeyPath="yes"
Source="r:\products\eic\bin\EICAuthPS.dll">
                    <Class Id="{38D77500-4C1B-11D2-BF8A-00A0C90DC629}"
Context="InprocServer32" Description="PSFactoryBuffer" ThreadingModel="both"
/>
                </File>
                <Interface Id="{38D77500-4C1B-11D2-BF8A-00A0C90DC629}"
Name="IEICAuthCallback"
ProxyStubClassId32="{38D77500-4C1B-11D2-BF8A-00A0C90DC629}" NumMethods="5"
/>
                <Interface Id="{9DD67050-4CE1-11D2-BF8A-00A0C90DC629}"
Name="IEICAuthBD"
ProxyStubClassId32="{38D77500-4C1B-11D2-BF8A-00A0C90DC629}" NumMethods="4"
/>
                <Interface Id="{C06D0D93-4C16-11D2-BF8A-00A0C90DC629}"
Name="IEICAuthMgt"
ProxyStubClassId32="{38D77500-4C1B-11D2-BF8A-00A0C90DC629}" NumMethods="4"
/>
                <Interface Id="{F2C5A38E-32D9-11D2-BF81-00A0C90DC629}"
Name="IEICAuthServer"
ProxyStubClassId32="{38D77500-4C1B-11D2-BF8A-00A0C90DC629}" NumMethods="4"
/>
            </Component>
        </DirectoryRef>
    </Fragment>
</Wix>

then our extension would read in the wxs file as an XmlDocument, and parse
it looking for any file registration related element (Class, Interface,
ProgID, etc.) and use the attributes in it to create rows in the database
(wixobj file) as if those elements actually existed in the original wxs file
to begin with.  This way, if registration changes for a dll we don't have to
be privy to that knowledge.  At build time, WiX will pick up the changes
when building the new wixobj file.

So our thought was that others could probably use this same functionality..
Thus our question to the wix-devs is, is this something that sounds
reasonable to add to WiX (candle)?


Bob Arnson-3 wrote:
>
> BradW wrote:
>> So as a test we are manually using heat.exe to get registration 
>> information and inserting the data into our wix component files.  
>> This was working well so today I began extending wix with a custom 
>> File attribute that would do the following:
>>
> Are you using an extension? Extensions support custom elements right 
> in the WiX code so you wouldn't need to parse anything other than the 
> custom elements.
>
>
> --
> sig://boB
> http://bobs.org
>
>
>
> ----------------------------------------------------------------------
> --- Using Tomcat but need to do more? Need to support web services, 
> security?
> Get stuff done quickly with pre-integrated technology to make your job 
> easier Download IBM WebSphere Application Server v.1.0.1 based on 
> Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=1216
> 42 _______________________________________________
> WiX-devs mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wix-devs
>
>

--
View this message in context:
http://www.nabble.com/auto-generation-of-file-registration-data-%28heat-%29-
tf2271958.html#a6327268
Sent from the wix-devs forum at Nabble.com.


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
WiX-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-devs


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
WiX-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-devs

Reply via email to