From: Brian S. <xue...@us...> - 2007-10-20 13:02:05
|
Update of /cvsroot/popfile/windows In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13451 Modified Files: Tag: b0_22_2 installer-SecPOPFile-func.nsh installer-Uninstall.nsh pfi-library.nsh Log Message: Changed the PFI_CheckIfLocked macro-based function to use the new filename-only mode of the LockedList plugin in an attempt to solve the problems found by standard users on Windows XP. Provided more detail in the shutdown log entries. Index: installer-SecPOPFile-func.nsh =================================================================== RCS file: /cvsroot/popfile/windows/installer-SecPOPFile-func.nsh,v retrieving revision 1.1.2.8 retrieving revision 1.1.2.9 diff -C2 -d -r1.1.2.8 -r1.1.2.9 *** installer-SecPOPFile-func.nsh 18 Oct 2007 01:38:07 -0000 1.1.2.8 --- installer-SecPOPFile-func.nsh 20 Oct 2007 13:02:07 -0000 1.1.2.9 *************** *** 380,384 **** ; The program files we are about to update are in use so we need to shut POPFile down ! DetailPrint "... one of them is locked." ; Attempt to discover which POPFile UI port is used by the current user, so we can issue --- 380,384 ---- ; The program files we are about to update are in use so we need to shut POPFile down ! DetailPrint "'${L_EXE}' appears to be locked." ; Attempt to discover which POPFile UI port is used by the current user, so we can issue Index: pfi-library.nsh =================================================================== RCS file: /cvsroot/popfile/windows/pfi-library.nsh,v retrieving revision 1.53.4.11 retrieving revision 1.53.4.12 diff -C2 -d -r1.53.4.11 -r1.53.4.12 *** pfi-library.nsh 18 Oct 2007 01:41:58 -0000 1.53.4.11 --- pfi-library.nsh 20 Oct 2007 13:02:07 -0000 1.53.4.12 *************** *** 59,63 **** #-------------------------------------------------------------------------- ! !define C_PFI_LIBRARY_VERSION "0.3.5" #-------------------------------------------------------------------------- --- 59,63 ---- #-------------------------------------------------------------------------- ! !define C_PFI_LIBRARY_VERSION "0.3.6" #-------------------------------------------------------------------------- *************** *** 1179,1185 **** !define PFI_CheckIfLocked - var /GLOBAL G_CIL_EXE var /GLOBAL G_CIL_FILE var /GLOBAL G_CIL_FLAG var /GLOBAL G_CIL_TEMP --- 1179,1185 ---- !define PFI_CheckIfLocked var /GLOBAL G_CIL_FILE var /GLOBAL G_CIL_FLAG + var /GLOBAL G_CIL_PATH var /GLOBAL G_CIL_TEMP *************** *** 1192,1224 **** ; The target system provides the features required by the LockedList plugin ! StrCpy $G_CIL_FLAG "emptylist" get_exe_path: ! Pop $G_CIL_EXE ! StrCmp $G_CIL_EXE "${C_EXE_END_MARKER}" start_search ! IfFileExists "$G_CIL_EXE" 0 get_exe_path ! StrCpy $G_CIL_FLAG "gotlist" ! ; LockedList plugin searches for _exact_ path match so we need to supply LFN and SFN paths ! ; (note that when the SFN path is supplied, the filename part of the path is NOT given in ! ; the SFN format, so "popfileif.exe" is NOT replaced by something like "POPFIL~2.EXE") ! GetFullPathName $G_CIL_FILE "$G_CIL_EXE" ! LockedList::AddModule /NOUNLOAD "$G_CIL_FILE" Push $G_CIL_FILE Call ${UN}PFI_GetParent ! Pop $G_CIL_EXE ! StrLen $G_CIL_TEMP $G_CIL_EXE IntOp $G_CIL_TEMP $G_CIL_TEMP + 1 StrCpy $G_CIL_FILE $G_CIL_FILE "" $G_CIL_TEMP ! GetFullPathName /SHORT $G_CIL_EXE "$G_CIL_EXE" ! LockedList::AddModule /NOUNLOAD "$G_CIL_EXE\$G_CIL_FILE" ! Goto get_exe_path ! ! start_search: ! StrCmp $G_CIL_FLAG "emptylist" nothing_to_report LockedList::SilentSearch - - StrCpy $G_CIL_EXE "" Pop $G_CIL_TEMP StrCmp $G_CIL_TEMP "/start" get_search_result --- 1192,1226 ---- ; The target system provides the features required by the LockedList plugin ! StrCpy $G_CIL_FLAG "" get_exe_path: ! Pop $G_CIL_PATH ! StrCmp $G_CIL_PATH "${C_EXE_END_MARKER}" list_exhausted ! StrCmp $G_CIL_FLAG "" 0 get_exe_path ! IfFileExists "$G_CIL_PATH" 0 get_exe_path ! ; Normally the POPFile programs are started using a hybrid path, where the filename ! ; is given in LFN rather than SFN form but the remainder of the path is in SFN form. ! ; ! ; For example instead of using the pathname "C:\Program Files\POPFile\popfileif.exe" ! ; or the pathname "C:\PROGRA~1\POPFILE\POPFIL~2.EXE" to start the program, the hybrid ! ; pathname "C:\PROGRA~1\POPFILE\popfileif.exe" is used. ! ; ! ; These hybrid pathnames cause problems because the LockedList plugin searches for ! ; an exact match with the specified pathame. As a workaround we use the plugin's ! ; special "filename only" mode to find, for example, "popfileif.exe" and then ! ; analyse the results to see if any match the path in which we are interested. ! Push $G_CIL_PATH ! Call ${UN}PFI_GetCompleteFPN ! Pop $G_CIL_FILE Push $G_CIL_FILE Call ${UN}PFI_GetParent ! Pop $G_CIL_PATH ! StrLen $G_CIL_TEMP $G_CIL_PATH IntOp $G_CIL_TEMP $G_CIL_TEMP + 1 StrCpy $G_CIL_FILE $G_CIL_FILE "" $G_CIL_TEMP ! LockedList::AddModule /NOUNLOAD "\$G_CIL_FILE" LockedList::SilentSearch Pop $G_CIL_TEMP StrCmp $G_CIL_TEMP "/start" get_search_result *************** *** 1231,1236 **** Pop $G_CIL_TEMP ; get "process ID" (or "/end" marker, if no more data) StrCmp $G_CIL_TEMP "/end" end_of_locked_list ! StrCmp $G_CIL_EXE "" 0 skip_result ! Pop $G_CIL_EXE ; get the "path to executable" result Goto skip_window_caption --- 1233,1241 ---- Pop $G_CIL_TEMP ; get "process ID" (or "/end" marker, if no more data) StrCmp $G_CIL_TEMP "/end" end_of_locked_list ! StrCmp $G_CIL_FLAG "" 0 skip_result ! Call ${UN}PFI_GetCompleteFPN ! Pop $G_CIL_TEMP ; get the full "path to executable" ! StrCmp $G_CIL_TEMP "$G_CIL_PATH\$G_CIL_FILE" 0 skip_window_caption ! StrCpy $G_CIL_FLAG $G_CIL_TEMP Goto skip_window_caption *************** *** 1240,1250 **** skip_window_caption: Pop $G_CIL_TEMP ; ignore the "window caption" result ! goto get_search_result ! ! nothing_to_report: ! StrCpy $G_CIL_EXE "" end_of_locked_list: ! Push $G_CIL_EXE Goto exit --- 1245,1255 ---- skip_window_caption: Pop $G_CIL_TEMP ; ignore the "window caption" result ! Goto get_search_result end_of_locked_list: ! Goto get_exe_path ! ! list_exhausted: ! Push $G_CIL_FLAG Goto exit *************** *** 1256,1274 **** loop: ! Pop $G_CIL_EXE ! StrCmp $G_CIL_EXE "${C_EXE_END_MARKER}" allread StrCmp $G_CIL_FLAG "" 0 loop ! IfFileExists "$G_CIL_EXE" 0 loop ! SetFileAttributes "$G_CIL_EXE" NORMAL ClearErrors ! FileOpen $G_CIL_FILE "$G_CIL_EXE" a FileClose $G_CIL_FILE IfErrors 0 loop ! StrCpy $G_CIL_FLAG "$G_CIL_EXE" Goto loop allread: ! StrCpy $G_CIL_EXE $G_CIL_FLAG ! Push $G_CIL_EXE exit: --- 1261,1278 ---- loop: ! Pop $G_CIL_PATH ! StrCmp $G_CIL_PATH "${C_EXE_END_MARKER}" allread StrCmp $G_CIL_FLAG "" 0 loop ! IfFileExists "$G_CIL_PATH" 0 loop ! SetFileAttributes "$G_CIL_PATH" NORMAL ClearErrors ! FileOpen $G_CIL_FILE "$G_CIL_PATH" a FileClose $G_CIL_FILE IfErrors 0 loop ! StrCpy $G_CIL_FLAG "$G_CIL_PATH" Goto loop allread: ! Push $G_CIL_FLAG exit: *************** *** 1508,1511 **** --- 1512,1516 ---- Call ${UN}PFI_CheckIfLocked Pop ${L_RESULT} + DetailPrint "${UN}PFI_CheckIfLocked returned '${L_RESULT}'" Pop ${L_PATH} *************** *** 1639,1643 **** !macroend ! !ifdef ADDUSER | DBSTATUS | INSTALLER | RESTORE #-------------------------------------------------------------------------- # Installer Function: PFI_GetCompleteFPN --- 1644,1648 ---- !macroend ! !ifdef ADDUSER | DBSTATUS | INSTALLER | MONITORCC | RESTORE #-------------------------------------------------------------------------- # Installer Function: PFI_GetCompleteFPN *************** *** 1649,1660 **** !endif ! #-------------------------------------------------------------------------- ! # Uninstaller Function: un.PFI_GetCompleteFPN ! # ! # This function is used during the uninstall process ! #-------------------------------------------------------------------------- ! ! ;!insertmacro PFI_GetCompleteFPN "un." #-------------------------------------------------------------------------- --- 1654,1666 ---- !endif ! !ifdef ADDUSER | INSTALLER ! #-------------------------------------------------------------------------- ! # Uninstaller Function: un.PFI_GetCompleteFPN ! # ! # This function is used during the uninstall process ! #-------------------------------------------------------------------------- + !insertmacro PFI_GetCompleteFPN "un." + !endif #-------------------------------------------------------------------------- Index: installer-Uninstall.nsh =================================================================== RCS file: /cvsroot/popfile/windows/installer-Uninstall.nsh,v retrieving revision 1.4.2.12 retrieving revision 1.4.2.13 diff -C2 -d -r1.4.2.12 -r1.4.2.13 *** installer-Uninstall.nsh 18 Oct 2007 01:39:05 -0000 1.4.2.12 --- installer-Uninstall.nsh 20 Oct 2007 13:02:07 -0000 1.4.2.13 *************** *** 599,603 **** ; The program files we are about to remove are in use so we need to shut POPFile down ! DetailPrint "Use UAC plugin to call 'un.Shutdown_POPFile' function" GetFunctionAddress ${L_TEMP} un.Shutdown_POPFile --- 599,603 ---- ; The program files we are about to remove are in use so we need to shut POPFile down ! DetailPrint "Use UAC plugin to call 'un.Shutdown_POPFile' function (${L_TEMP})" GetFunctionAddress ${L_TEMP} un.Shutdown_POPFile |