libminizinc icon indicating copy to clipboard operation
libminizinc copied to clipboard

MiniZinc IDE overrides installation information in Windows when keeping current installed one

Open schutta opened this issue 5 years ago • 1 comments

Last year, I installed MiniZinc IDE 2.3.2 on my Windows machine in C:\Program Files\MiniZinc using the Windows executable provided at minizinc.org. This version I wanted to keep installed. Therefore I installed MiniZinc IDE 2.4.3 in C:\Program Files\MiniZinc2.4.3. However, the installation overrode the MiniZinc IDE 2.3.2 link in the start menu and MiniZinc installation information in Settings -> Apps & features.

A better (or correct) behaviour would be that the user has an option during the installation steps to keep or remove existing MiniZinc installation(s) on their system. And in the case of keeping, that separate links and installation information are provided to Windows.

schutta avatar May 04 '20 12:05 schutta

It looks like Inno Setup doesn't really support this natively (it might be possible to use Pascal scripting to achieve this though).

The way Inno Setup is designed for would be to not ask you where to install MiniZinc if you already had an old version installed, forcing you to overwrite the old installation. At the moment we have it set up so that you can still choose to install it elsewhere, but this still overrides start menu shortcuts/apps & features info as you've said. Installing over the top of an existing installation should always perform a correct upgrade as of 2.5.0.

Some possible solutions:

  • Prevent the user from installing to a different directory if a previous version is installed, forcing them to do an upgrade. This is what Inno Setup seems to want to do by default. Side by side installations are not possible.
  • Use a different AppID for each version, so they're considered completely separate programs (so the app name/folders would have to include version numbers). In this case there is no 'upgrade' mechanism, you would have to uninstall old versions if you didn't want them
  • Use a script which changes the AppID if it detects an old version but you choose to install to a different folder. I'm not sure how feasible this is to actually get working without side effects, but this stackoverflow answer to suggest that it can be done.

cyderize avatar Oct 06 '20 23:10 cyderize