From: Brian S. <xue...@us...> - 2007-10-21 22:15:48
|
Update of /cvsroot/popfile/windows In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20511 Modified Files: Tag: b0_22_2 pfi-library.nsh Log Message: To make future maintenance easier make the OnDemand utility use library functions instead of local ones. Make the notes on the LockedList plugin agree with what the code now does. Index: pfi-library.nsh =================================================================== RCS file: /cvsroot/popfile/windows/pfi-library.nsh,v retrieving revision 1.53.4.12 retrieving revision 1.53.4.13 diff -C2 -d -r1.53.4.12 -r1.53.4.13 *** pfi-library.nsh 20 Oct 2007 13:02:07 -0000 1.53.4.12 --- pfi-library.nsh 21 Oct 2007 22:15:50 -0000 1.53.4.13 *************** *** 39,49 **** # (7) MONITORCC defined in MonitorCC.nsi (the corpus conversion monitor) # (8) MSGCAPTURE defined in msgcapture.nsi (used to capture POPFile's console messages) ! # (9) PFIDIAG defined in test\pfidiag.nsi (helps diagnose installer-related problems) ! # (10) RESTORE defined in restore.nsi (POPFile 'User Data' Restore utility) ! # (11) RUNPOPFILE defined in runpopfile.nsi (simple front-end for popfile.exe) ! # (12) RUNSQLITE defined in runsqlite.nsi (simple front-end for sqlite.exe/sqlite3.exe) ! # (13) STOP_POPFILE defined in stop_popfile.nsi (the 'POPFile Silent Shutdown' utility) ! # (14) TRANSLATOR defined in test\translator.nsi (main installer translations testbed) ! # (15) TRANSLATOR_AUW defined in test\transAUW.nsi ('Add POPFile User' translations testbed) #-------------------------------------------------------------------------- --- 39,50 ---- # (7) MONITORCC defined in MonitorCC.nsi (the corpus conversion monitor) # (8) MSGCAPTURE defined in msgcapture.nsi (used to capture POPFile's console messages) ! # (9) ONDEMAND defined in add-ons\OnDemand.nsi (starts POPFile & email client together) ! # (10) PFIDIAG defined in test\pfidiag.nsi (helps diagnose installer-related problems) ! # (11) RESTORE defined in restore.nsi (POPFile 'User Data' Restore utility) ! # (12) RUNPOPFILE defined in runpopfile.nsi (simple front-end for popfile.exe) ! # (13) RUNSQLITE defined in runsqlite.nsi (simple front-end for sqlite.exe/sqlite3.exe) ! # (14) STOP_POPFILE defined in stop_popfile.nsi (the 'POPFile Silent Shutdown' utility) ! # (15) TRANSLATOR defined in test\translator.nsi (main installer translations testbed) ! # (16) TRANSLATOR_AUW defined in test\transAUW.nsi ('Add POPFile User' translations testbed) #-------------------------------------------------------------------------- *************** *** 59,63 **** #-------------------------------------------------------------------------- ! !define C_PFI_LIBRARY_VERSION "0.3.6" #-------------------------------------------------------------------------- --- 60,64 ---- #-------------------------------------------------------------------------- ! !define C_PFI_LIBRARY_VERSION "0.3.7" #-------------------------------------------------------------------------- *************** *** 1089,1093 **** !macroend ! !ifdef ADDSSL | ADDUSER | BACKUP | INSTALLER | MONITORCC | RESTORE #-------------------------------------------------------------------------- # Installer Function: PFI_AtLeastWinNT4 --- 1090,1094 ---- !macroend ! !ifdef ADDSSL | ADDUSER | BACKUP | INSTALLER | MONITORCC | ONDEMAND | RESTORE #-------------------------------------------------------------------------- # Installer Function: PFI_AtLeastWinNT4 *************** *** 1113,1140 **** # Macro: PFI_CheckIfLocked # ! # The installation process and the uninstall process may both use a function which checks if ! # a particular executable file (an EXE file) is being used. This macro makes maintenance easier ! # by ensuring that both processes use identical functions, with the only difference being their ! # names. # ! # There are several different ways to run POPFile so the PFI_CheckIfLocked function accepts a list ! # of full pathnames to the executable files which are to be checked (to make it easier to check ! # the various ways in which POPFile can be run). This list is passed via the stack, with a marker ! # string being used to mark the end of the list. # ! # Normally the LockedList plugin will be used to check if any of the specified executable files is ! # is use. This plugin returns its results on the stack, sandwiched between "/start" and "/end" markers ! # ("/start" appears at the top of the stack). If no files are locked, the plugin simply returns both ! # markers on the stack: # ! # (top of stack) /start ! # (top of stack - 1) /end # ! # Note that if an executable was started using an SFN path then the plugin must also ! # be given the SFN path (if the plugin is only supplied with the equivalent LFN path ! # then it will fail to detect if the executable is locked). # ! # As a further complication, if a locked file is found the plugin returns the LFN format ! # even if the input list of executable files used the SFN format. # # Unfortunately the 'LockedList' plugin relies upon OS features only found in --- 1114,1162 ---- # Macro: PFI_CheckIfLocked # ! # The installation process and the uninstall process may both require a function ! # which checks if a particular executable file (an EXE file) is being used. This ! # macro makes maintenance easier by ensuring that both processes use identical ! # functions, with the only difference being their names. # ! # There are several different ways to run POPFile so this function accepts a list ! # of full pathnames to the executable files which are to be checked (to make it ! # easier to check the various ways in which POPFile can be run). This list is ! # passed via the stack, with a marker string being used to mark the list's end. # ! # Normally the LockedList plugin will be used to check if any of the specified ! # executable files is use. This plugin returns its results on the stack, ! # sandwiched between "/start" and "/end" markers ("/start" appears at the top ! # of the stack). If no files are locked, the plugin simply returns both of these ! # markers on the stack, like this: # ! # (top of stack) /start ! # (top of stack - 1) /end # ! # Note that the format of the path supplied to the plugin is important. If a program ! # was started from a 'hybrid' path using a mixture of SFN and LFN names, such as ! # "C:\PROGRA~1\POPFILE\popfileib.exe", and the plugin is given the equivalent LFN ! # path ("C:\Program Files\POPFile\popfileib.exe") then the plugin will fail to detect ! # if this particular executable is locked. # ! # To avoid these LFN/SFN problems we use the plugin's special "filename only" mode by ! # supplying the file name without the path. In this mode the plugin returns a list of ! # paths to any running processes that match the filename so all we have to do is loop ! # through the results looking for a match. ! # ! #------------------------------------------------------------------------------------ ! # ! # The 'NSIS Wiki' page for the 'LockedList' plugin (description and download links) is ! # http://nsis.sourceforge.net/LockedList_plug-in ! # ! # To compile this script, copy the 'LockedList.dll' file to the standard NSIS plugins ! # folder (${NSISDIR}\Plugins\). The 'LockedList' source and example files can be ! # unzipped to the appropriate ${NSISDIR} sub-folders if you wish, but this step is ! # entirely optional. ! # ! # Tested using LockedList plugin v0.4 (RC2) timestamped 27 September 2007 19:42 ! # (this is the first version to support the new "filename only" mode which we use) ! # ! # The plugin's history can be found at http://nsis.sourceforge.net/File:LockedList.zip ! #------------------------------------------------------------------------------------ # # Unfortunately the 'LockedList' plugin relies upon OS features only found in *************** *** 1146,1158 **** # # NOTE: ! # The !insertmacro PFI_CheckIfLocked "" and !insertmacro PFI_CheckIfLocked "un." commands are included ! # in this file so the NSIS script can use 'Call PFI_CheckIfLocked' and 'Call un.PFI_CheckIfLocked' ! # without additional preparation. # # Inputs: ! # (top of stack) - full path of EXE file to be checked ! # (top of stack - 1) - full path of EXE file to be checked # ... ! # (top of stack - n) - full path of EXE file to be checked # (top of stack - (n + 1)) - end-of-data marker (see C_EXE_END_MARKER definition) # --- 1168,1180 ---- # # NOTE: ! # The !insertmacro PFI_CheckIfLocked "" & !insertmacro PFI_CheckIfLocked "un." commands ! # are included in this file so the NSIS script can use 'Call PFI_CheckIfLocked' and ! # 'Call un.PFI_CheckIfLocked' without additional preparation. # # Inputs: ! # (top of stack) - full path of an EXE file to be checked ! # (top of stack - 1) - full path of an EXE file to be checked # ... ! # (top of stack - n) - full path of an EXE file to be checked # (top of stack - (n + 1)) - end-of-data marker (see C_EXE_END_MARKER definition) # *************** *** 1280,1284 **** !macroend ! !ifdef ADDSSL | ADDUSER | BACKUP | INSTALLER | MONITORCC | RESTORE #-------------------------------------------------------------------------- # Installer Function: PFI_CheckIfLocked --- 1302,1306 ---- !macroend ! !ifdef ADDSSL | ADDUSER | BACKUP | INSTALLER | MONITORCC | ONDEMAND | RESTORE #-------------------------------------------------------------------------- # Installer Function: PFI_CheckIfLocked *************** *** 1644,1648 **** !macroend ! !ifdef ADDUSER | DBSTATUS | INSTALLER | MONITORCC | RESTORE #-------------------------------------------------------------------------- # Installer Function: PFI_GetCompleteFPN --- 1666,1670 ---- !macroend ! !ifdef ADDUSER | DBSTATUS | INSTALLER | MONITORCC | ONDEMAND | RESTORE #-------------------------------------------------------------------------- # Installer Function: PFI_GetCompleteFPN *************** *** 2376,2380 **** !macroend ! !ifndef MONITORCC & RUNPOPFILE & RUNSQLITE & STOP_POPFILE & TRANSLATOR #-------------------------------------------------------------------------- # Installer Function: PFI_GetDateTimeStamp --- 2398,2402 ---- !macroend ! !ifndef MONITORCC & ONDEMAND & RUNPOPFILE & RUNSQLITE & STOP_POPFILE & TRANSLATOR #-------------------------------------------------------------------------- # Installer Function: PFI_GetDateTimeStamp *************** *** 2464,2468 **** !macroend ! !ifdef ADDSSL | ADDUSER | BACKUP | INSTALLER | RESTORE | STOP_POPFILE #-------------------------------------------------------------------------- # Installer Function: PFI_GetFileSize --- 2486,2490 ---- !macroend ! !ifdef ADDSSL | ADDUSER | BACKUP | INSTALLER | ONDEMAND | RESTORE | STOP_POPFILE #-------------------------------------------------------------------------- # Installer Function: PFI_GetFileSize *************** *** 2573,2577 **** !macroend ! !ifndef MONITORCC & RUNPOPFILE & RUNSQLITE & STOP_POPFILE & TRANSLATOR #-------------------------------------------------------------------------- # Installer Function: PFI_GetLocalTime --- 2595,2599 ---- !macroend ! !ifndef MONITORCC & ONDEMAND & RUNPOPFILE & RUNSQLITE & STOP_POPFILE & TRANSLATOR #-------------------------------------------------------------------------- # Installer Function: PFI_GetLocalTime *************** *** 2814,2818 **** !macroend ! !ifndef BACKUP #-------------------------------------------------------------------------- # Installer Function: PFI_GetParameters --- 2836,2840 ---- !macroend ! !ifndef BACKUP & ONDEMAND #-------------------------------------------------------------------------- # Installer Function: PFI_GetParameters *************** *** 2892,2896 **** !macroend ! !ifdef ADDSSL | ADDUSER | BACKUP | DBSTATUS | INSTALLER | MONITORCC | RESTORE | RUNPOPFILE #-------------------------------------------------------------------------- # Installer Function: PFI_GetParent --- 2914,2918 ---- !macroend ! !ifdef ADDSSL | ADDUSER | BACKUP | DBSTATUS | INSTALLER | MONITORCC | ONDEMAND | RESTORE | RUNPOPFILE #-------------------------------------------------------------------------- # Installer Function: PFI_GetParent *************** *** 4178,4182 **** !macroend ! !ifdef ADDSSL | ADDUSER | BACKUP | INSTALLER | RESTORE #-------------------------------------------------------------------------- # Installer Function: PFI_ShutdownViaUI --- 4200,4204 ---- !macroend ! !ifdef ADDSSL | ADDUSER | BACKUP | INSTALLER | ONDEMAND | RESTORE #-------------------------------------------------------------------------- # Installer Function: PFI_ShutdownViaUI *************** *** 4491,4495 **** !macroend ! !ifndef DBSTATUS & IMAPUPDATER & MONITORCC & MSGCAPTURE & RUNSQLITE & STOP_POPFILE & TRANSLATOR #-------------------------------------------------------------------------- # Installer Function: PFI_StrStr --- 4513,4517 ---- !macroend ! !ifndef DBSTATUS & IMAPUPDATER & MONITORCC & MSGCAPTURE & ONDEMAND & RUNSQLITE & STOP_POPFILE & TRANSLATOR #-------------------------------------------------------------------------- # Installer Function: PFI_StrStr *************** *** 4661,4665 **** !macroend ! !ifdef ADDSSL | ADDUSER | INSTALLER #-------------------------------------------------------------------------- # Installer Function: PFI_WaitUntilUnlocked --- 4683,4687 ---- !macroend ! !ifdef ADDSSL | ADDUSER | INSTALLER | ONDEMAND #-------------------------------------------------------------------------- # Installer Function: PFI_WaitUntilUnlocked |