From bff077f958c47e1534ffceb4bd23b86aedbf82fe Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Mon, 2 Jan 2023 08:09:01 -0500 Subject: [PATCH] On Windows, uninstall existing version silently before installing, since VST3 was changed from a file to a folder. --- installer.nsi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/installer.nsi b/installer.nsi index 56ff812d..1c28be6a 100644 --- a/installer.nsi +++ b/installer.nsi @@ -78,6 +78,14 @@ Section "${NAME}" INSTALL_SECTION SectionIn RO SetOutPath "$INSTDIR" + # Uninstall existing version silently before installing. + # This is needed because the VST3 adapter used to be a file, and now it is a bundle (folder), and NSIS can't overwrite files with folders. + # "_?=" makes the uninstaller block until exit. Explanation at bottom of page: + # https://nsis.sourceforge.io/Docs/Chapter3.html + # Fails gracefully if uninstaller does not exist. + DetailPrint "Uninstalling existing version" + ExecWait '"$INSTDIR\Uninstall.exe" /S _?=$INSTDIR' + File /r "dist\${RACK_DIR}\*" ; Store installation folder