There is no conflict on Windows.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2018-01-11 13:47:56 +02:00
parent 225db2efc6
commit 334983bc6e

View file

@ -11,7 +11,6 @@
; Appstatus: "" = release, "b" = beta, "a" = alpha ; Appstatus: "" = release, "b" = beta, "a" = alpha
; this only modifies the resulting exe name of the installer package ;-) ; this only modifies the resulting exe name of the installer package ;-)
#define MyAppStatus "a" #define MyAppStatus "a"
#define ConflictingAppId "{7081AEC7-38FC-479F-B712-DB073BB76513}"
[Setup] [Setup]
; NOTE: The value of AppId uniquely identifies this application. ; NOTE: The value of AppId uniquely identifies this application.
@ -417,37 +416,29 @@ var
InstallationCanceledMessage : String; InstallationCanceledMessage : String;
begin begin
if RegKeyExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{#ConflictingAppId}_is1') or // Create a mutex for the installer and if it's already running then show a message and stop installation
RegKeyExists(HKEY_CURRENT_USER, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{#ConflictingAppId}_is1') then if CheckForMutexes(installer_mutex_name) then begin
begin SuppressibleMsgBox(ExpandConstant('{cm:SetupIsRunningWarning}'), mbError, MB_OK, MB_OK);
MsgBox('Detected conflicting application. Please, uninstall Seamly2D before proceeding installation.', mbError, MB_OK);
Result := False; Result := False;
end end
else begin else begin
// Create a mutex for the installer and if it's already running then show a message and stop installation Result := True;
if CheckForMutexes(installer_mutex_name) then begin CreateMutex(installer_mutex_name);
SuppressibleMsgBox(ExpandConstant('{cm:SetupIsRunningWarning}'), mbError, MB_OK, MB_OK);
Result := False; ProgramRunningOnInstallMessage := ExpandConstant('{cm:WarnRunningOnUnInstall1}') + #13 + #13 + ExpandConstant('{cm:WarnRunningOnUnInstall2}');
end InstallationCanceledMessage := ExpandConstant('{cm:WarnCancelInstall}');
else begin
Result := True; Result := PromptUntilProgramClosedOrInstallationCanceled( ProgramExeName1, ProgramName1 + ProgramRunningOnInstallMessage)
CreateMutex(installer_mutex_name); If Result Then
begin
ProgramRunningOnInstallMessage := ExpandConstant('{cm:WarnRunningOnUnInstall1}') + #13 + #13 + ExpandConstant('{cm:WarnRunningOnUnInstall2}'); Result := PromptUntilProgramClosedOrInstallationCanceled( ProgramExeName2, ProgramName2 + ProgramRunningOnInstallMessage)
InstallationCanceledMessage := ExpandConstant('{cm:WarnCancelInstall}'); end;
Result := PromptUntilProgramClosedOrInstallationCanceled( ProgramExeName1, ProgramName1 + ProgramRunningOnInstallMessage) if Not Result then
If Result Then begin
begin MsgBox( InstallationCanceledMessage, mbInformation, MB_OK );
Result := PromptUntilProgramClosedOrInstallationCanceled( ProgramExeName2, ProgramName2 + ProgramRunningOnInstallMessage) end else begin
end; Result := VersionCompareAndUninstall
if Not Result then
begin
MsgBox( InstallationCanceledMessage, mbInformation, MB_OK );
end else begin
Result := VersionCompareAndUninstall
end;
end; end;
end; end;
end; end;