|
From: <xue...@us...> - 2003-08-09 17:53:12
|
Update of /cvsroot/popfile/windows
In directory sc8-pr-cvs1:/tmp/cvs-serv17466
Modified Files:
installer.nsi
Log Message:
'Global' registers replaced by 'User variables' (so we now have 20 'local' registers, not 10). Alphabetic order used in menu for non-English languages.
Index: installer.nsi
===================================================================
RCS file: /cvsroot/popfile/windows/installer.nsi,v
retrieving revision 1.102
retrieving revision 1.103
diff -C2 -d -r1.102 -r1.103
*** installer.nsi 7 Aug 2003 11:22:38 -0000 1.102
--- installer.nsi 9 Aug 2003 17:53:08 -0000 1.103
***************
*** 26,43 ****
#--------------------------------------------------------------------------
! ; This script requires a version of NSIS 2.0b4 (CVS) which meets the following requirements:
;
! ; (1) "NSIS Modern User Interface" version 1.65 (17 June 2003 or later)
! ; This script uses the new (simplified) page configuration system and other improvements.
;
! ; (2) '{NSIS}\makensis.exe' dated 08 July 2003 (NSIS CVS version 1.203) or later
! ; This is required to ensure that out-of-date NLF files do not result in blank messages
! ; and to ensure that language strings can be combined with other strings.
;
! ; (3) '{NSIS}\NSIS\Contrib\UIs\modern.exe' dated 09 July 2003 (NSIS CVS v1.31) or later
! ; This is required to ensure the installer works properly when 'Japanese' is selected.
;
! ; NSIS CVS snapshot dated 09 July 2003 @ 13:44 contains suitable versions of these NSIS files
! ; (the 09 July 2003 @ 07:44 snapshot is NOT suitable).
#--------------------------------------------------------------------------
--- 26,47 ----
#--------------------------------------------------------------------------
! ; As of 9 August 2003, the latest release of the NSIS compiler is 2.0b3. Since its release in
! ; March 2003, the compiler has been greatly improved. This script uses many of the improvements
! ; introduced since then. Although the NSIS compiler has been updated to 2.0b4 (CVS), the only
! ; way to obtain this version is to install the 2.0b3 release and then apply some CVS updates.
;
! ; There are two ways to apply these CVS updates:
;
! ; (a) use the 'NSIS Update' feature provided by the 'NSIS Menu', or
;
! ;(b) obtain a NSIS 'Nightly' CVS update and use it to upgrade the 2.0b3 installation.
;
! ; The 'NSIS Update' feature does not work reliably at the moment, due to SourceForge.net's
! ; current CVS server problems, so the quickest way to update NSIS to 2.0b4 (CVS) is by means
! ; of the snapshot which is a ZIP file created several times a day from data on the 'real' CVS
! ; servers (so it is NOT subject to the same problems as the 'NSIS Update' feature).
! ;
! ; This version of the script has been tested with NSIS 2.0b4 (CVS) after updating it by using
! ; the 4 August 2003 (07:44 GMT) version of the NSIS CVS snapshot.
#--------------------------------------------------------------------------
***************
*** 321,337 ****
#--------------------------------------------------------------------------
; NSIS provides 20 general purpose user registers:
! ; (a) $0 to $9 are used as global registers
! ; (b) $R0 to $R9 are used as local registers
!
! ; Global registers referred to by 'defines' use names starting with 'G_'
!
! !define G_POP3 $0 ; POP3 port (1-65535)
! !define G_GUI $1 ; GUI port (1-65535)
! !define G_STARTUP $2 ; automatic startup flag (1 = yes, 0 = no)
! !define G_NOTEPAD $3 ; path to notepad.exe ("" = not found in search path)
; Local registers referred to by 'defines' use names starting with 'L_' (eg L_LNE, L_OLDUI)
; and the scope of these 'defines' is limited to the "routine" where they are used.
; POPFile constants have been given names beginning with 'C_' (eg C_README)
--- 325,345 ----
#--------------------------------------------------------------------------
+ ; This script uses 'User Variables' (with names starting with 'G_') to hold GLOBAL data.
+
+ Var G_POP3 ; POP3 port (1-65535)
+ Var G_GUI ; GUI port (1-65535)
+ Var G_STARTUP ; automatic startup flag (1 = yes, 0 = no)
+ Var G_NOTEPAD ; path to notepad.exe ("" = not found in search path)
+
; NSIS provides 20 general purpose user registers:
! ; (a) $R0 to $R9 are used as local registers
! ; (b) $0 to $9 are used as additional local registers
; Local registers referred to by 'defines' use names starting with 'L_' (eg L_LNE, L_OLDUI)
; and the scope of these 'defines' is limited to the "routine" where they are used.
+
+ ; In earlier versions of the NSIS compiler, 'User Variables' did not exist, and the convention
+ ; was to use $R0 to $R9 as 'local' registers and $0 to $9 as 'global' ones. This is why this
+ ; script uses registers $R0 to $R9 in preference to registers $0 to $9.
; POPFile constants have been given names beginning with 'C_' (eg C_README)
***************
*** 386,396 ****
!insertmacro PFI_LANG_LOAD "Czech"
!insertmacro PFI_LANG_LOAD "Danish" ; 'New style' license msgs missing (27-Jun-03)
- !insertmacro PFI_LANG_LOAD "Dutch"
- !insertmacro PFI_LANG_LOAD "Finnish" ; 'New style' license msgs missing (27-Jun-03)
- !insertmacro PFI_LANG_LOAD "French"
!insertmacro PFI_LANG_LOAD "German"
! !insertmacro PFI_LANG_LOAD "Hungarian"
!insertmacro PFI_LANG_LOAD "Japanese"
!insertmacro PFI_LANG_LOAD "Korean"
!insertmacro PFI_LANG_LOAD "Polish"
!insertmacro PFI_LANG_LOAD "Portuguese"
--- 394,404 ----
!insertmacro PFI_LANG_LOAD "Czech"
!insertmacro PFI_LANG_LOAD "Danish" ; 'New style' license msgs missing (27-Jun-03)
!insertmacro PFI_LANG_LOAD "German"
! !insertmacro PFI_LANG_LOAD "Spanish"
! !insertmacro PFI_LANG_LOAD "French"
!insertmacro PFI_LANG_LOAD "Japanese"
!insertmacro PFI_LANG_LOAD "Korean"
+ !insertmacro PFI_LANG_LOAD "Hungarian"
+ !insertmacro PFI_LANG_LOAD "Dutch"
!insertmacro PFI_LANG_LOAD "Polish"
!insertmacro PFI_LANG_LOAD "Portuguese"
***************
*** 398,402 ****
!insertmacro PFI_LANG_LOAD "Russian"
!insertmacro PFI_LANG_LOAD "Slovak"
! !insertmacro PFI_LANG_LOAD "Spanish"
!insertmacro PFI_LANG_LOAD "Swedish"
!insertmacro PFI_LANG_LOAD "Ukrainian"
--- 406,410 ----
!insertmacro PFI_LANG_LOAD "Russian"
!insertmacro PFI_LANG_LOAD "Slovak"
! !insertmacro PFI_LANG_LOAD "Finnish" ; 'New style' license msgs missing (27-Jun-03)
!insertmacro PFI_LANG_LOAD "Swedish"
!insertmacro PFI_LANG_LOAD "Ukrainian"
***************
*** 470,479 ****
Function PFIGUIInit
! SearchPath ${G_NOTEPAD} notepad.exe
MessageBox MB_YESNO|MB_ICONQUESTION \
"$(PFI_LANG_MBRELNOTES_1)\
$\r$\n$\r$\n\
$(PFI_LANG_MBRELNOTES_2)" IDNO exit
! StrCmp ${G_NOTEPAD} "" use_file_association
ExecWait 'notepad.exe "$PLUGINSDIR\release.txt"'
GoTo exit
--- 478,487 ----
Function PFIGUIInit
! SearchPath $G_NOTEPAD notepad.exe
MessageBox MB_YESNO|MB_ICONQUESTION \
"$(PFI_LANG_MBRELNOTES_1)\
$\r$\n$\r$\n\
$(PFI_LANG_MBRELNOTES_2)" IDNO exit
! StrCmp $G_NOTEPAD "" use_file_association
ExecWait 'notepad.exe "$PLUGINSDIR\release.txt"'
GoTo exit
***************
*** 518,524 ****
; POPFile run in the Startup group
! !insertmacro MUI_INSTALLOPTIONS_READ ${G_POP3} "ioA.ini" "Field 2" "State"
! !insertmacro MUI_INSTALLOPTIONS_READ ${G_GUI} "ioA.ini" "Field 4" "State"
! !insertmacro MUI_INSTALLOPTIONS_READ ${G_STARTUP} "ioA.ini" "Field 5" "State"
WriteRegStr HKLM "SOFTWARE\${MUI_PRODUCT}" InstallLocation $INSTDIR
--- 526,532 ----
; POPFile run in the Startup group
! !insertmacro MUI_INSTALLOPTIONS_READ $G_POP3 "ioA.ini" "Field 2" "State"
! !insertmacro MUI_INSTALLOPTIONS_READ $G_GUI "ioA.ini" "Field 4" "State"
! !insertmacro MUI_INSTALLOPTIONS_READ $G_STARTUP "ioA.ini" "Field 5" "State"
WriteRegStr HKLM "SOFTWARE\${MUI_PRODUCT}" InstallLocation $INSTDIR
***************
*** 534,538 ****
File "..\engine\license"
File "${C_RELEASE_NOTES}"
! StrCmp ${G_NOTEPAD} "" 0 readme_ok
File /oname=${C_README}.txt "${C_RELEASE_NOTES}"
--- 542,546 ----
File "..\engine\license"
File "${C_RELEASE_NOTES}"
! StrCmp $G_NOTEPAD "" 0 readme_ok
File /oname=${C_README}.txt "${C_RELEASE_NOTES}"
***************
*** 568,573 ****
FileOpen ${L_CFG} $PLUGINSDIR\popfile.cfg a
FileSeek ${L_CFG} 0 END
! FileWrite ${L_CFG} "pop3_port ${G_POP3}$\r$\n"
! FileWrite ${L_CFG} "html_port ${G_GUI}$\r$\n"
FileClose ${L_CFG}
IfFileExists "$INSTDIR\popfile.cfg" 0 update_config
--- 576,581 ----
FileOpen ${L_CFG} $PLUGINSDIR\popfile.cfg a
FileSeek ${L_CFG} 0 END
! FileWrite ${L_CFG} "pop3_port $G_POP3$\r$\n"
! FileWrite ${L_CFG} "html_port $G_GUI$\r$\n"
FileClose ${L_CFG}
IfFileExists "$INSTDIR\popfile.cfg" 0 update_config
***************
*** 731,737 ****
SetOutPath "$SMPROGRAMS\${MUI_PRODUCT}"
WriteINIStr "$SMPROGRAMS\${MUI_PRODUCT}\POPFile User Interface.url" \
! "InternetShortcut" "URL" "http://127.0.0.1:${G_GUI}/"
WriteINIStr "$SMPROGRAMS\${MUI_PRODUCT}\Shutdown POPFile.url" \
! "InternetShortcut" "URL" "http://127.0.0.1:${G_GUI}/shutdown"
WriteINIStr "$SMPROGRAMS\${MUI_PRODUCT}\Manual.url" \
"InternetShortcut" "URL" "file://$INSTDIR/manual/en/manual.html"
--- 739,745 ----
SetOutPath "$SMPROGRAMS\${MUI_PRODUCT}"
WriteINIStr "$SMPROGRAMS\${MUI_PRODUCT}\POPFile User Interface.url" \
! "InternetShortcut" "URL" "http://127.0.0.1:$G_GUI/"
WriteINIStr "$SMPROGRAMS\${MUI_PRODUCT}\Shutdown POPFile.url" \
! "InternetShortcut" "URL" "http://127.0.0.1:$G_GUI/shutdown"
WriteINIStr "$SMPROGRAMS\${MUI_PRODUCT}\Manual.url" \
"InternetShortcut" "URL" "file://$INSTDIR/manual/en/manual.html"
***************
*** 743,747 ****
"InternetShortcut" "URL" "http://popfile.sourceforge.net/"
! StrCmp ${G_STARTUP} "1" 0 skip_autostart_set
SetOutPath $SMSTARTUP
SetOutPath $INSTDIR
--- 751,755 ----
"InternetShortcut" "URL" "http://popfile.sourceforge.net/"
! StrCmp $G_STARTUP "1" 0 skip_autostart_set
SetOutPath $SMSTARTUP
SetOutPath $INSTDIR
***************
*** 842,852 ****
!insertmacro UI_LANG_CONFIG "CZECH" "Czech"
!insertmacro UI_LANG_CONFIG "DANISH" "Dansk"
- !insertmacro UI_LANG_CONFIG "DUTCH" "Nederlands"
- !insertmacro UI_LANG_CONFIG "FINNISH" "Suomi"
- !insertmacro UI_LANG_CONFIG "FRENCH" "Francais"
!insertmacro UI_LANG_CONFIG "GERMAN" "Deutsch"
! !insertmacro UI_LANG_CONFIG "HUNGARIAN" "Hungarian"
!insertmacro UI_LANG_CONFIG "JAPANESE" "Nihongo"
!insertmacro UI_LANG_CONFIG "KOREAN" "Korean"
!insertmacro UI_LANG_CONFIG "POLISH" "Polish"
!insertmacro UI_LANG_CONFIG "PORTUGUESE" "Português"
--- 850,860 ----
!insertmacro UI_LANG_CONFIG "CZECH" "Czech"
!insertmacro UI_LANG_CONFIG "DANISH" "Dansk"
!insertmacro UI_LANG_CONFIG "GERMAN" "Deutsch"
! !insertmacro UI_LANG_CONFIG "SPANISH" "Español"
! !insertmacro UI_LANG_CONFIG "FRENCH" "Francais"
!insertmacro UI_LANG_CONFIG "JAPANESE" "Nihongo"
!insertmacro UI_LANG_CONFIG "KOREAN" "Korean"
+ !insertmacro UI_LANG_CONFIG "HUNGARIAN" "Hungarian"
+ !insertmacro UI_LANG_CONFIG "DUTCH" "Nederlands"
!insertmacro UI_LANG_CONFIG "POLISH" "Polish"
!insertmacro UI_LANG_CONFIG "PORTUGUESE" "Português"
***************
*** 854,858 ****
!insertmacro UI_LANG_CONFIG "RUSSIAN" "Russian"
!insertmacro UI_LANG_CONFIG "SLOVAK" "Slovak"
! !insertmacro UI_LANG_CONFIG "SPANISH" "Español"
!insertmacro UI_LANG_CONFIG "SWEDISH" "Svenska"
!insertmacro UI_LANG_CONFIG "UKRAINIAN" "Ukrainian"
--- 862,866 ----
!insertmacro UI_LANG_CONFIG "RUSSIAN" "Russian"
!insertmacro UI_LANG_CONFIG "SLOVAK" "Slovak"
! !insertmacro UI_LANG_CONFIG "FINNISH" "Suomi"
!insertmacro UI_LANG_CONFIG "SWEDISH" "Svenska"
!insertmacro UI_LANG_CONFIG "UKRAINIAN" "Ukrainian"
***************
*** 1023,1028 ****
init_port_vars:
! StrCpy ${G_POP3} ""
! StrCpy ${G_GUI} ""
StrCpy ${L_OLDUI} ""
--- 1031,1036 ----
init_port_vars:
! StrCpy $G_POP3 ""
! StrCpy $G_GUI ""
StrCpy ${L_OLDUI} ""
***************
*** 1064,1072 ****
got_port:
! StrCpy ${G_POP3} ${L_LNE} 5 5
Goto loop
got_pop3_port:
! StrCpy ${G_POP3} ${L_LNE} 5 10
Goto loop
--- 1072,1080 ----
got_port:
! StrCpy $G_POP3 ${L_LNE} 5 5
Goto loop
got_pop3_port:
! StrCpy $G_POP3 ${L_LNE} 5 10
Goto loop
***************
*** 1076,1080 ****
got_html_port:
! StrCpy ${G_GUI} ${L_LNE} 5 10
Goto loop
--- 1084,1088 ----
got_html_port:
! StrCpy $G_GUI ${L_LNE} 5 10
Goto loop
***************
*** 1083,1093 ****
FileClose ${L_CLEANCFG}
! Push ${G_POP3}
Call TrimNewlines
! Pop ${G_POP3}
! Push ${G_GUI}
Call TrimNewlines
! Pop ${G_GUI}
Push ${L_OLDUI}
--- 1091,1101 ----
FileClose ${L_CLEANCFG}
! Push $G_POP3
Call TrimNewlines
! Pop $G_POP3
! Push $G_GUI
Call TrimNewlines
! Pop $G_GUI
Push ${L_OLDUI}
***************
*** 1097,1101 ****
; Save the UI port settings (from popfile.cfg) for later use by the 'MakeItSafe' function
! !insertmacro MUI_INSTALLOPTIONS_WRITE "ioA.ini" "UI Port" "NewStyle" "${G_GUI}"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioA.ini" "UI Port" "OldStyle" "${L_OLDUI}"
--- 1105,1109 ----
; Save the UI port settings (from popfile.cfg) for later use by the 'MakeItSafe' function
! !insertmacro MUI_INSTALLOPTIONS_WRITE "ioA.ini" "UI Port" "NewStyle" "$G_GUI"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioA.ini" "UI Port" "OldStyle" "${L_OLDUI}"
***************
*** 1103,1108 ****
; If 'ui_port' and 'html_port' settings were found, we use the last 'html_port' we found.
! StrCmp ${G_GUI} "" 0 validity_checks
! StrCpy ${G_GUI} ${L_OLDUI}
validity_checks:
--- 1111,1116 ----
; If 'ui_port' and 'html_port' settings were found, we use the last 'html_port' we found.
! StrCmp $G_GUI "" 0 validity_checks
! StrCpy $G_GUI ${L_OLDUI}
validity_checks:
***************
*** 1110,1149 ****
; check port values (config file may have no port data or invalid port data)
! StrCmp ${G_POP3} ${G_GUI} 0 ports_differ
; Config file has no port data or same port used for POP3 and GUI
; (i.e. the data is not valid), so use POPFile defaults
! StrCpy ${G_POP3} "110"
! StrCpy ${G_GUI} "8080"
Goto ports_ok
ports_differ:
! StrCmp ${G_POP3} "" default_pop3
! Push ${G_POP3}
Call StrCheckDecimal
! Pop ${G_POP3}
! StrCmp ${G_POP3} "" default_pop3
! IntCmp ${G_POP3} 1 pop3_ok default_pop3
! IntCmp ${G_POP3} 65535 pop3_ok pop3_ok
default_pop3:
! StrCpy ${G_POP3} "110"
! StrCmp ${G_POP3} ${G_GUI} 0 pop3_ok
! StrCpy ${G_POP3} "111"
pop3_ok:
! StrCmp ${G_GUI} "" default_gui
! Push ${G_GUI}
Call StrCheckDecimal
! Pop ${G_GUI}
! StrCmp ${G_GUI} "" default_gui
! IntCmp ${G_GUI} 1 ports_ok default_gui
! IntCmp ${G_GUI} 65535 ports_ok ports_ok
default_gui:
! StrCpy ${G_GUI} "8080"
! StrCmp ${G_POP3} ${G_GUI} 0 ports_ok
! StrCpy ${G_GUI} "8081"
ports_ok:
--- 1118,1157 ----
; check port values (config file may have no port data or invalid port data)
! StrCmp $G_POP3 $G_GUI 0 ports_differ
; Config file has no port data or same port used for POP3 and GUI
; (i.e. the data is not valid), so use POPFile defaults
! StrCpy $G_POP3 "110"
! StrCpy $G_GUI "8080"
Goto ports_ok
ports_differ:
! StrCmp $G_POP3 "" default_pop3
! Push $G_POP3
Call StrCheckDecimal
! Pop $G_POP3
! StrCmp $G_POP3 "" default_pop3
! IntCmp $G_POP3 1 pop3_ok default_pop3
! IntCmp $G_POP3 65535 pop3_ok pop3_ok
default_pop3:
! StrCpy $G_POP3 "110"
! StrCmp $G_POP3 $G_GUI 0 pop3_ok
! StrCpy $G_POP3 "111"
pop3_ok:
! StrCmp $G_GUI "" default_gui
! Push $G_GUI
Call StrCheckDecimal
! Pop $G_GUI
! StrCmp $G_GUI "" default_gui
! IntCmp $G_GUI 1 ports_ok default_gui
! IntCmp $G_GUI 65535 ports_ok ports_ok
default_gui:
! StrCpy $G_GUI "8080"
! StrCmp $G_POP3 $G_GUI 0 ports_ok
! StrCpy $G_GUI "8081"
ports_ok:
***************
*** 1234,1238 ****
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
; POPFile default values. Now we display these settings and allow the user to change them.
--- 1242,1246 ----
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
; POPFile default values. Now we display these settings and allow the user to change them.
***************
*** 1240,1244 ****
; The POP3 and GUI port numbers must be in the range 1 to 65535 inclusive, and they
; must be different. This function assumes that the values "CheckExistingConfig" has loaded
! ; into ${G_POP3} and ${G_GUI} are valid.
!insertmacro MUI_HEADER_TEXT "$(PFI_LANG_OPTIONS_TITLE)" "$(PFI_LANG_OPTIONS_SUBTITLE)"
--- 1248,1252 ----
; The POP3 and GUI port numbers must be in the range 1 to 65535 inclusive, and they
; must be different. This function assumes that the values "CheckExistingConfig" has loaded
! ; into $G_POP3 and $G_GUI are valid.
!insertmacro MUI_HEADER_TEXT "$(PFI_LANG_OPTIONS_TITLE)" "$(PFI_LANG_OPTIONS_SUBTITLE)"
***************
*** 1249,1257 ****
!insertmacro MUI_INSTALLOPTIONS_READ ${L_PORTLIST} "ioA.ini" "Field 2" "ListItems"
Push |${L_PORTLIST}|
! Push |${G_POP3}|
Call StrStr
Pop ${L_RESULT}
StrCmp ${L_RESULT} "" 0 POP3_is_in_list
! StrCpy ${L_PORTLIST} ${L_PORTLIST}|${G_POP3}
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioA.ini" "Field 2" "ListItems" ${L_PORTLIST}
--- 1257,1265 ----
!insertmacro MUI_INSTALLOPTIONS_READ ${L_PORTLIST} "ioA.ini" "Field 2" "ListItems"
Push |${L_PORTLIST}|
! Push |$G_POP3|
Call StrStr
Pop ${L_RESULT}
StrCmp ${L_RESULT} "" 0 POP3_is_in_list
! StrCpy ${L_PORTLIST} ${L_PORTLIST}|$G_POP3
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioA.ini" "Field 2" "ListItems" ${L_PORTLIST}
***************
*** 1259,1267 ****
!insertmacro MUI_INSTALLOPTIONS_READ ${L_PORTLIST} "ioA.ini" "Field 4" "ListItems"
Push |${L_PORTLIST}|
! Push |${G_GUI}|
Call StrStr
Pop ${L_RESULT}
StrCmp ${L_RESULT} "" 0 GUI_is_in_list
! StrCpy ${L_PORTLIST} ${L_PORTLIST}|${G_GUI}
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioA.ini" "Field 4" "ListItems" ${L_PORTLIST}
--- 1267,1275 ----
!insertmacro MUI_INSTALLOPTIONS_READ ${L_PORTLIST} "ioA.ini" "Field 4" "ListItems"
Push |${L_PORTLIST}|
! Push |$G_GUI|
Call StrStr
Pop ${L_RESULT}
StrCmp ${L_RESULT} "" 0 GUI_is_in_list
! StrCpy ${L_PORTLIST} ${L_PORTLIST}|$G_GUI
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioA.ini" "Field 4" "ListItems" ${L_PORTLIST}
***************
*** 1275,1280 ****
show_defaults:
! !insertmacro MUI_INSTALLOPTIONS_WRITE "ioA.ini" "Field 2" "State" ${G_POP3}
! !insertmacro MUI_INSTALLOPTIONS_WRITE "ioA.ini" "Field 4" "State" ${G_GUI}
; Now display the custom page and wait for the user to make their selections.
--- 1283,1288 ----
show_defaults:
! !insertmacro MUI_INSTALLOPTIONS_WRITE "ioA.ini" "Field 2" "State" $G_POP3
! !insertmacro MUI_INSTALLOPTIONS_WRITE "ioA.ini" "Field 4" "State" $G_GUI
; Now display the custom page and wait for the user to make their selections.
***************
*** 1306,1323 ****
Push ${L_RESULT}
! !insertmacro MUI_INSTALLOPTIONS_READ ${G_POP3} "ioA.ini" "Field 2" "State"
! !insertmacro MUI_INSTALLOPTIONS_READ ${G_GUI} "ioA.ini" "Field 4" "State"
! StrCmp ${G_POP3} ${G_GUI} ports_must_differ
! Push ${G_POP3}
Call StrCheckDecimal
Pop ${L_RESULT}
StrCmp ${L_RESULT} "" bad_pop3
! IntCmp ${G_POP3} 1 pop3_ok bad_pop3
! IntCmp ${G_POP3} 65535 pop3_ok pop3_ok
bad_pop3:
MessageBox MB_OK|MB_ICONEXCLAMATION \
! "$(PFI_LANG_OPTIONS_MBPOP3_1) $\"${G_POP3}$\"'.\
$\r$\n$\r$\n\
$(PFI_LANG_OPTIONS_MBPOP3_2)\
--- 1314,1331 ----
Push ${L_RESULT}
! !insertmacro MUI_INSTALLOPTIONS_READ $G_POP3 "ioA.ini" "Field 2" "State"
! !insertmacro MUI_INSTALLOPTIONS_READ $G_GUI "ioA.ini" "Field 4" "State"
! StrCmp $G_POP3 $G_GUI ports_must_differ
! Push $G_POP3
Call StrCheckDecimal
Pop ${L_RESULT}
StrCmp ${L_RESULT} "" bad_pop3
! IntCmp $G_POP3 1 pop3_ok bad_pop3
! IntCmp $G_POP3 65535 pop3_ok pop3_ok
bad_pop3:
MessageBox MB_OK|MB_ICONEXCLAMATION \
! "$(PFI_LANG_OPTIONS_MBPOP3_1) $\"$G_POP3$\"'.\
$\r$\n$\r$\n\
$(PFI_LANG_OPTIONS_MBPOP3_2)\
***************
*** 1327,1340 ****
pop3_ok:
! Push ${G_GUI}
Call StrCheckDecimal
Pop ${L_RESULT}
StrCmp ${L_RESULT} "" bad_gui
! IntCmp ${G_GUI} 1 good_exit bad_gui
! IntCmp ${G_GUI} 65535 good_exit good_exit
bad_gui:
MessageBox MB_OK|MB_ICONEXCLAMATION \
! "$(PFI_LANG_OPTIONS_MBGUI_1) $\"${G_GUI}$\".\
$\r$\n$\r$\n\
$(PFI_LANG_OPTIONS_MBGUI_2)\
--- 1335,1348 ----
pop3_ok:
! Push $G_GUI
Call StrCheckDecimal
Pop ${L_RESULT}
StrCmp ${L_RESULT} "" bad_gui
! IntCmp $G_GUI 1 good_exit bad_gui
! IntCmp $G_GUI 65535 good_exit good_exit
bad_gui:
MessageBox MB_OK|MB_ICONEXCLAMATION \
! "$(PFI_LANG_OPTIONS_MBGUI_1) $\"$G_GUI$\".\
$\r$\n$\r$\n\
$(PFI_LANG_OPTIONS_MBGUI_2)\
***************
*** 1427,1431 ****
!define L_ORDINALS $R1 ; "Identity Ordinals" flag (1 = found, 0 = not found)
!define L_SEPARATOR $R0 ; char used to separate the pop3 server from the username
! !define LG_TEMP $9 ; a global register "borrowed" for use locally
Push ${L_ACCOUNT}
--- 1435,1439 ----
!define L_ORDINALS $R1 ; "Identity Ordinals" flag (1 = found, 0 = not found)
!define L_SEPARATOR $R0 ; char used to separate the pop3 server from the username
! !define L_TEMP $9
Push ${L_ACCOUNT}
***************
*** 1439,1443 ****
Push ${L_ORDINALS}
Push ${L_SEPARATOR}
! Push ${LG_TEMP}
; Determine the separator character to be used when configuring an email account for POPFile
--- 1447,1451 ----
Push ${L_ORDINALS}
Push ${L_SEPARATOR}
! Push ${L_TEMP}
; Determine the separator character to be used when configuring an email account for POPFile
***************
*** 1460,1465 ****
StrCpy ${L_ORDINALS} "1"
! ReadRegDWORD ${LG_TEMP} HKCU "Identities\${L_GUID}" "Identity Ordinal"
! IntCmp ${LG_TEMP} 1 firstOrdinal noOrdinals otherOrdinal
firstOrdinal:
--- 1468,1473 ----
StrCpy ${L_ORDINALS} "1"
! ReadRegDWORD ${L_TEMP} HKCU "Identities\${L_GUID}" "Identity Ordinal"
! IntCmp ${L_TEMP} 1 firstOrdinal noOrdinals otherOrdinal
firstOrdinal:
***************
*** 1502,1507 ****
Push ${L_SEPARATOR}
Call StrStr
! Pop ${LG_TEMP}
! StrCmp ${LG_TEMP} "" 0 try_next_account
!insertmacro MUI_HEADER_TEXT "$(PFI_LANG_OECFG_TITLE)" "$(PFI_LANG_OECFG_SUBTITLE)"
--- 1510,1515 ----
Push ${L_SEPARATOR}
Call StrStr
! Pop ${L_TEMP}
! StrCmp ${L_TEMP} "" 0 try_next_account
!insertmacro MUI_HEADER_TEXT "$(PFI_LANG_OECFG_TITLE)" "$(PFI_LANG_OECFG_SUBTITLE)"
***************
*** 1525,1530 ****
Push ${L_SEPARATOR}
Call StrStr
! Pop ${LG_TEMP}
! StrCmp ${LG_TEMP} "" 0 try_next_account
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioB.ini" "Field 9" "Text" ${L_OEDATA}
--- 1533,1538 ----
Push ${L_SEPARATOR}
Call StrStr
! Pop ${L_TEMP}
! StrCmp ${L_TEMP} "" 0 try_next_account
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioB.ini" "Field 9" "Text" ${L_OEDATA}
***************
*** 1543,1559 ****
!insertmacro MUI_INSTALLOPTIONS_DISPLAY_RETURN "ioB.ini"
! Pop ${LG_TEMP}
! StrCmp ${LG_TEMP} "cancel" finished_this_guid
! StrCmp ${LG_TEMP} "back" finished_this_guid
; Has the user ticked the 'configure this account' check box ?
! !insertmacro MUI_INSTALLOPTIONS_READ ${LG_TEMP} "ioB.ini" "Field 2" "State"
! StrCmp ${LG_TEMP} "1" change_oe try_next_account
change_oe:
ReadRegStr ${L_OEDATA} HKCU ${L_ACCOUNT} "POP3 User Name"
! ReadRegStr ${LG_TEMP} HKCU ${L_ACCOUNT} "POP3 Server"
; To be able to restore the registry to previous settings when we uninstall we
--- 1551,1567 ----
!insertmacro MUI_INSTALLOPTIONS_DISPLAY_RETURN "ioB.ini"
! Pop ${L_TEMP}
! StrCmp ${L_TEMP} "cancel" finished_this_guid
! StrCmp ${L_TEMP} "back" finished_this_guid
; Has the user ticked the 'configure this account' check box ?
! !insertmacro MUI_INSTALLOPTIONS_READ ${L_TEMP} "ioB.ini" "Field 2" "State"
! StrCmp ${L_TEMP} "1" change_oe try_next_account
change_oe:
ReadRegStr ${L_OEDATA} HKCU ${L_ACCOUNT} "POP3 User Name"
! ReadRegStr ${L_TEMP} HKCU ${L_ACCOUNT} "POP3 Server"
; To be able to restore the registry to previous settings when we uninstall we
***************
*** 1572,1579 ****
FileWrite ${L_CFG} "${L_ACCOUNT}$\n"
FileWrite ${L_CFG} "POP3 Server$\n"
! FileWrite ${L_CFG} "${LG_TEMP}$\n"
FileClose ${L_CFG}
! WriteRegStr HKCU ${L_ACCOUNT} "POP3 User Name" "${LG_TEMP}${L_SEPARATOR}${L_OEDATA}"
WriteRegStr HKCU ${L_ACCOUNT} "POP3 Server" "127.0.0.1"
--- 1580,1587 ----
FileWrite ${L_CFG} "${L_ACCOUNT}$\n"
FileWrite ${L_CFG} "POP3 Server$\n"
! FileWrite ${L_CFG} "${L_TEMP}$\n"
FileClose ${L_CFG}
! WriteRegStr HKCU ${L_ACCOUNT} "POP3 User Name" "${L_TEMP}${L_SEPARATOR}${L_OEDATA}"
WriteRegStr HKCU ${L_ACCOUNT} "POP3 Server" "127.0.0.1"
***************
*** 1593,1597 ****
finished_oe_config:
! Pop ${LG_TEMP}
Pop ${L_SEPARATOR}
Pop ${L_ORDINALS}
--- 1601,1605 ----
finished_oe_config:
! Pop ${L_TEMP}
Pop ${L_SEPARATOR}
Pop ${L_ORDINALS}
***************
*** 1615,1619 ****
!undef L_ORDINALS
!undef L_SEPARATOR
! !undef LG_TEMP
FunctionEnd
--- 1623,1627 ----
!undef L_ORDINALS
!undef L_SEPARATOR
! !undef L_TEMP
FunctionEnd
***************
*** 1694,1698 ****
; User has changed their mind: Shutdown the newly installed version of POPFile
! NSISdl::download_quiet http://127.0.0.1:${G_GUI}/shutdown "$PLUGINSDIR\shutdown.htm"
Pop ${L_TEMP} ; Get the return value (and ignore it)
Push ${L_EXE}
--- 1702,1706 ----
; User has changed their mind: Shutdown the newly installed version of POPFile
! NSISdl::download_quiet http://127.0.0.1:$G_GUI/shutdown "$PLUGINSDIR\shutdown.htm"
Pop ${L_TEMP} ; Get the return value (and ignore it)
Push ${L_EXE}
***************
*** 1726,1730 ****
; is running on the same UI port as the newly installed version.
! NSISdl::download_quiet http://127.0.0.1:${G_GUI}/shutdown "$PLUGINSDIR\shutdown.htm"
Pop ${L_TEMP} ; Get the return value (and ignore it)
Push ${L_EXE}
--- 1734,1738 ----
; is running on the same UI port as the newly installed version.
! NSISdl::download_quiet http://127.0.0.1:$G_GUI/shutdown "$PLUGINSDIR\shutdown.htm"
Pop ${L_TEMP} ; Get the return value (and ignore it)
Push ${L_EXE}
***************
*** 1750,1754 ****
; is running on the same UI port as the newly installed version.
! NSISdl::download_quiet http://127.0.0.1:${G_GUI}/shutdown "$PLUGINSDIR\shutdown.htm"
Pop ${L_TEMP} ; Get the return value (and ignore it)
Push ${L_EXE}
--- 1758,1762 ----
; is running on the same UI port as the newly installed version.
! NSISdl::download_quiet http://127.0.0.1:$G_GUI/shutdown "$PLUGINSDIR\shutdown.htm"
Pop ${L_TEMP} ; Get the return value (and ignore it)
Push ${L_EXE}
***************
*** 1763,1767 ****
check_if_ready:
! NSISdl::download_quiet http://127.0.0.1:${G_GUI} "$PLUGINSDIR\ui.htm"
Pop ${L_TEMP} ; Did POPFile return an HTML page?
StrCmp ${L_TEMP} "success" remove_banner
--- 1771,1775 ----
check_if_ready:
! NSISdl::download_quiet http://127.0.0.1:$G_GUI "$PLUGINSDIR\ui.htm"
Pop ${L_TEMP} ; Did POPFile return an HTML page?
StrCmp ${L_TEMP} "success" remove_banner
***************
*** 1829,1833 ****
Function RunUI
! ExecShell "open" "http://127.0.0.1:${G_GUI}"
FunctionEnd
--- 1837,1841 ----
Function RunUI
! ExecShell "open" "http://127.0.0.1:$G_GUI"
FunctionEnd
***************
*** 1840,1844 ****
Function ShowReadMe
! StrCmp ${G_NOTEPAD} "" use_file_association
Exec 'notepad.exe "$INSTDIR\${C_README}"'
goto exit
--- 1848,1852 ----
Function ShowReadMe
! StrCmp $G_NOTEPAD "" use_file_association
Exec 'notepad.exe "$INSTDIR\${C_README}"'
goto exit
***************
*** 1964,1968 ****
attempt_shutdown:
! StrCpy ${G_GUI} ""
StrCpy ${L_OLDUI} ""
--- 1972,1976 ----
attempt_shutdown:
! StrCpy $G_GUI ""
StrCpy ${L_OLDUI} ""
***************
*** 1982,1986 ****
got_html_port:
! StrCpy ${G_GUI} ${L_LNE} 5 10
Goto loop
--- 1990,1994 ----
got_html_port:
! StrCpy $G_GUI ${L_LNE} 5 10
Goto loop
***************
*** 1992,2003 ****
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}
Goto check_shutdown
--- 2000,2011 ----
FileClose ${L...
[truncated message content] |