Changeset 3258

Show
Ignore:
Timestamp:
06/22/08 20:47:30 (5 months ago)
Author:
xuesheng
Message:

Updated to use the new --shutdown command-line option when
called by the installer to monitor an SQL database upgrade

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/b0_22_2/windows/msgcapture.nsi

    r3149 r3258  
    9393# (this is the default behaviour). 
    9494# 
    95 # When the main POPFile installer (or the 'Add POPFile User' wizard) calls this utility, 
    96 # different header text is required so the installer (and wizard) use /TIMEOUT=PFI to 
    97 # inform the utility. 
     95# When the main POPFile installer (or the 'Add POPFile User' wizard) calls this utility 
     96# some different header text is required and the POPFile program has to be started with 
     97# a special command-line option used only by the installer therefore the installer 
     98# (and the 'Add POPFile User' wizard) use /TIMEOUT=PFI to inform the utility. 
    9899# 
    99100# Uppercase or lowercase can be used for the command-line switch. 
     
    118119  ;-------------------------------------------------------------------------- 
    119120 
    120   !define C_VERSION             "0.1.8
     121  !define C_VERSION             "0.1.9
    121122 
    122123  !define C_OUTFILE             "msgcapture.exe" 
    123  
    124   ; The timeout (in seconds) used when a pre-0.23.0 version of the installer calls 
    125   ; this utility to monitor the SQL database upgrade. Note: 30 seconds may not be 
    126   ; long enough to cope with the upgrade of very large databases (over 100 MB) on 
    127   ; some systems. 
    128  
    129   !define C_INSTALLER_TIMEOUT   30 
    130124 
    131125  ;-------------------------------------------------------------------------- 
     
    173167  VIAddVersionKey "CompanyName"             "The POPFile Project" 
    174168  VIAddVersionKey "LegalTrademarks"         "POPFile is a registered trademark of John Graham-Cumming" 
    175   VIAddVersionKey "LegalCopyright"          "Copyright (c) ${C_BUILD_YEAR} John Graham-Cumming" 
     169  VIAddVersionKey "LegalCopyright"          "Copyright (c) ${C_BUILD_YEAR} John Graham-Cumming" 
    176170  VIAddVersionKey "FileDescription"         "PFI Message Capture Utility (0-99 sec timeout)" 
    177171  VIAddVersionKey "FileVersion"             "${C_VERSION}" 
     
    352346installer_mode: 
    353347  StrCpy $G_MODE_FLAG "PFI" 
    354   StrCpy ${L_TEMP} ${C_INSTALLER_TIMEOUT} 
    355   Goto exit 
    356348 
    357349default: 
     
    402394  !define L_TEMP          $R6 
    403395  !define L_TRAYICON      $R5   ; system tray icon enabled ("i" ) or disabled ("") flag 
    404   !define L_OPTIONS       $R4   ; POPFile 0.23.0 no longer displays startup messages by default 
     396  !define L_OPTIONS       $R4   ; POPFile 2.x no longer displays startup messages by default 
    405397                                ; so we use the --verbose option to turn them back on 
    406398 
     
    460452  DetailPrint "POPFILE_USER = ${L_PFI_USER}" 
    461453 
    462   ; Starting with the 0.23.0 release, POPFile no longer displays startup messages 
    463   ; so we use the 'verbose' option to turn them on. Earlier POPFile releases do not 
    464   ; recognize this option and will not run if it is used, so we use the Database.pm 
    465   ; file as a simple POPFile version test (this file was first used in 0.23.0) 
    466  
    467454  ; This utility is called by the "Add POPFile User" wizard (adduser.exe) with the option 
    468455  ; '/TIMEOUT=PFI' when the installer detects that an existing SQL database is to be upgraded. 
     
    471458  ; these are the only indication that POPFile is still working. 
    472459  ; 
    473   ; Since POPFile cannot be used during the upgrade and the installer cannot easily monitor 
    474   ; the progress of the upgrade, a new POPFile command-line option was added for the 0.23.0 
    475   ; release. 
     460  ; Starting with the 1.1.0 release, a new command-line option (--shutdown) causes POPFile 
     461  ; to shutdown after performing the upgrade so when monitoring a SQL database upgrade we 
     462  ; simply wait for POPFile to terminate (prior to the 1.1.0 release a less than satisfactory 
     463  ; 'one-size-fits-all' timeout was used instead). 
    476464  ; 
    477   ; This new option (--shutdown) causes POPFile to shutdown after performing the upgrade so 
    478   ; when monitoring a SQL database upgrade we simply wait for POPFile to terminate (instead 
    479   ; of using a less than satisfactory 'one-size-fits-all' timeout). 
     465  ; Starting with the 2.x release, POPFile no longer displays startup messages 
     466  ; so we use the 'verbose' option to turn them on. Earlier POPFile releases do not 
     467  ; recognize this option and will not run if it is used, so we use the Database.pm 
     468  ; file as a simple POPFile version test (this file was first used in 2.x) 
    480469 
    481470  StrCpy ${L_OPTIONS} "" 
    482   IfFileExists "${L_PFI_ROOT}\POPFile\Database.pm" 0 look_for_ex
     471  IfFileExists "${L_PFI_ROOT}\POPFile\Database.pm" 0 check_mod
    483472  StrCpy ${L_OPTIONS} "--verbose" 
     473 
     474check_mode: 
    484475  StrCmp $G_MODE_FLAG "" look_for_exe 
    485476