Reputation: 91
We have created a WiX installer for our project OpenRGB and I've run into an issue. I would like to be able to distribute OpenRGB plugins that have their own WiX installers. The main application installer creates an installation directory such as:
C:\Program Files\OpenRGB\
and copies things like the .exe and dependent .dll files into it.
Then, the plugins' installers install to:
C:\Program Files\OpenRGB\plugins\
and copy in a single .dll file for the plugin.
My issue is that whenever I install or upgrade the top level OpenRGB installer, it seems to wipe the entire install directory C:\Program Files\OpenRGB, deleting the plugins folder and all files that have been installed by the plugin installers, despite the plugin installers still being installed.
I am a noob when it comes to WiX configuration but I have looked around and not found a good answer as to why the plugin files are being deleted. I thought it should only delete the files that the installer itself created. I'm hoping someone more knowledgeable can help.
Our script for generating the main OpenRGB WiX installer XML is here:
https://gitlab.com/CalcProgrammer1/OpenRGB/-/blob/master/scripts/build-msi.sh?ref_type=heads
The script for generating one of the plugin WiX installers XML is here:
Edit: Appears to only happen on install or upgrade, not on uninstall. When uninstalling, the C:\Program Files\OpenRGB\plugins directory is left alone, but upon installing OpenRGB again, the installer removes the plugins directory.
Upvotes: 0
Views: 40
Reputation: 91
The issue ended up being the UpgradeCode. We are using uuidgen to generate the UpgradeCode from the product name (org.openrgb.openrgb) but for the plugins the product name contained spaces (org.openrgb.openrgb effects plugin) and it seems like it was ignoring everything after the space and generating the same UUID. I noticed in an install log that RemoveExistingProducts was uninstalling the plugin during OpenRGB installation and tracked it down to the identical UpgradeCodes. Fixing the product name to remove the spaces fixed UUID generation and now the packages don't uninstall each other.
Upvotes: 0