|
From: <xue...@us...> - 2003-10-03 19:09:57
|
Update of /cvsroot/popfile/windows
In directory sc8-pr-cvs1:/tmp/cvs-serv18861
Modified Files:
installer.nsi pfi-library.nsh
Log Message:
Remove the 'update uninstall' feature.
Index: installer.nsi
===================================================================
RCS file: /cvsroot/popfile/windows/installer.nsi,v
retrieving revision 1.121
retrieving revision 1.122
diff -C2 -d -r1.121 -r1.122
*** installer.nsi 3 Oct 2003 11:07:11 -0000 1.121
--- installer.nsi 3 Oct 2003 19:09:53 -0000 1.122
***************
*** 1491,1502 ****
# Installer Function: SetOptionsPage (generates a custom page)
#
- # If this is an "upgrade" installation, the user is offered the chance to uninstall the old
- # version before continuing with the upgrade. If an uninstall is selected, the 'uninstall.exe'
- # from THIS installer is used instead of the one from the POPFile which is being upgraded. This
- # is done to ensure that a special "upgrade" uninstall is performed instead of a "normal" one.
- # The "upgrade" uninstall ensures that the corpus and some other files are not removed. After
- # an "upgrade" uninstall, the "SHUTDOWN" warning message is removed from the custom page
- # (POPFile is automatically shutdown during the "upgrade" uninstall).
- #
# This function is used to configure the POP3 and UI ports, and
# whether or not POPFile should be started automatically when Windows starts.
--- 1491,1494 ----
***************
*** 1514,1551 ****
Push ${L_RESULT}
- ; Ensure custom page shows the "Shutdown" warning message box.
-
- !insertmacro MUI_INSTALLOPTIONS_WRITE "ioA.ini" "Settings" "NumFields" "7"
-
- ; If the installation folder contains 'popfile.pl' we assume we are upgrading an old version
- ; of POPFile (up to and including v0.19.1) and if it contains 'popfile.exe' we assume we are
- ; upgrading v0.20.0 or later.
-
- IfFileExists "$INSTDIR\popfile.pl" upgrade_uninstall
- IfFileExists "$INSTDIR\popfile.exe" 0 continue
-
- upgrade_uninstall:
- MessageBox MB_YESNO|MB_ICONEXCLAMATION|MB_DEFBUTTON2 \
- "$(PFI_LANG_OPTIONS_MBUNINST_1) '$INSTDIR'\
- $\r$\n$\r$\n\
- $(PFI_LANG_OPTIONS_MBUNINST_2)\
- $\r$\n$\r$\n\
- ($(PFI_LANG_OPTIONS_MBUNINST_3))" IDNO continue
-
- Banner::show /NOUNLOAD /set 76 "$(PFI_LANG_OPTIONS_BANNER_1)" "$(PFI_LANG_OPTIONS_BANNER_2)"
- WriteUninstaller $INSTDIR\uninstall.exe
- ExecWait '"$INSTDIR\uninstall.exe" /S _?=$INSTDIR'
- IfFileExists "$INSTDIR\popfile.pl" skip_msg_delete
- IfFileExists "$INSTDIR\popfile.exe" skip_msg_delete
-
- ; No need to display the warning about shutting down POPFile as it has just been uninstalled
-
- !insertmacro MUI_INSTALLOPTIONS_WRITE "ioA.ini" "Settings" "NumFields" "5"
-
- skip_msg_delete:
- Banner::destroy
-
- continue:
-
; The function "CheckExistingConfig" loads $G_POP3 and $G_GUI with the settings found in
; a previously installed "popfile.cfg" file or if no such file is found, it loads the
--- 1506,1509 ----
***************
*** 2296,2306 ****
#--------------------------------------------------------------------------
# Uninstaller Section
- #
- # There are two types of uninstall:
- #
- # (1) normal uninstall, performed when user wishes to completely remove POPFile from the system
- #
- # (2) an uninstall performed as part of an upgrade installation. In this case some files are
- # preserved (eg the existing corpus).
#--------------------------------------------------------------------------
--- 2254,2257 ----
***************
*** 2308,2339 ****
!define L_CFG $R9 ; used as file handle
! !define L_LNE $R8 ; a line from popfile.cfg
! !define L_REG_KEY $R7 ; L_REG_* registers are used to restore Outlook Express settings
! !define L_REG_SUBKEY $R6
! !define L_REG_VALUE $R5
! !define L_TEMP $R4
! !define L_UPGRADE $R3 ; "yes" if this is an upgrade, "no" if we are just uninstalling
! !define L_CORPUS $R2 ; holds full path to the POPFile corpus data
! !define L_SUBCORPUS $R1 ; "yes" if corpus is in a subfolder of $INSTDIR, otherwise "no"
! !define L_OLDUI $R0 ; holds old-style UI port (if previous POPFile is an old version)
! !define L_HISTORY $9 ; holds full path to the message history data
! !define L_SUBHISTORY $8 ; "yes" if history data in subfolder of $INSTDIR, otherwise "no"
! !define L_EXE $7 ; full path of the EXE to be monitored
!
! ; When a normal uninstall is performed, the uninstaller is copied to a uniquely named
! ; temporary file and it is that temporary file which is executed (this is how the uninstaller
! ; removes itself). If we are performing an uninstall as part of an upgrade installation then
! ; no temporary file is created, we execute the 'real' file ($INSTDIR\uninstall.exe) instead.
!
! StrCpy ${L_UPGRADE} "no"
!
! Push $CMDLINE
! Push "$INSTDIR\uninstall.exe"
! Call un.StrStr
! Pop ${L_TEMP}
! StrCmp ${L_TEMP} "" confirmation
! StrCpy ${L_UPGRADE} "yes"
- confirmation:
IfFileExists $INSTDIR\popfile.pl skip_confirmation
IfFileExists $INSTDIR\popfile.exe skip_confirmation
--- 2259,2272 ----
!define L_CFG $R9 ; used as file handle
! !define L_CORPUS $R8 ; holds full path to the POPFile corpus data
! !define L_EXE $R7 ; full path of the EXE to be monitored
! !define L_HISTORY $R6 ; holds full path to the message history data
! !define L_LNE $R5 ; a line from popfile.cfg
! !define L_OLDUI $R4 ; holds old-style UI port (if previous POPFile is an old version)
! !define L_REG_KEY $R3 ; L_REG_* registers are used to restore Outlook Express settings
! !define L_REG_SUBKEY $R2
! !define L_REG_VALUE $R1
! !define L_TEMP $R0
IfFileExists $INSTDIR\popfile.pl skip_confirmation
IfFileExists $INSTDIR\popfile.exe skip_confirmation
***************
*** 2345,2376 ****
skip_confirmation:
-
- StrCpy ${L_SUBCORPUS} "yes"
-
Push $INSTDIR
Call un.GetCorpusPath
Pop ${L_CORPUS}
- Push ${L_CORPUS}
- Push $INSTDIR
- Call un.StrStr
- Pop ${L_TEMP}
- StrCmp ${L_TEMP} "" 0 check_msg_folder
- StrCpy ${L_SUBCORPUS} "no"
-
- check_msg_folder:
- StrCpy ${L_SUBHISTORY} "yes"
Push $INSTDIR
Call un.GetHistoryPath
Pop ${L_HISTORY}
! Push ${L_HISTORY}
! Push $INSTDIR
! Call un.StrStr
! Pop ${L_TEMP}
! StrCmp ${L_TEMP} "" 0 check_if_running
! StrCpy ${L_SUBHISTORY} "no"
!
! check_if_running:
!
SetDetailsPrint textonly
DetailPrint "$(un.PFI_LANG_PROGRESS_1)"
--- 2278,2289 ----
skip_confirmation:
Push $INSTDIR
Call un.GetCorpusPath
Pop ${L_CORPUS}
Push $INSTDIR
Call un.GetHistoryPath
Pop ${L_HISTORY}
!
SetDetailsPrint textonly
DetailPrint "$(un.PFI_LANG_PROGRESS_1)"
***************
*** 2489,2496 ****
DetailPrint "$(un.PFI_LANG_PROGRESS_3)"
SetDetailsPrint listonly
!
! ; popfile.pl deleted to indicate an uninstall has occurred (file is checked during 'upgrade')
! ; popfile.exe deleted to indicate an uninstall has occurred (file is checked during 'upgrade')
!
Delete $INSTDIR\popfile.pl
Delete $INSTDIR\popfile.exe
--- 2402,2406 ----
DetailPrint "$(un.PFI_LANG_PROGRESS_3)"
SetDetailsPrint listonly
!
Delete $INSTDIR\popfile.pl
Delete $INSTDIR\popfile.exe
***************
*** 2500,2508 ****
Delete $INSTDIR\wperl.exe
- ; For "upgrade" uninstalls, we leave most files in $INSTDIR
- ; and do not restore Outlook Express settings
-
- StrCmp ${L_UPGRADE} "yes" no_reg_file
-
Delete $INSTDIR\*.gif
Delete $INSTDIR\*.log
--- 2410,2413 ----
***************
*** 2600,2607 ****
RMDir $INSTDIR\languages
- StrCmp ${L_UPGRADE} "yes" skip_corpus
RMDir /r "${L_CORPUS}"
!
! skip_corpus:
Delete $INSTDIR\stopwords
Delete $INSTDIR\stopwords.bak
--- 2505,2511 ----
RMDir $INSTDIR\languages
RMDir /r "${L_CORPUS}"
! RMDir /r "${L_HISTORY}"
!
Delete $INSTDIR\stopwords
Delete $INSTDIR\stopwords.bak
***************
*** 2624,2649 ****
; Delete Kakasi - end
;----------------------------------
!
! StrCmp ${L_UPGRADE} "yes" remove_perl
! RMDir /r "${L_HISTORY}"
!
! remove_perl:
SetDetailsPrint textonly
DetailPrint "$(un.PFI_LANG_PROGRESS_6)"
SetDetailsPrint listonly
! !insertmacro SafeRecursiveRMDir "$INSTDIR\auto"
! !insertmacro SafeRecursiveRMDir "$INSTDIR\Carp"
! !insertmacro SafeRecursiveRMDir "$INSTDIR\Encode"
! !insertmacro SafeRecursiveRMDir "$INSTDIR\Exporter"
! !insertmacro SafeRecursiveRMDir "$INSTDIR\File"
! !insertmacro SafeRecursiveRMDir "$INSTDIR\IO"
! !insertmacro SafeRecursiveRMDir "$INSTDIR\MIME"
! !insertmacro SafeRecursiveRMDir "$INSTDIR\Sys"
! !insertmacro SafeRecursiveRMDir "$INSTDIR\Text"
! !insertmacro SafeRecursiveRMDir "$INSTDIR\warnings"
! !insertmacro SafeRecursiveRMDir "$INSTDIR\Win32"
!
! StrCmp ${L_UPGRADE} "yes" Removed
Delete "$INSTDIR\Uninstall.exe"
--- 2528,2547 ----
; Delete Kakasi - end
;----------------------------------
!
SetDetailsPrint textonly
DetailPrint "$(un.PFI_LANG_PROGRESS_6)"
SetDetailsPrint listonly
! RMDir /r "$INSTDIR\auto"
! RMDir /r "$INSTDIR\Carp"
! RMDir /r "$INSTDIR\Encode"
! RMDir /r "$INSTDIR\Exporter"
! RMDir /r "$INSTDIR\File"
! RMDir /r "$INSTDIR\IO"
! RMDir /r "$INSTDIR\MIME"
! RMDir /r "$INSTDIR\Sys"
! RMDir /r "$INSTDIR\Text"
! RMDir /r "$INSTDIR\warnings"
! RMDir /r "$INSTDIR\Win32"
Delete "$INSTDIR\Uninstall.exe"
***************
*** 2670,2685 ****
!undef L_CFG
!undef L_LNE
!undef L_REG_KEY
!undef L_REG_SUBKEY
!undef L_REG_VALUE
!undef L_TEMP
- !undef L_UPGRADE
- !undef L_CORPUS
- !undef L_SUBCORPUS
- !undef L_OLDUI
- !undef L_HISTORY
- !undef L_SUBHISTORY
- !undef L_EXE
SectionEnd
--- 2568,2580 ----
!undef L_CFG
+ !undef L_CORPUS
+ !undef L_EXE
+ !undef L_HISTORY
!undef L_LNE
+ !undef L_OLDUI
!undef L_REG_KEY
!undef L_REG_SUBKEY
!undef L_REG_VALUE
!undef L_TEMP
SectionEnd
Index: pfi-library.nsh
===================================================================
RCS file: /cvsroot/popfile/windows/pfi-library.nsh,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** pfi-library.nsh 23 Sep 2003 21:10:52 -0000 1.13
--- pfi-library.nsh 3 Oct 2003 19:09:53 -0000 1.14
***************
*** 854,858 ****
#--------------------------------------------------------------------------
! !insertmacro StrStr "un."
--- 854,858 ----
#--------------------------------------------------------------------------
! ;!insertmacro StrStr "un." ; Temporarily disabled (to avoid a compiler warning) [03-Oct-03]
|