From 1ab9edbd14f8cee1da7823697f3179691ab13c86 Mon Sep 17 00:00:00 2001 From: "rob_strong%exchangecode.com" Date: Wed, 19 Mar 2008 21:27:39 +0000 Subject: [PATCH] Bug 408314 - uninstaller leaves behind empty install directory. r=sspitzer, a1.9=beltzner git-svn-id: svn://10.0.0.236/trunk@248205 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/browser/installer/windows/nsis/shared.nsh | 12 +++--------- .../mozapps/installer/windows/nsis/common.nsh | 15 +++++++++------ 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/mozilla/browser/installer/windows/nsis/shared.nsh b/mozilla/browser/installer/windows/nsis/shared.nsh index 948932e7cd5..547dcadbe57 100755 --- a/mozilla/browser/installer/windows/nsis/shared.nsh +++ b/mozilla/browser/installer/windows/nsis/shared.nsh @@ -551,20 +551,14 @@ !define RemoveDeprecatedKeys "!insertmacro RemoveDeprecatedKeys" ; The files to check if they are in use during (un)install so the restart is -; required message is displayed. +; required message is displayed. All files must be located in the $INSTDIR +; directory. !macro PushFilesToCheck ; The first string to be pushed onto the stack MUST be "end" to indicate - ; that there are no more relative file paths to check and the last string + ; that there are no more files to check in $INSTDIR and the last string ; should be ${FileMainEXE} so if it is in use the CheckForFilesInUse macro ; returns after the first check. Push "end" - Push "chrome\browser.jar" - Push "chrome\classic.jar" - Push "chrome\comm.jar" - Push "chrome\${AB_CD}.jar" - Push "chrome\pippki.jar" - Push "chrome\reporter.jar" - Push "chrome\toolkit.jar" Push "AccessibleMarshal.dll" Push "freebl3.dll" Push "nssckbi.dll" diff --git a/mozilla/toolkit/mozapps/installer/windows/nsis/common.nsh b/mozilla/toolkit/mozapps/installer/windows/nsis/common.nsh index 7ec1adfec08..94cad2ba539 100755 --- a/mozilla/toolkit/mozapps/installer/windows/nsis/common.nsh +++ b/mozilla/toolkit/mozapps/installer/windows/nsis/common.nsh @@ -655,14 +655,16 @@ # Macros for handling files in use /** - * Checks for files in use. + * Checks for files in use in the $INSTDIR directory. To check files in + * sub-directories this macro would need to be rewritten to create + * sub-directories in the temporary directory used to backup the files that are + * checked. * * Example usage: * * ; The first string to be pushed onto the stack MUST be "end" to indicate - * ; that there are no more relative file paths to check. + * ; that there are no more files in the $INSTDIR directory to check. * Push "end" - * Push "chrome\toolkit.jar" * Push "freebl3.dll" * ; The last file pushed should be the app's main exe so if it is in use this * ; macro will return after the first check. @@ -676,9 +678,9 @@ * false if all of the files popped from the stack are not in use. * True if any of the files popped from the stack are in use. * $R7 = Temporary backup directory where the files will be copied to. - * $R8 = value popped from the stack. This will either be a relative file path - * from the $INSTDIR or "end" to indicate that there are no additional - * files to check. + * $R8 = value popped from the stack. This will either be a file name for a file + * in the $INSTDIR directory or "end" to indicate that there are no + * additional files to check. * $R9 = _RESULT */ !macro CheckForFilesInUse @@ -713,6 +715,7 @@ SetOutPath "$INSTDIR" CopyFiles /SILENT "$R7\*" "$INSTDIR\" RmDir /r "$R7" + SetOutPath "$EXEDIR" ClearErrors Push $R9