Hi,

            I’m currently working on supporting decompiler extensions (which would basically allow someone to create an extension for the decompiler that would allow custom tables to be converted back into wix authoring).  This will complete the round-tripping of wxs -> msi -> wxs again.

 

Currently we have several wix extensions:

-          PreprocessorExtension

-          CompilerExtension

-          SchemaExtension (its implemented by the CompilerExtension)

-          BinderExtension

-          DecompilerExtension

 

Right now, in order to use a Preprocessor extension as well as a compiler extension, two different –ext options must be passed to candle, like this:

-ext “extention.dll, PreprocessorExtensionClass” –ext “extension.dll, CompilerExtensionClass”

 

This is not too bad because most extensions currently only implement the compiler extension.  However, now that we’ll have a decompiler extension things get kinda hairy because the decompiler extension must also implement SchemaExtension (to get the table definitions) and requires the user to know the two different classes to use within the extension for the compiler and decompiler respectively.

 

I’d like to propose creating a new WixExtension class to be the main entry class for all extensions.  This class would basically be an abstract class with properties that would return a PreprocessorExtension, CompilerExtension, etc… if an extension overrides the value to provide the specific extension class.  This class would also contain information common to multiple extensions like the TableDefinitions.

 

Here’s an idea of what it would look like (this is pseudo code):

 

class WixExtension

{

            public virtual CompilerExtension CompilerExtension

            {

                        get { return null; }

            }

 

            public virtual DecompilerExtension DecompilerExtension

            {

                        get { return null; }

            }

 

            public virtual TableDefinitionCollection TableDefinitions

            {

                        get { return null; }

            }

}

 

If we do the proposed changes, since this will break backwards compatibility, I’ll also be modifying the CompilerExtension to add the suggested extra optional attributes in the ParseElement method (please see earlier email).  If anyone has any suggestions for other breaking changes needed for the extension model, this would be a good time to bring them up J

 

Thanks,

Derek

Reply via email to