|
From: <xue...@us...> - 2003-10-08 00:47:58
|
Update of /cvsroot/popfile/windows
In directory sc8-pr-cvs1:/tmp/cvs-serv16356
Modified Files:
installer.nsi
Log Message:
Ensure installer window appears "on top".
Index: installer.nsi
===================================================================
RCS file: /cvsroot/popfile/windows/installer.nsi,v
retrieving revision 1.129
retrieving revision 1.130
diff -C2 -d -r1.129 -r1.130
*** installer.nsi 6 Oct 2003 16:19:59 -0000 1.129
--- installer.nsi 8 Oct 2003 00:47:52 -0000 1.130
***************
*** 336,339 ****
--- 336,345 ----
!define MUI_CUSTOMFUNCTION_GUIINIT PFIGUIInit
+ ; Use a "pre" function for the 'Welcome' page to ensure the installer window is visible
+ ; (if the "Release Notes" were displayed, another window could have been positioned
+ ; to obscure the installer window)
+
+ !define MUI_CUSTOMFUNCTION_WELCOME_PRE "ShowInstaller"
+
; Use a "leave" function to look for 'popfile.cfg' in the directory selected for this install
***************
*** 888,892 ****
!define L_CFG_HANDLE $R9 ; handle for "popfile.cfg"
! !define L_CORPUS_PATH $R8 ; full path to the corpus
!define L_TEMP $R7
--- 894,898 ----
!define L_CFG_HANDLE $R9 ; handle for "popfile.cfg"
! !define L_CORPUS_PATH $R8 ; full path to the corpus
!define L_TEMP $R7
***************
*** 894,907 ****
Push ${L_CORPUS_PATH}
Push ${L_TEMP}
!
IfFileExists "$INSTDIR\popfile.cfg" 0 exit
IfFileExists "$INSTDIR\backup\backup.ini" exit
!
; Use data in 'popfile.cfg' to generate the full path to the corpus folder
!
Push $INSTDIR
Call GetCorpusPath
Pop ${L_CORPUS_PATH}
!
FindFirst ${L_CFG_HANDLE} ${L_TEMP} ${L_CORPUS_PATH}\*.*
--- 900,913 ----
Push ${L_CORPUS_PATH}
Push ${L_TEMP}
!
IfFileExists "$INSTDIR\popfile.cfg" 0 exit
IfFileExists "$INSTDIR\backup\backup.ini" exit
!
; Use data in 'popfile.cfg' to generate the full path to the corpus folder
!
Push $INSTDIR
Call GetCorpusPath
Pop ${L_CORPUS_PATH}
!
FindFirst ${L_CFG_HANDLE} ${L_TEMP} ${L_CORPUS_PATH}\*.*
***************
*** 920,924 ****
; a BerkeleyDB file or a flat-file corpus file. We stop our search as
; soon as we find either type of file (i.e. we do not examine every bucket)
!
IfFileExists "${L_CORPUS_PATH}\${L_TEMP}\table.db" nothing_to_backup
IfFileExists "${L_CORPUS_PATH}\${L_TEMP}\table" backup_corpus
--- 926,930 ----
; a BerkeleyDB file or a flat-file corpus file. We stop our search as
; soon as we find either type of file (i.e. we do not examine every bucket)
!
IfFileExists "${L_CORPUS_PATH}\${L_TEMP}\table.db" nothing_to_backup
IfFileExists "${L_CORPUS_PATH}\${L_TEMP}\table" backup_corpus
***************
*** 926,930 ****
backup_corpus:
!
SetDetailsPrint textonly
DetailPrint "$(PFI_LANG_INST_PROG_FFCBACK)"
--- 932,936 ----
backup_corpus:
!
SetDetailsPrint textonly
DetailPrint "$(PFI_LANG_INST_PROG_FFCBACK)"
***************
*** 934,938 ****
CopyFiles "$INSTDIR\popfile.cfg" "$INSTDIR\backup\popfile.cfg"
WriteINIStr "$INSTDIR\backup\backup.ini" "FlatFileCorpus" "CorpusPath" "${L_CORPUS_PATH}"
!
StrCpy ${L_TEMP} ${L_CORPUS_PATH}
Push ${L_TEMP}
--- 940,944 ----
CopyFiles "$INSTDIR\popfile.cfg" "$INSTDIR\backup\popfile.cfg"
WriteINIStr "$INSTDIR\backup\backup.ini" "FlatFileCorpus" "CorpusPath" "${L_CORPUS_PATH}"
!
StrCpy ${L_TEMP} ${L_CORPUS_PATH}
Push ${L_TEMP}
***************
*** 943,949 ****
IntOp ${L_TEMP} ${L_TEMP} + 1
StrCpy ${L_TEMP} ${L_CORPUS_PATH} "" ${L_TEMP}
!
CopyFiles /SILENT "${L_CORPUS_PATH}\*.*" "$INSTDIR\backup\${L_TEMP}"
!
WriteINIStr "$INSTDIR\backup\backup.ini" "FlatFileCorpus" "Corpus" "${L_TEMP}"
WriteINIStr "$INSTDIR\backup\backup.ini" "FlatFileCorpus" "Status" "new"
--- 949,955 ----
IntOp ${L_TEMP} ${L_TEMP} + 1
StrCpy ${L_TEMP} ${L_CORPUS_PATH} "" ${L_TEMP}
!
CopyFiles /SILENT "${L_CORPUS_PATH}\*.*" "$INSTDIR\backup\${L_TEMP}"
!
WriteINIStr "$INSTDIR\backup\backup.ini" "FlatFileCorpus" "Corpus" "${L_TEMP}"
WriteINIStr "$INSTDIR\backup\backup.ini" "FlatFileCorpus" "Status" "new"
***************
*** 960,968 ****
Pop ${L_CORPUS_PATH}
Pop ${L_CFG_HANDLE}
!
!undef L_CFG_HANDLE
!undef L_CORPUS_PATH
!undef L_TEMP
!
SectionEnd
--- 966,974 ----
Pop ${L_CORPUS_PATH}
Pop ${L_CFG_HANDLE}
!
!undef L_CFG_HANDLE
!undef L_CORPUS_PATH
!undef L_TEMP
!
SectionEnd
***************
*** 1186,1189 ****
--- 1192,1206 ----
#--------------------------------------------------------------------------
+ # Installer Function: ShowInstaller
+ # (the "pre" function for the WELCOME page)
+ #
+ # Ensure the installer window is not hidden behind any other windows
+ #--------------------------------------------------------------------------
+
+ Function ShowInstaller
+ BringToFront
+ FunctionEnd
+
+ #--------------------------------------------------------------------------
# Installer Function: MakeItSafe
#
***************
*** 2076,2090 ****
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioC.ini" "Field 3" "Flags" "DISABLED"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioC.ini" "Field 4" "Flags" "DISABLED"
!
; If we are upgrading POPFile, the corpus might have to be converted from flat file format
!
ReadINIStr ${L_TEMP} "$INSTDIR\backup\backup.ini" "FlatFileCorpus" "Status"
StrCmp ${L_TEMP} "new" 0 display_the_page
WriteINIStr "$INSTDIR\backup\backup.ini" "FlatFileCorpus" "Status" "old"
!
; Corpus conversion will occur when POPFile is started - this may take several minutes,
; so we ensure that POPFile will not be run in the background when it is run for the
; first time (by using the Start Menu or by running 'popfile.exe').
!
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioC.ini" "Inherited" "Console" "1"
Push "1"
--- 2093,2107 ----
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioC.ini" "Field 3" "Flags" "DISABLED"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioC.ini" "Field 4" "Flags" "DISABLED"
!
; If we are upgrading POPFile, the corpus might have to be converted from flat file format
!
ReadINIStr ${L_TEMP} "$INSTDIR\backup\backup.ini" "FlatFileCorpus" "Status"
StrCmp ${L_TEMP} "new" 0 display_the_page
WriteINIStr "$INSTDIR\backup\backup.ini" "FlatFileCorpus" "Status" "old"
!
; Corpus conversion will occur when POPFile is started - this may take several minutes,
; so we ensure that POPFile will not be run in the background when it is run for the
; first time (by using the Start Menu or by running 'popfile.exe').
!
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioC.ini" "Inherited" "Console" "1"
Push "1"
***************
*** 2095,2107 ****
; If we are upgrading POPFile, the corpus might have to be converted from flat file format
!
ReadINIStr ${L_TEMP} "$INSTDIR\backup\backup.ini" "FlatFileCorpus" "Status"
StrCmp ${L_TEMP} "new" 0 continue
WriteINIStr "$INSTDIR\backup\backup.ini" "FlatFileCorpus" "Status" "old"
!
; Corpus conversion will occur when POPFile is started - this may take several minutes,
; so we ensure that POPFile will not be run in the background when it is run for the
; first time (by the installer, by using the Start Menu or by running 'popfile.exe').
!
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioC.ini" "Inherited" "Console" "1"
Push "1"
--- 2112,2124 ----
; If we are upgrading POPFile, the corpus might have to be converted from flat file format
!
ReadINIStr ${L_TEMP} "$INSTDIR\backup\backup.ini" "FlatFileCorpus" "Status"
StrCmp ${L_TEMP} "new" 0 continue
WriteINIStr "$INSTDIR\backup\backup.ini" "FlatFileCorpus" "Status" "old"
!
; Corpus conversion will occur when POPFile is started - this may take several minutes,
; so we ensure that POPFile will not be run in the background when it is run for the
; first time (by the installer, by using the Start Menu or by running 'popfile.exe').
!
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioC.ini" "Inherited" "Console" "1"
Push "1"
***************
*** 2332,2336 ****
; If flat file corpus conversion is required, we cannot offer to display the POPFile UI
; (conversion may take several minutes, during which time the UI will be unresponsive)
!
!insertmacro MUI_INSTALLOPTIONS_READ ${L_TEMP} "ioC.ini" "Field 4" "Flags"
StrCmp ${L_TEMP} "DISABLED" 0 selection_ok
--- 2349,2353 ----
; If flat file corpus conversion is required, we cannot offer to display the POPFile UI
; (conversion may take several minutes, during which time the UI will be unresponsive)
!
!insertmacro MUI_INSTALLOPTIONS_READ ${L_TEMP} "ioC.ini" "Field 4" "Flags"
StrCmp ${L_TEMP} "DISABLED" 0 selection_ok
***************
*** 2527,2531 ****
DetailPrint "$(un.PFI_LANG_PROGRESS_3)"
SetDetailsPrint listonly
!
Delete $INSTDIR\popfile.pl
Delete $INSTDIR\popfile.exe
--- 2544,2548 ----
DetailPrint "$(un.PFI_LANG_PROGRESS_3)"
SetDetailsPrint listonly
!
Delete $INSTDIR\popfile.pl
Delete $INSTDIR\popfile.exe
|