I can’t speak for Rob, but I believe he meant using MSBuild to call the WiX 
toolset to build your MSI instead of using your own code calling the WiX 
library directly. However, there is also no reason you can’t call the library 
in the way that you are, other than maintaining the duplication of effort of 
what is already done for you in Candle and Light.

 

As to your override of BinderFileManager: by the time the linker is done you 
can know which files need to be in which CABs and in what order, so I don’t see 
why you need to override both ResolveCab() and CopyFile(). ResolveCab() should 
return CabinetBuildOption.Copy with the path to the appropriate cab you are 
already building (you just need to either build that cab yourself in 
ResolveCab() or have already built it before you call the binder). No empty 
cabinet files and no CopyFile() override needed, and it works with both 
embedded and external cabs too!

 

Blair

 

From: Ondrej Zarevucky [mailto:ondrej.zarevu...@fine.cz] 
Sent: Tuesday, January 18, 2011 4:04 AM
To: Windows Installer XML toolset developer mailing list
Subject: Re: [WiX-devs] public sealed BinderCore class with internal 
constructor? :(

 

You mean MSBuild to build my own copy of WiX? I've tried it twice before and 
failed each time :(

There are few issues with custom built WiX:
- I would have to properly setup WiX build machine and keep it up to date with 
the WiX development
- I would have to keep my WiX source code changes in the line with official WiX 
development
- I would never be able to get the quality control of official WiX releases

My current solution is to reference official wix.dll in my project and use its 
public objects to build my installation package.

At first I create my XmlDocument containing the .wxs source then I pass it to 
the Compiler to get an Intermediate which I pass to Linker and Binder with my 
WixExtension attached. The final output is my MSI file with no temporary files 
I don't need (no .wxs, no .wixobj, no .wixpdb, no .cab) as everything is kept 
in memory.

The only thing I need to do is to digitally sign the resulting MSI and add the 
custom built CAB files for the installation package to be complete. CAB files 
are created and signed separately, because we want to control their changes to 
minimize the size of online updates. Some CAB files are even shared between 
different MSI databases.

Is there any issue with this use of WiX I'm not aware of?

Have a nice day
Ondřej Zarevúcky

On 18.1.2011 1:57, Rob Mensching wrote: 

I'm curious, what are you doing? Is there a reason MSBuild doesn't work... and 
all that?

On Mon, Jan 17, 2011 at 11:28 AM, Ondrej Zarevucky <ondrej.zarevu...@fine.cz> 
wrote:

By overriding BinderFileManager.CopyFile() I've disabled creating the
empty cabinet files completely :)

The issue is solved and I'm much more happy now ;-)

I'm sorry for the emails. It helped me to summarize the problem and look
for new ideas...

Have a nice day
Ondřej Zarevúcky


On 17.1.2011 19:44, Ondrej Zarevucky wrote:
> Ok,
> I've noticed there are many more internal classes and methods used in
> the Binder :(
>
> I've moved to different solution: use the original Binder with my custom
> WiXExtension with custom BinderFileManager, which provides empty CAB
> archive and returns "CabinetBuildOption.Copy" option.
>
> Sadly the empty CAB files are still created, but at least no more disk
> space or computing power is wasted.
>
> Is there even better solution?
> Ondřej Zarevúcky
>
> On 17.1.2011 19:03, Ondrej Zarevucky wrote:
>> Hi,
>> I'm building installation building system for our internal use and I
>> didn't want to use the supplied Candle.exe and Light.exe, but I wanted
>> to use WiX from my .Net application. Moving compilation from Candle code
>> to my application worked perfectly, but when I've started trying to move
>> and modify Light code and the main Binder class to my application I've
>> run into issue that Binder uses public sealed BinderCore class, which
>> has internal constructor. How can I create new instance of BinderCore?
>>
>> I'm trying to write my own version of Binder that doesn't create CAB
>> files. I create custom CAB files manually in different part of the process.
>>
>> Thank you for your help
>> Ondřej Zarevúcky
>>
>> ------------------------------------------------------------------------------
>> Protect Your Site and Customers from Malware Attacks
>> Learn about various malware tactics and how to avoid them. Understand
>> malware threats, the impact they can have on your business, and how you
>> can protect your company and customers by using code signing.
>> http://p.sf.net/sfu/oracle-sfdevnl
>> _______________________________________________
>> WiX-devs mailing list
>> WiX-devs@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wix-devs
> ------------------------------------------------------------------------------
> Protect Your Site and Customers from Malware Attacks
> Learn about various malware tactics and how to avoid them. Understand
> malware threats, the impact they can have on your business, and how you
> can protect your company and customers by using code signing.
> http://p.sf.net/sfu/oracle-sfdevnl
> _______________________________________________
> WiX-devs mailing list
> WiX-devs@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-devs

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
WiX-devs mailing list
WiX-devs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-devs




-- 
virtually, Rob Mensching - http://RobMensching.com LLC



 
 
------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
 
 
_______________________________________________
WiX-devs mailing list
WiX-devs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-devs
------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
WiX-devs mailing list
WiX-devs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-devs

Reply via email to