This repository has been archived by the owner on Aug 12, 2018. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 268
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
installer: switch to using Inno Setup's
CloseApplications
directive.
Now the installer will not perform a check when it starts for running process(es). Instead, it will warn just before the actual installation and offer to close any running process(es). See also http://www.jrsoftware.org/ishelp/index.php?topic=setup_closeapplications and http://www.jrsoftware.org/ishelp/index.php?topic=setupcmdline
- Loading branch information
Showing
3 changed files
with
2 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -106,6 +106,7 @@ ArchitecturesInstallIn64BitMode=x64 | |
#ifexist "..\signinfo_notepad2-mod.txt" | ||
SignTool=MySignTool | ||
#endif | ||
CloseApplications=true | ||
|
||
|
||
[Languages] | ||
|
@@ -149,7 +150,6 @@ Name: remove_default; Description: {cm:tsk_RemoveDefault}; GroupDescript | |
|
||
|
||
[Files] | ||
Source: psvince.dll; DestDir: {app}; Flags: ignoreversion | ||
Source: {#bindir}\Release_x64\Notepad2.exe; DestDir: {app}; Flags: ignoreversion; Check: Is64BitInstallMode() | ||
Source: {#bindir}\Release_x86\Notepad2.exe; DestDir: {app}; Flags: ignoreversion; Check: not Is64BitInstallMode() | ||
Source: ..\License.txt; DestDir: {app}; Flags: ignoreversion | ||
|
@@ -192,12 +192,6 @@ const | |
installer_mutex = '{#app_name}' + '_setup_mutex'; | ||
IFEO = 'SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe'; | ||
function IsModuleLoaded(modulename: AnsiString): Boolean; | ||
external 'IsModuleLoaded2@files:psvince.dll stdcall setuponly'; | ||
function IsModuleLoadedU(modulename: AnsiString): Boolean; | ||
external 'IsModuleLoaded2@{app}\psvince.dll stdcall uninstallonly'; | ||
#if defined(sse_required) || defined(sse2_required) | ||
function IsProcessorFeaturePresent(Feature: Integer): Boolean; | ||
external '[email protected] stdcall'; | ||
|
@@ -405,8 +399,6 @@ end; | |
function InitializeSetup(): Boolean; | ||
var | ||
iMsgBoxResult: Integer; | ||
begin | ||
// Create a mutex for the installer and if it's already running then show a message and stop installation | ||
if CheckForMutexes(installer_mutex) and not WizardSilent() then begin | ||
|
@@ -417,12 +409,6 @@ begin | |
Result := True; | ||
CreateMutex(installer_mutex); | ||
while IsModuleLoaded('Notepad2.exe') and (iMsgBoxResult <> IDCANCEL) do | ||
iMsgBoxResult := SuppressibleMsgBox(CustomMessage('msg_AppIsRunning'), mbError, MB_OKCANCEL, IDCANCEL); | ||
if iMsgBoxResult = IDCANCEL then | ||
Result := False; | ||
#if defined(sse2_required) | ||
if not IsSSE2Supported() then begin | ||
SuppressibleMsgBox(CustomMessage('msg_simd_sse2'), mbCriticalError, MB_OK, MB_OK); | ||
|
@@ -440,8 +426,6 @@ end; | |
function InitializeUninstall(): Boolean; | ||
var | ||
iMsgBoxResult: Integer; | ||
begin | ||
if CheckForMutexes(installer_mutex) then begin | ||
SuppressibleMsgBox(CustomMessage('msg_SetupIsRunningWarning'), mbError, MB_OK, MB_OK); | ||
|
@@ -451,14 +435,5 @@ begin | |
Result := True; | ||
CreateMutex(installer_mutex); | ||
// Check if Notepad2 is running during uninstallation | ||
while IsModuleLoadedU('Notepad2.exe') and (iMsgBoxResult <> IDCANCEL) do | ||
iMsgBoxResult := SuppressibleMsgBox(CustomMessage('msg_AppIsRunningUninstall'), mbError, MB_OKCANCEL, IDCANCEL); | ||
if iMsgBoxResult = IDCANCEL then | ||
Result := False; | ||
// Unload psvince.dll in order to be uninstalled | ||
UnloadDLL(ExpandConstant('{app}\psvince.dll')); | ||
end; | ||
end; |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
1) Implement a mutex in Notepad2 and use that to check if it's running | ||
(a working patch would be really welcome) | ||
2) Use RegQueryStringValue to get the uninstall command for the other versions. | ||
1) Use RegQueryStringValue to get the uninstall command for the other versions. | ||
I need to trim down the command in order to use it. |