|
From: <xue...@us...> - 2003-10-05 10:01:54
|
Update of /cvsroot/popfile/windows
In directory sc8-pr-cvs1:/tmp/cvs-serv7569
Modified Files:
installer.nsi pfi-library.nsh
Log Message:
Uninstall only the default corpus & history and avoid unnecessary AUTOEXEC.BAT processing on Win9x.
Index: installer.nsi
===================================================================
RCS file: /cvsroot/popfile/windows/installer.nsi,v
retrieving revision 1.124
retrieving revision 1.125
diff -C2 -d -r1.124 -r1.125
*** installer.nsi 4 Oct 2003 11:03:48 -0000 1.124
--- installer.nsi 5 Oct 2003 10:01:49 -0000 1.125
***************
*** 2378,2384 ****
!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)
--- 2378,2382 ----
***************
*** 2397,2408 ****
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)"
--- 2395,2398 ----
***************
*** 2624,2629 ****
RMDir $INSTDIR\languages
! RMDir /r "${L_CORPUS}"
! RMDir /r "${L_HISTORY}"
Delete $INSTDIR\stopwords
--- 2614,2621 ----
RMDir $INSTDIR\languages
! RMDir /r $INSTDIR\corpus
!
! Delete $INSTDIR\messages\*.*
! RMDir $INSTDIR\messages
Delete $INSTDIR\stopwords
***************
*** 2631,2638 ****
Delete $INSTDIR\stopwords.default
! ;----------------------------------
! ; Delete Kakasi - start
! ;----------------------------------
!
RMDir /r "$INSTDIR\kakasi"
--- 2623,2627 ----
Delete $INSTDIR\stopwords.default
! IfFIleExists "$INSTDIR\kakasi\*.*" 0 skip_kakasi
RMDir /r "$INSTDIR\kakasi"
***************
*** 2644,2651 ****
Call un.DeleteEnvStr
! ;----------------------------------
! ; Delete Kakasi - end
! ;----------------------------------
!
SetDetailsPrint textonly
DetailPrint "$(un.PFI_LANG_PROGRESS_6)"
--- 2633,2637 ----
Call un.DeleteEnvStr
! skip_kakasi:
SetDetailsPrint textonly
DetailPrint "$(un.PFI_LANG_PROGRESS_6)"
***************
*** 2687,2693 ****
!undef L_CFG
- !undef L_CORPUS
!undef L_EXE
- !undef L_HISTORY
!undef L_LNE
!undef L_OLDUI
--- 2673,2677 ----
Index: pfi-library.nsh
===================================================================
RCS file: /cvsroot/popfile/windows/pfi-library.nsh,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** pfi-library.nsh 4 Oct 2003 00:42:37 -0000 1.15
--- pfi-library.nsh 5 Oct 2003 10:01:49 -0000 1.16
***************
*** 386,466 ****
#--------------------------------------------------------------------------
! Function un.GetHistoryPath
!
! !define L_FILE_HANDLE $R9
! !define L_HISTORY $R8
! !define L_RESULT $R7
! !define L_SOURCE $R6
! !define L_TEMP $R5
!
! Exch ${L_SOURCE} ; where we are supposed to look for the 'popfile.cfg' file
! Push ${L_RESULT}
! Exch
! Push ${L_HISTORY}
! Push ${L_FILE_HANDLE}
! Push ${L_TEMP}
!
! StrCpy ${L_HISTORY} ""
!
! IfFileExists "${L_SOURCE}\popfile.cfg" 0 use_default_locn
! ClearErrors
! FileOpen ${L_FILE_HANDLE} "${L_SOURCE}\popfile.cfg" r
!
! loop:
! FileRead ${L_FILE_HANDLE} ${L_TEMP}
! IfErrors cfg_file_done
! StrCpy ${L_RESULT} ${L_TEMP} 7
! StrCmp ${L_RESULT} "msgdir " got_old_msgdir
! StrCpy ${L_RESULT} ${L_TEMP} 14
! StrCmp ${L_RESULT} "GLOBAL_msgdir " got_new_msgdir
! Goto loop
!
! got_old_msgdir:
! StrCpy ${L_HISTORY} ${L_TEMP} "" 7
! Goto loop
!
! got_new_msgdir:
! StrCpy ${L_HISTORY} ${L_TEMP} "" 14
! Goto loop
!
! cfg_file_done:
! FileClose ${L_FILE_HANDLE}
! Push ${L_HISTORY}
! Call un.TrimNewlines
! Pop ${L_HISTORY}
! StrCmp ${L_HISTORY} "" use_default_locn use_cfg_data
!
! use_default_locn:
! StrCpy ${L_RESULT} "${L_SOURCE}\messages"
! Goto got_result
!
! use_cfg_data:
! StrCpy ${L_TEMP} ${L_HISTORY} 1 -1
! StrCmp ${L_TEMP} "/" strip_slash no_trailing_slash
! StrCmp ${L_TEMP} "\" 0 no_trailing_slash
!
! strip_slash:
! StrCpy ${L_HISTORY} ${L_HISTORY} -1
!
! no_trailing_slash:
! Push ${L_SOURCE}
! Push ${L_HISTORY}
! Call un.GetDataPath
! Pop ${L_RESULT}
!
! got_result:
! Pop ${L_TEMP}
! Pop ${L_FILE_HANDLE}
! Pop ${L_HISTORY}
! Pop ${L_SOURCE}
! Exch ${L_RESULT} ; place full path of 'messages' directory on top of the stack
!
! !undef L_FILE_HANDLE
! !undef L_HISTORY
! !undef L_RESULT
! !undef L_SOURCE
! !undef L_TEMP
!
! FunctionEnd
--- 386,466 ----
#--------------------------------------------------------------------------
! ;Function un.GetHistoryPath
! ;
! ; !define L_FILE_HANDLE $R9
! ; !define L_HISTORY $R8
! ; !define L_RESULT $R7
! ; !define L_SOURCE $R6
! ; !define L_TEMP $R5
! ;
! ; Exch ${L_SOURCE} ; where we are supposed to look for the 'popfile.cfg' file
! ; Push ${L_RESULT}
! ; Exch
! ; Push ${L_HISTORY}
! ; Push ${L_FILE_HANDLE}
! ; Push ${L_TEMP}
! ;
! ; StrCpy ${L_HISTORY} ""
! ;
! ; IfFileExists "${L_SOURCE}\popfile.cfg" 0 use_default_locn
! ; ClearErrors
! ; FileOpen ${L_FILE_HANDLE} "${L_SOURCE}\popfile.cfg" r
! ;
! ;loop:
! ; FileRead ${L_FILE_HANDLE} ${L_TEMP}
! ; IfErrors cfg_file_done
! ; StrCpy ${L_RESULT} ${L_TEMP} 7
! ; StrCmp ${L_RESULT} "msgdir " got_old_msgdir
! ; StrCpy ${L_RESULT} ${L_TEMP} 14
! ; StrCmp ${L_RESULT} "GLOBAL_msgdir " got_new_msgdir
! ; Goto loop
! ;
! ;got_old_msgdir:
! ; StrCpy ${L_HISTORY} ${L_TEMP} "" 7
! ; Goto loop
! ;
! ;got_new_msgdir:
! ; StrCpy ${L_HISTORY} ${L_TEMP} "" 14
! ; Goto loop
! ;
! ;cfg_file_done:
! ; FileClose ${L_FILE_HANDLE}
! ; Push ${L_HISTORY}
! ; Call un.TrimNewlines
! ; Pop ${L_HISTORY}
! ; StrCmp ${L_HISTORY} "" use_default_locn use_cfg_data
! ;
! ;use_default_locn:
! ; StrCpy ${L_RESULT} "${L_SOURCE}\messages"
! ; Goto got_result
! ;
! ;use_cfg_data:
! ; StrCpy ${L_TEMP} ${L_HISTORY} 1 -1
! ; StrCmp ${L_TEMP} "/" strip_slash no_trailing_slash
! ; StrCmp ${L_TEMP} "\" 0 no_trailing_slash
! ;
! ;strip_slash:
! ; StrCpy ${L_HISTORY} ${L_HISTORY} -1
! ;
! ;no_trailing_slash:
! ; Push ${L_SOURCE}
! ; Push ${L_HISTORY}
! ; Call un.GetDataPath
! ; Pop ${L_RESULT}
! ;
! ;got_result:
! ; Pop ${L_TEMP}
! ; Pop ${L_FILE_HANDLE}
! ; Pop ${L_HISTORY}
! ; Pop ${L_SOURCE}
! ; Exch ${L_RESULT} ; place full path of 'messages' directory on top of the stack
! ;
! ; !undef L_FILE_HANDLE
! ; !undef L_HISTORY
! ; !undef L_RESULT
! ; !undef L_SOURCE
! ; !undef L_TEMP
! ;
! ;FunctionEnd
***************
*** 602,606 ****
#--------------------------------------------------------------------------
! !insertmacro GetCorpusPath "un."
--- 602,606 ----
#--------------------------------------------------------------------------
! ;!insertmacro GetCorpusPath "un."
***************
*** 750,754 ****
#--------------------------------------------------------------------------
! !insertmacro GetDataPath "un."
--- 750,754 ----
#--------------------------------------------------------------------------
! ;!insertmacro GetDataPath "un."
***************
*** 825,829 ****
#--------------------------------------------------------------------------
! !insertmacro StrBackSlash "un."
--- 825,829 ----
#--------------------------------------------------------------------------
! ;!insertmacro StrBackSlash "un."
***************
*** 896,900 ****
#--------------------------------------------------------------------------
! !insertmacro GetParent "un."
--- 896,900 ----
#--------------------------------------------------------------------------
! ;!insertmacro GetParent "un."
***************
*** 975,979 ****
#--------------------------------------------------------------------------
! ; !insertmacro StrStr "un." ;' Temporarily disabled [03-Oct-03]
--- 975,979 ----
#--------------------------------------------------------------------------
! ; !insertmacro StrStr "un."
|