Previously installed plugins with x64 / x86 suffixed names
-
The x64 and x86 suffixes for the plugin names are removed currently (affects Windows versions only).
So if the previous suffixed name version (
MyPlugin x64.vst
) , and the new plugin name version (MyPlugin.vst
) are both installed in the same computer, there will be a conflict in the DAW.To prevent this, the user should uninstall the previous one and then install the new version, but I am sure most the users won't do this :)
What do you think about the solution guys? An automatic uninstall command before the installation inside the Inno setup? Or any ideas?
-
I just manually added the x64 back to the new binaries, not ideal but meh I'll probably get rid of it soon anyway
-
@iamlamprey said in Previously installed plugins with x64 / x86 suffixed names:
I just manually added the x64 back to the new binaries, not ideal but meh I'll probably get rid of it soon anyway
Good idea. Have you renamed AAX version too? Is there any issues while signing/valdating the AAX plugin?
-
@orange I removed the x64 in the first place...
-
@orange I'm removing the old versions here.
[InstallDelete] ; Remove old files with x64 Names Type: files; Name: "{commoncf64}\VST3\MyAwesomeCompany\MyAwesomePlugin x64.vst3" Type: filesandordirs; Name: "{commoncf64}\Avid\Audio\Plug-Ins\MyAwesomeCompany\MyAwesomePlugin x64.aaxplugin"
-
@dustbro Great, thank you.
-
Ok, here is another solution. If the AppID is the same as the old version, and if the old version was created with the Inno setup too, you can run an uninstaller script of the dedicated app just before the installation. Because the AppID will be the identifier.
Also, it will be better to show up YES/NO confirmation buttons that ask if the old version will be uninstalled.
[Code] function GetNumber(var temp: String): Integer; var part: String; pos1: Integer; begin if Length(temp) = 0 then begin Result := -1; Exit; end; pos1 := Pos('.', temp); if (pos1 = 0) then begin Result := StrToInt(temp); temp := ''; end else begin part := Copy(temp, 1, pos1 - 1); temp := Copy(temp, pos1 + 1, Length(temp)); Result := StrToInt(part); end; end; function CompareInner(var temp1, temp2: String): Integer; var num1, num2: Integer; begin num1 := GetNumber(temp1); num2 := GetNumber(temp2); if (num1 = -1) or (num2 = -1) then begin Result := 0; Exit; end; if (num1 > num2) then begin Result := 1; end else if (num1 < num2) then begin Result := -1; end else begin Result := CompareInner(temp1, temp2); end; end; function CompareVersion(str1, str2: String): Integer; var temp1, temp2: String; begin temp1 := str1; temp2 := str2; Result := CompareInner(temp1, temp2); end; function InitializeSetup(): Boolean; var oldVersion: String; uninstaller: String; ErrorCode: Integer; vCurID :String; vCurAppName :String; begin vCurID:= '{#SetupSetting("AppId")}'; vCurAppName:= '{#SetupSetting("AppName")}'; //remove first "{" of ID vCurID:= Copy(vCurID, 2, Length(vCurID) - 1); // if RegKeyExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\' + vCurID + '_is1') then begin RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\' + vCurID + '_is1', 'DisplayVersion', oldVersion); if (CompareVersion(oldVersion, '{#SetupSetting("AppVersion")}') < 0) then begin if MsgBox('The old version (' + oldVersion + ') of ' + vCurAppName + ' is already installed. This old version will be uninstalled, do you want to continue?', mbConfirmation, MB_YESNO) = IDNO then begin Result := False; end else begin RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\' + vCurID + '_is1', 'UninstallString', uninstaller); ShellExec('runas', uninstaller, '/SILENT', '', SW_HIDE, ewWaitUntilTerminated, ErrorCode); Result := True; end; end else begin if (CompareVersion(oldVersion, '{#SetupSetting("AppVersion")}') = 0) then begin MsgBox('The same version ' + oldVersion + ' of ' + vCurAppName + ' is already installed. This installer will exit.', mbInformation, MB_OK); Result := False; end else begin MsgBox('A Newer version ' + oldVersion + ' of ' + vCurAppName + ' is already installed. To install this version, please firstly uninstall the current one. This installer will exit.', mbInformation, MB_OK); Result := False; end; end; end else begin Result := True; end; end;
-
@orange Just tested this script. Works great
-
@dustbro Yes it works great. I've already included this on my installers a couple of days ago :)