|
From: <xue...@us...> - 2003-10-29 21:58:49
|
Update of /cvsroot/popfile/windows
In directory sc8-pr-cvs1:/tmp/cvs-serv5186
Modified Files:
installer.nsi
Log Message:
Corpus conversion handling improved, default buckets changed, Release Notes added to Start Menu and Turkish support added.
Index: installer.nsi
===================================================================
RCS file: /cvsroot/popfile/windows/installer.nsi,v
retrieving revision 1.141
retrieving revision 1.142
diff -C2 -d -r1.141 -r1.142
*** installer.nsi 22 Oct 2003 14:18:21 -0000 1.141
--- installer.nsi 29 Oct 2003 21:58:45 -0000 1.142
***************
*** 3,8 ****
# installer.nsi --- This is the NSIS script used to create the
# Windows installer for POPFile. This script uses
! # three custom pages whose layouts are defined
! # in the files "ioA.ini", "ioB.ini" and "ioC.ini".
#
# Copyright (c) 2001-2003 John Graham-Cumming
--- 3,8 ----
# installer.nsi --- This is the NSIS script used to create the
# Windows installer for POPFile. This script uses
! # four custom pages whose layouts are defined
! # in the files "ioA.ini", "ioB.ini", "ioC.ini" and "ioD.ini".
#
# Copyright (c) 2001-2003 John Graham-Cumming
***************
*** 115,119 ****
!define MUI_PRODUCT "POPFile"
! !define MUI_VERSION "0.20.0RC4"
!define C_README "v0.20.0.change"
--- 115,119 ----
!define MUI_PRODUCT "POPFile"
! !define MUI_VERSION "0.20.0"
!define C_README "v0.20.0.change"
***************
*** 212,215 ****
--- 212,216 ----
#
# !define CBP_DEFAULT_LIST "inbox|spam|personal|work"
+ !define CBP_DEFAULT_LIST "spam|personal|work|other"
#
# ; List of suggestions for bucket names (use "" if no suggestions are required)
***************
*** 247,250 ****
--- 248,252 ----
Page custom SetOutlookExpressPage
Page custom StartPOPFilePage "CheckLaunchOptions"
+ Page custom ConvertCorpusPage
!insertmacro MUI_PAGE_FINISH
***************
*** 288,292 ****
; Debug aid: Hide the installation log but let user display it (using "Show details" button)
! !define MUI_FINISHPAGE_NOAUTOCLOSE
;-----------------------------------------
--- 290,294 ----
; Debug aid: Hide the installation log but let user display it (using "Show details" button)
! ; !define MUI_FINISHPAGE_NOAUTOCLOSE
;-----------------------------------------
***************
*** 442,445 ****
--- 444,448 ----
!insertmacro PFI_LANG_LOAD "Finnish" ; 'New style' license msgs missing (27-Jun-03)
!insertmacro PFI_LANG_LOAD "Swedish"
+ !insertmacro PFI_LANG_LOAD "Turkish"
!insertmacro PFI_LANG_LOAD "Ukrainian"
***************
*** 479,482 ****
--- 482,486 ----
ReserveFile "ioB.ini"
ReserveFile "ioC.ini"
+ ReserveFile "ioD.ini"
ReserveFile "${C_RELEASE_NOTES}"
***************
*** 504,507 ****
--- 508,512 ----
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "ioB.ini"
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "ioC.ini"
+ !insertmacro MUI_INSTALLOPTIONS_EXTRACT "ioD.ini"
!insertmacro MUI_INSTALLOPTIONS_EXTRACT_AS "${C_RELEASE_NOTES}" "${C_README}"
***************
*** 553,566 ****
"$(PFI_LANG_MBRELNOTES_1)\
$\r$\n$\r$\n\
! $(PFI_LANG_MBRELNOTES_2)" IDNO exit
StrCmp $G_NOTEPAD "" use_file_association
ExecWait 'notepad.exe "$PLUGINSDIR\${C_README}.txt"'
! GoTo exit
use_file_association:
ExecShell "open" "$PLUGINSDIR\${C_README}.txt"
! exit:
; Insert appropriate language strings into the custom page INI files
--- 558,571 ----
"$(PFI_LANG_MBRELNOTES_1)\
$\r$\n$\r$\n\
! $(PFI_LANG_MBRELNOTES_2)" IDNO continue
StrCmp $G_NOTEPAD "" use_file_association
ExecWait 'notepad.exe "$PLUGINSDIR\${C_README}.txt"'
! GoTo continue
use_file_association:
ExecShell "open" "$PLUGINSDIR\${C_README}.txt"
! continue:
; Insert appropriate language strings into the custom page INI files
***************
*** 570,573 ****
--- 575,579 ----
Call SetOutlookExpressPage_Init
Call StartPOPFilePage_Init
+ Call ConvertCorpusPage_Init
; Ensure the 'Kakasi' section is selected if 'Japanese' has been chosen
***************
*** 822,825 ****
--- 828,833 ----
CreateShortCut "$SMPROGRAMS\${MUI_PRODUCT}\Uninstall POPFile.lnk" \
"$INSTDIR\uninstall.exe"
+ CreateShortCut "$SMPROGRAMS\${MUI_PRODUCT}\Release Notes.lnk" \
+ "$INSTDIR\${C_README}.txt"
SetOutPath "$SMPROGRAMS\${MUI_PRODUCT}"
***************
*** 945,950 ****
--- 953,963 ----
StrCpy ${L_TEMP} ${L_CORPUS_PATH} "" ${L_TEMP}
+ ClearErrors
CopyFiles /SILENT "${L_CORPUS_PATH}\*.*" "$INSTDIR\backup\${L_TEMP}"
+ IfErrors 0 continue
+ DetailPrint "Error detected when making corpus backup"
+ MessageBox MB_OK|MB_ICONEXCLAMATION "$(PFI_LANG_MBFFCERR_1)"
+ continue:
WriteINIStr "$INSTDIR\backup\backup.ini" "FlatFileCorpus" "Corpus" "${L_TEMP}"
WriteINIStr "$INSTDIR\backup\backup.ini" "FlatFileCorpus" "Status" "new"
***************
*** 1074,1077 ****
--- 1087,1091 ----
!insertmacro UI_LANG_CONFIG "FINNISH" "Suomi"
!insertmacro UI_LANG_CONFIG "SWEDISH" "Svenska"
+ !insertmacro UI_LANG_CONFIG "TURKISH" "Turkce"
!insertmacro UI_LANG_CONFIG "UKRAINIAN" "Ukrainian"
***************
*** 1152,1155 ****
--- 1166,1172 ----
#--------------------------------------------------------------------------
# Component-selection page descriptions
+ #
+ # There is no need to provide any translations for the 'SecKakasi' description
+ # because it is only visible when the installer is built in ENGLISH_MODE.
#--------------------------------------------------------------------------
***************
*** 1158,1162 ****
!insertmacro MUI_DESCRIPTION_TEXT ${SecSkins} $(DESC_SecSkins)
!insertmacro MUI_DESCRIPTION_TEXT ${SecLangs} $(DESC_SecLangs)
! !insertmacro MUI_DESCRIPTION_TEXT ${SecKakasi} "Kakasi"
!insertmacro MUI_FUNCTIONS_DESCRIPTION_END
--- 1175,1179 ----
!insertmacro MUI_DESCRIPTION_TEXT ${SecSkins} $(DESC_SecSkins)
!insertmacro MUI_DESCRIPTION_TEXT ${SecLangs} $(DESC_SecLangs)
! !insertmacro MUI_DESCRIPTION_TEXT ${SecKakasi} "Kakasi (used to process Japanese email)"
!insertmacro MUI_FUNCTIONS_DESCRIPTION_END
***************
*** 1298,1352 ****
StrCmp ${L_EXE} "" unlocked_exit
- StrCmp ${L_OLD_GUI} "" try_new_style
-
- DetailPrint "Trying browser request for ${L_OLD_GUI} [old style port]"
- ClearErrors
- ExecShell "open" "http://127.0.0.1:${L_OLD_GUI}/shutdown"
- IfErrors 0 old_ok
- DetailPrint "ExecShell error detected"
-
- old_ok:
- DetailPrint "Waiting for 5 seconds..."
- Sleep 5000
- BringToFront
- DetailPrint "Waiting for '${L_EXE}' to unlock after browser request..."
- DetailPrint "Please be patient, this may take more than 30 seconds"
- Push ${L_EXE}
- Call WaitUntilUnlocked
- DetailPrint "Checking if '${L_EXE}' is still locked after browser request..."
- Push ${L_EXE}
- Call CheckIfLocked
- Pop ${L_EXE}
- StrCmp ${L_EXE} "" unlocked_exit
-
- try_new_style:
- StrCmp ${L_NEW_GUI} "" manual_shutdown_required
- DetailPrint "Trying browser request for ${L_NEW_GUI} [new style port]"
- ClearErrors
- ExecShell "open" "http://127.0.0.1:${L_NEW_GUI}/shutdown"
- IfErrors 0 new_ok
- DetailPrint "ExecShell error detected"
-
- new_ok:
- DetailPrint "Waiting for 5 seconds..."
- Sleep 5000
- BringToFront
- DetailPrint "Waiting for '${L_EXE}' to unlock after browser request..."
- DetailPrint "Please be patient, this may take more than 30 seconds"
- Push ${L_EXE}
- Call WaitUntilUnlocked
- DetailPrint "Checking if '${L_EXE}' is still locked after browser request..."
- Push ${L_EXE}
- Call CheckIfLocked
- Pop ${L_EXE}
- StrCmp ${L_EXE} "" unlocked_exit
-
- manual_shutdown_required:
DetailPrint "Unable to shutdown automatically - manual intervention requested"
! MessageBox MB_OK|MB_TOPMOST "Unable to shutdown POPFile automatically.\
$\r$\n$\r$\n\
! Please shutdown POPFile manually now.\
$\r$\n$\r$\n\
! When POPFile has been shutdown, click 'OK' to continue."
Goto exit_now
--- 1315,1324 ----
StrCmp ${L_EXE} "" unlocked_exit
DetailPrint "Unable to shutdown automatically - manual intervention requested"
! MessageBox MB_OK|MB_ICONEXCLAMATION|MB_TOPMOST "$(PFI_LANG_MBMANSHUT_1)\
$\r$\n$\r$\n\
! $(PFI_LANG_MBMANSHUT_2)\
$\r$\n$\r$\n\
! $(PFI_LANG_MBMANSHUT_3)"
Goto exit_now
***************
*** 2113,2117 ****
#
# The user is allowed to change their selection by returning to this page (by clicking 'Back'
! # on the 'Finish' page).
#
# The [Inherited] section in 'ioC.ini' has information on the system tray icon and console mode
--- 2085,2089 ----
#
# The user is allowed to change their selection by returning to this page (by clicking 'Back'
! # on the 'Finish' page) if corpus conversion is not required.
#
# The [Inherited] section in 'ioC.ini' has information on the system tray icon and console mode
***************
*** 2163,2201 ****
!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"
- Call SetConsoleMode
Goto display_the_page
page_enabled:
- ; 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"
- Call SetConsoleMode
-
- !insertmacro MUI_INSTALLOPTIONS_WRITE "ioC.ini" "Field 4" "Flags" "DISABLED"
-
- continue:
-
; clear all three radio buttons ('do not start', 'use console', 'run in background')
--- 2135,2142 ----
***************
*** 2245,2248 ****
--- 2186,2192 ----
# The user is allowed to return to this page and change their selection, so the
# previous state is stored in the INI file used for this custom page.
+ #
+ # If corpus conversion is required, this function will not launch POPFile
+ # (but it will still update 'popfile.cfg' to reflect the user's startup choice)
#--------------------------------------------------------------------------
***************
*** 2335,2338 ****
--- 2279,2285 ----
display_banner:
+ ReadINIStr ${L_TEMP} "$INSTDIR\backup\backup.ini" "FlatFileCorpus" "Status"
+ StrCmp ${L_TEMP} "new" exit_without_banner
+
Banner::show /NOUNLOAD /set 76 "$(PFI_LANG_LAUNCH_BANNER_1)" "$(PFI_LANG_LAUNCH_BANNER_2)"
***************
*** 2351,2359 ****
IfErrors 0 continue
Banner::destroy
! MessageBox MB_OK|MB_TOPMOST "An error occurred when the installer tried to start POPFile.\
$\r$\n$\r$\n\
Please use 'Start -> Programs -> POPFile -> Run POPFile' now.\
$\r$\n$\r$\n\
! Click 'OK' when the 'POPFile Engine v0.20.0 running' message appears."
Goto exit_without_banner
--- 2298,2306 ----
IfErrors 0 continue
Banner::destroy
! MessageBox MB_OK|MB_ICONEXCLAMATION|MB_TOPMOST "An error occurred when the installer tried to start POPFile.\
$\r$\n$\r$\n\
Please use 'Start -> Programs -> POPFile -> Run POPFile' now.\
$\r$\n$\r$\n\
! Click 'OK' once POPFile has been started."
Goto exit_without_banner
***************
*** 2394,2397 ****
--- 2341,2391 ----
#--------------------------------------------------------------------------
+ # Installer Function: ConvertCorpusPage_Init (adds language texts to custom page INI file)
+ #
+ # This function adds language texts to the INI file used by the "ConvertCorpusPage" function
+ # (to make the custom page use the language selected by the user for the installer)
+ #--------------------------------------------------------------------------
+
+ Function ConvertCorpusPage_Init
+
+ !insertmacro PFI_IO_TEXT "ioD.ini" "1" "$(PFI_LANG_FLATFILE_IO_NOTE_1)"
+ !insertmacro PFI_IO_TEXT "ioD.ini" "2" "$(PFI_LANG_FLATFILE_IO_NOTE_2)"
+ !insertmacro PFI_IO_TEXT "ioD.ini" "3" "$(PFI_LANG_FLATFILE_IO_NOTE_3)"
+ !insertmacro PFI_IO_TEXT "ioD.ini" "4" "$(PFI_LANG_FLATFILE_IO_NOTE_4)"
+ !insertmacro PFI_IO_TEXT "ioD.ini" "5" "$(PFI_LANG_FLATFILE_IO_NOTE_5)"
+ !insertmacro PFI_IO_TEXT "ioD.ini" "6" "$(PFI_LANG_FLATFILE_IO_NOTE_6)"
+ !insertmacro PFI_IO_TEXT "ioD.ini" "7" "$(PFI_LANG_FLATFILE_IO_NOTE_7)"
+
+ FunctionEnd
+
+ #--------------------------------------------------------------------------
+ # Installer Function: ConvertCorpusPage (generates a custom page)
+ #
+ # Displays custom page when an existing flat file corpus has to be converted to the new
+ # BerkeleyDB format. Conversion may take several minutes during which time the POPFile
+ # User Interface will be unresponsive.
+ #--------------------------------------------------------------------------
+
+ Function ConvertCorpusPage
+
+ !define L_TEMP $R9
+
+ Push ${L_TEMP}
+
+ ReadINIStr ${L_TEMP} "$INSTDIR\backup\backup.ini" "FlatFileCorpus" "Status"
+ StrCmp ${L_TEMP} "new" 0 exit
+
+ !insertmacro MUI_HEADER_TEXT "$(PFI_LANG_FLATFILE_TITLE)" "$(PFI_LANG_FLATFILE_SUBTITLE)"
+
+ !insertmacro MUI_INSTALLOPTIONS_DISPLAY "ioD.ini"
+
+ exit:
+ Pop ${L_TEMP}
+
+ !undef L_TEMP
+
+ FunctionEnd
+
+ #--------------------------------------------------------------------------
# Installer Function: CheckRunStatus
# (the "pre" function for the 'Finish' page)
***************
*** 2403,2406 ****
--- 2397,2401 ----
#
# NB: User can switch back and forth between the 'Start POPFile' page and the 'Finish' page
+ # (when corpus conversion is not required)
#--------------------------------------------------------------------------
***************
*** 2411,2414 ****
--- 2406,2413 ----
Push ${L_TEMP}
+ ; If POPFile is running in a console window, it might be obscuring the installer
+
+ BringToFront
+
IfRebootFlag 0 no_reboot_reqd
***************
*** 2434,2443 ****
StrCmp ${L_TEMP} "1" disable_UI_option
- ; Get 'Flags' for the 'Run POPFile in background' radio button on the 'Start POPFile' page
; 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
disable_UI_option:
--- 2433,2450 ----
StrCmp ${L_TEMP} "1" disable_UI_option
; 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)
! ReadINIStr ${L_TEMP} "$INSTDIR\backup\backup.ini" "FlatFileCorpus" "Status"
! StrCmp ${L_TEMP} "new" 0 selection_ok
!
! WriteINIStr "$INSTDIR\backup\backup.ini" "FlatFileCorpus" "Status" "old"
! !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Settings" "BackEnabled" "0"
!
! SetOutPath $INSTDIR
! ClearErrors
! Exec '"$INSTDIR\popfilef.exe"'
! IfErrors 0 disable_UI_option
! MessageBox MB_OK|MB_TOPMOST "An error occurred when starting the corpus conversion process."
disable_UI_option:
***************
*** 2615,2618 ****
--- 2622,2626 ----
RMDir "$SMPROGRAMS\${MUI_PRODUCT}\Support"
+ Delete "$SMPROGRAMS\${MUI_PRODUCT}\Release Notes.lnk"
Delete "$SMPROGRAMS\${MUI_PRODUCT}\Run POPFile.lnk"
Delete "$SMPROGRAMS\${MUI_PRODUCT}\Run POPFile in background.lnk"
|