|
From: <xue...@us...> - 2003-07-15 16:04:29
|
Update of /cvsroot/popfile/windows
In directory sc8-pr-cvs1:/tmp/cvs-serv18218
Modified Files:
installer.nsi
Log Message:
Uninstaller needs to check for the old-style UI param in case 'upgrade uninstall' is being used to remove an old version of POPFile.
Index: installer.nsi
===================================================================
RCS file: /cvsroot/popfile/windows/installer.nsi,v
retrieving revision 1.89
retrieving revision 1.90
diff -C2 -d -r1.89 -r1.90
*** installer.nsi 13 Jul 2003 17:32:29 -0000 1.89
--- installer.nsi 15 Jul 2003 16:04:26 -0000 1.90
***************
*** 1780,1783 ****
--- 1780,1784 ----
!define L_CORPUS $R2 ; holds full path to the POPFile corpus data
!define L_SUBFOLDER $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)
; When a normal uninstall is performed, the uninstaller is copied to a uniquely named
***************
*** 1818,1824 ****
check_if_running:
- ; If the POPFile we are about to uninstall is still running,
- ; then one of the EXE files will be 'locked'
-
SetDetailsPrint textonly
DetailPrint "$(un.PFI_LANG_PROGRESS_1)"
--- 1819,1822 ----
***************
*** 1829,1832 ****
--- 1827,1832 ----
IfFileExists "$INSTDIR\popfile.pid" attempt_shutdown
+ ; If the POPFile we are to uninstall is still running, one of the EXE files will be 'locked'
+
IfFileExists "$INSTDIR\wperl.exe" 0 other_perl
SetFileAttributes "$INSTDIR\wperl.exe" NORMAL
***************
*** 1837,1848 ****
other_perl:
! IfFileExists "$INSTDIR\perl.exe" 0 skip_shutdown
SetFileAttributes "$INSTDIR\perl.exe" NORMAL
ClearErrors
FileOpen ${L_CFG} "$INSTDIR\perl.exe" a
FileClose ${L_CFG}
! IfErrors 0 skip_shutdown
attempt_shutdown:
ClearErrors
FileOpen ${L_CFG} $INSTDIR\popfile.cfg r
--- 1837,1851 ----
other_perl:
! IfFileExists "$INSTDIR\perl.exe" 0 remove_shortcuts
SetFileAttributes "$INSTDIR\perl.exe" NORMAL
ClearErrors
FileOpen ${L_CFG} "$INSTDIR\perl.exe" a
FileClose ${L_CFG}
! IfErrors 0 remove_shortcuts
attempt_shutdown:
+ StrCpy ${G_GUI} ""
+ StrCpy ${L_OLDUI} ""
+
ClearErrors
FileOpen ${L_CFG} $INSTDIR\popfile.cfg r
***************
*** 1850,1857 ****
loop:
FileRead ${L_CFG} ${L_LNE}
! IfErrors done
StrCpy ${L_TEMP} ${L_LNE} 10
StrCmp ${L_TEMP} "html_port " got_html_port
Goto loop
--- 1853,1863 ----
loop:
FileRead ${L_CFG} ${L_LNE}
! IfErrors ui_port_done
StrCpy ${L_TEMP} ${L_LNE} 10
StrCmp ${L_TEMP} "html_port " got_html_port
+
+ StrCpy ${L_TEMP} ${L_LNE} 8
+ StrCmp ${L_TEMP} "ui_port " got_ui_port
Goto loop
***************
*** 1860,1877 ****
Goto loop
! done:
FileClose ${L_CFG}
!
Push ${G_GUI}
Call un.TrimNewlines
Call un.StrCheckDecimal
Pop ${G_GUI}
! StrCmp ${G_GUI} "" skip_shutdown
DetailPrint "$(un.PFI_LANG_LOG_1) ${G_GUI}"
NSISdl::download_quiet http://127.0.0.1:${G_GUI}/shutdown "$PLUGINSDIR\shutdown.htm"
Pop ${L_TEMP}
Sleep 250 ; milliseconds
! skip_shutdown:
SetDetailsPrint textonly
--- 1866,1900 ----
Goto loop
! got_ui_port:
! StrCpy ${L_OLDUI} ${L_LNE} 5 8
! Goto loop
!
! ui_port_done:
FileClose ${L_CFG}
!
! StrCmp ${G_GUI} "" use_other_port
Push ${G_GUI}
Call un.TrimNewlines
Call un.StrCheckDecimal
Pop ${G_GUI}
! StrCmp ${G_GUI} "" use_other_port
DetailPrint "$(un.PFI_LANG_LOG_1) ${G_GUI}"
NSISdl::download_quiet http://127.0.0.1:${G_GUI}/shutdown "$PLUGINSDIR\shutdown.htm"
Pop ${L_TEMP}
Sleep 250 ; milliseconds
+ Goto remove_shortcuts
+
+ use_other_port:
+ Push ${L_OLDUI}
+ Call un.TrimNewlines
+ Call un.StrCheckDecimal
+ Pop ${L_OLDUI}
+ StrCmp ${L_OLDUI} "" remove_shortcuts
+ DetailPrint "$(un.PFI_LANG_LOG_1) ${L_OLDUI}"
+ NSISdl::download_quiet http://127.0.0.1:${L_OLDUI}/shutdown "$PLUGINSDIR\shutdown.htm"
+ Pop ${L_TEMP}
+ Sleep 250 ; milliseconds
! remove_shortcuts:
SetDetailsPrint textonly
***************
*** 2043,2046 ****
--- 2066,2070 ----
!undef L_CORPUS
!undef L_SUBFOLDER
+ !undef L_OLDUI
SectionEnd
|