|
Hi all
I have just finished the first cut of code that allows SAF to be easily called from a WIX (MSI), meaning that you can now run your Macros from not only MSBuild, Features, StsAdm but also WIX. I would love to hear any ideas / feedback / thoughts you have
on how I can make this better.
Currently, its integrated with a Wix Custom Action - like this ...
<?xml version='1.0'?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
<Fragment>
<CustomAction Id='DoMacro'
BinaryKey='CollaborisSaf'
DllEntry='RunMacro'
Return='check'
Impersonate='yes'
Execute='deferred'
/>
<CustomAction Id="SetSafPropertiesDo"
Return="check"
Property="DoMacro"
Value="CurrentDirectory=[INSTALLLOCATION];MacroPath=[INSTALLLOCATION]\Macros\CreateWeb.macro;Mode=Do;TargetUrl=http://localhost:4422;" />
<CustomAction Id='UndoMacro'
BinaryKey='CollaborisSaf'
DllEntry='RunMacro'
Return='check'
Impersonate='yes'
Execute='immediate'
/>
<CustomAction Id="SetSafPropertiesUndo"
Return="check"
Property="UndoMacro"
Value="CurrentDirectory=[INSTALLLOCATION];MacroPath=[INSTALLLOCATION]\Macros\CreateWeb.macro;Mode=Undo;TargetUrl=http://localhost:4422;" />
<Binary Id='CollaborisSaf' SourceFile="$(var.Collaboris.Saf.TargetDir)$(var.Collaboris.Saf.TargetName).CA.dll" />
</Fragment>
</Wix>
These Custom Actions then get called from inside your *.wxs file like this :
<InstallExecuteSequence>
<Custom Action="SetSafPropertiesDo" After='InstallFiles'>NOT (REMOVE="ALL")</Custom>
<Custom Action='DoMacro' After='SetSafPropertiesDo'>NOT (REMOVE="ALL")</Custom>
<Custom Action="SetSafPropertiesUndo" After='InstallValidate'>REMOVE="ALL"</Custom>
<Custom Action='UndoMacro' After='SetSafPropertiesUndo'>REMOVE="ALL"</Custom>
</InstallExecuteSequence>
let me know your thoughts...
Mark
|