Extensions
WiX has support for three classes of extensions
Introduction
- Preprocessor Extensions allow clients to modify authoring files before they are processed by the compiler.
- Compiler Extensions allow clients to custom compile authored XML into internal table representation before it's written to binary form.
- Binder Extensions allow clients to the feed the interlace image processing and data finalization.
Through these extensions one can extend WiX to support custom preprocessing, XML syntax compilation, or binding semantics for ones particular layout generation process.
Common Requirements
How to use each should start in the source code but they all have a few things in common
- Implemented in same version of .NET 1.1 as the rest of WiX
- Build a subclass of the appropriate extension object giving it a easily distinguishable name.
- Build a schema of the appropriate syntax to provide validation checking where possible.
- Build internal table definitions and register them with the compiler.
- Build overrides for extendable methods and virtual members which will get invoked at the approriate location during the single pass compile.
- Build extension into a DLL.
- Place extension DLL next to WiX EXEs.
- Registered with WiX via command line argument to the compiler
Considerations
Before investing in an extension, one should evaluate whether an external tool and the ?include syntax (from the preprocessor) will provide the needed flexability for your technical needs.
Multiple extensions and extension types are supported but there is no guarentee of the order a particular class of extensions will be processes so there should be no sequencing dependencies between extensions within the same extension class.