Well, I’ve learned enough about WiX and MSI to get an installer ready for the XSI v5 exporter, which will accompany OGRE v1.0.6 in just over a week’s time. Getting it working didn’t actually take very long, although sometimes the declarative syntax can be a little obtuse. The thing that had be pulling hair out for a good while was that I wanted to auto-locate the XSI install folder so the user didn’t have to choose it. But unfortunately, Softimage made the frankly bizarre decision to place the registry key that identifies the XSI install root underneath - wait for it - a key whose name includes the install root! That means there is no fixed registry path you can look in to determine where XSI is installed. For example on my system:
HKEY_LOCAL_MACHINE\SOFTWARE\Softimage\SOFTIMAGE Application*E:|Softimage|XSI_5.0|Application|bin*\Root Locations\InstallRoot = E:\Softimage\XSI_5.0
As you can see, the install path is slap bang in the registry key path for getting to the InstallRoot value. Unfortunately, MSI doesn’t support registry key matching by wildcard, so I can only determine what the install root is by already knowing it. Bonkers or what?
If this was Inno or NSIS I could write a small procedural script to perform a match to avoid this. MSI is completely declarative though, and although you can use JScript/VBScript it is considered very dangerous according to the authors. The in-built CustomAction doesn’t cover it, so I’d have to write an action plugin in some other language to do this. I don’t blame MSI, I’m sure it’s just that Softimage made a bad decision here and that normally you would never need to do this. But unfortunately in less than perfect cases like this, MSI does tie your hands more by being declarative even if in principle removing the variability of scripting is a good idea.
So, because of this I’m having to rely on the user picking the right install directory, which is a shame. I spent the best part of an evening trying to find a way around it, or a report of an existing instance, and found nothing, so I’ll have to move on. The good news is that the installer works fine, I used it to install the 1.0.6 plugin into XSI v5 and it worked straight off.