Compare commits

...

1 Commits
master ... nsis

Author SHA1 Message Date
Florian Bruhin
179e583af5 NSIS: Remove installation dir if it exists
If we don't do this, when a newer version is installed on top of an older one,
old files which have been deleted persist. In the case of v1.3.3 -> v1.4.0,
this means qutebrowser won't start because of a leftover sip installation which
confuses PyQt 5.11.

This is still potentially dangerous as the user could use e.g. C:\ as
installation path, but we have that issue when uninstalling anyways.
See http://nsis.sourceforge.net/Uninstall_only_installed_files
2018-07-10 14:57:40 +02:00

View File

@@ -40,6 +40,8 @@ Section "Install"
; Uninstall old versions
ExecWait 'MsiExec.exe /quiet /qn /norestart /X{633F41F9-FE9B-42D1-9CC4-718CBD01EE11}'
ExecWait 'MsiExec.exe /quiet /qn /norestart /X{9331D947-AC86-4542-A755-A833429C6E69}'
RMDir /r "$INSTDIR\*.*"
CreateDirectory "$INSTDIR"
SetOutPath "$INSTDIR"