Skip to content

Commit

Permalink
On Windows, remove previously installed version in the NSIS installer
Browse files Browse the repository at this point in the history
  • Loading branch information
michalrus committed Jul 13, 2023
1 parent 693351d commit 85c5df5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions installers/common/WindowsInstaller.hs
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,10 @@ writeInstallerNSIS outName (Version fullVersion') InstallerConfig{installDirecto
iff_ (not_ (lockfileDeleted)) $ do
unsafeInject $ T.unpack $ "Abort \"" <> installDirectory <> " $(AlreadyRunning)\""

iff_ (fileExists "$INSTDIR") $ do
detailPrint "Removing previously installed version"
rmdir [Recursive] "$INSTDIR"

iff_ (fileExists "$APPDATA\\$InstallDir\\Wallet-1.0\\open\\*.*") $
rmdir [] "$APPDATA\\$InstallDir\\Wallet-1.0\\open"
case oBackend of
Expand Down

0 comments on commit 85c5df5

Please sign in to comment.