Windows: Fix upgrading from .MSI to .EXE setup

Now, the NSIS .EXE setup first uninstalls previous .MSI and .EXE versions before it continues to install Inkscape.

Before, upgrading from EXE to MSI without manual uninstallation led to problems like two half-broken installations or extra uninstall entries.

Related issue: #4679 (closed)

Tested on Win10 for the 64bit version ( In combination with other fixes from !6577 (merged) ):

Test 1 MSI->Exe

  • Uninstall, make sure C:\Program Files\Inkscape is empty
  • Install Inkscape 1.3.2 MSI
  • Install Inkscape from this MR .EXE
  • --> works correctly: old Inkscape is uninstalled, new Inkscape works, only one uninstall entry in system settings

Test 2 EXE->EXE

  • Uninstall --> C:\Program Files\Inkscape is gone
  • Install Inkscape 1.3.2 EXE
  • Install Inkscape from this MR .EXE
  • --> same

Test 3 half-broken old install --> EXE

  • Uninstall --> C:\Program Files\Inkscape is gone
  • Manually place some inkscape.exe into C:\Program Files\Inkscape\bin\inkscape
  • Install Inkscape from this MR .EXE
  • --> Correctly refuses to install: "A previous version of Inkscape was found. Please uninstall it via system settings."

I did not test for 32bit or upgrades from 32bit. However, these are less problematic because they install into a different folder ("Program files (x86)" vs "Program Files").

Edited by Max Gaukler

Merge request reports

Loading