|
From: <xue...@us...> - 2003-06-20 11:57:45
|
Update of /cvsroot/popfile/windows
In directory sc8-pr-cvs1:/tmp/cvs-serv4916
Modified Files:
installer.nsi
Log Message:
Improved handling of the Release Notes. Now using 'Finish' functions to start the UI and/or display the release notes.
Index: installer.nsi
===================================================================
RCS file: /cvsroot/popfile/windows/installer.nsi,v
retrieving revision 1.68
retrieving revision 1.69
diff -C2 -d -r1.68 -r1.69
*** installer.nsi 16 Jun 2003 12:38:03 -0000 1.68
--- installer.nsi 20 Jun 2003 11:57:40 -0000 1.69
***************
*** 13,24 ****
; WARNING:
! ; This script requires "NSIS Modern User Interface" version 1.65 (or later)
; because it uses the new (simplified) page configuration system.
#--------------------------------------------------------------------------
! !define MUI_PRODUCT "POPFile"
! !define MUI_VERSION "0.20.0 (CVS)"
! !define RELEASE_NOTES "..\engine\v0.19.0.change"
!include "MUI.nsh"
--- 13,25 ----
; WARNING:
! ; This script requires "NSIS Modern User Interface" version 1.65 (17 June 2003 or later)
; because it uses the new (simplified) page configuration system.
#--------------------------------------------------------------------------
! !define MUI_PRODUCT "POPFile"
! !define MUI_VERSION "0.20.0 (CVS)"
! !define README "v0.19.0.change"
! !define RELEASE_NOTES "..\engine\${README}"
!include "MUI.nsh"
***************
*** 88,92 ****
; option is only offered if the installer has started POPFile running)
! !define MUI_FINISHPAGE_SHOWREADME "http://127.0.0.1:${GUI}/"
; Allow user to check the log file (by clicking "Show Details" button on the "Install" page)
--- 89,100 ----
; option is only offered if the installer has started POPFile running)
! !define MUI_FINISHPAGE_RUN
! !define MUI_FINISHPAGE_RUN_FUNCTION "RunUI"
!
! ; Display the Release Notes for this version of POPFile
!
! !define MUI_FINISHPAGE_SHOWREADME
! !define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
! !define MUI_FINISHPAGE_SHOWREADME_FUNCTION "ShowReadMe"
; Allow user to check the log file (by clicking "Show Details" button on the "Install" page)
***************
*** 157,162 ****
It is recommended that you close all other applications before starting Setup.\r\n\r\n"
! !insertmacro MUI_LANGUAGEFILE_STRING MUI_TEXT_FINISH_SHOWREADME \
! "Display the POPFile User Interface"
!insertmacro MUI_LANGUAGE "English"
--- 165,169 ----
It is recommended that you close all other applications before starting Setup.\r\n\r\n"
! !insertmacro MUI_LANGUAGEFILE_STRING MUI_TEXT_FINISH_RUN "Display POPFile &User Interface"
!insertmacro MUI_LANGUAGE "English"
***************
*** 170,174 ****
OutFile "setup.exe"
! ; Ensure CRC checking cannot be turned off using the command-line switch
CRCcheck Force
--- 177,181 ----
OutFile "setup.exe"
! ; Ensure CRC checking cannot be turned off using the /NCRC command-line switch
CRCcheck Force
***************
*** 216,219 ****
--- 223,227 ----
ReserveFile "ioB.ini"
ReserveFile "ioC.ini"
+ ReserveFile "${RELEASE_NOTES}"
#--------------------------------------------------------------------------
***************
*** 230,235 ****
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "ioB.ini"
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "ioC.ini"
!
! File /oname=$PLUGINSDIR\release.txt "${RELEASE_NOTES}"
MessageBox MB_YESNO "Display POPFile Release Notes ?$\r$\n$\r$\n\
'Yes' recommended if you are upgrading." IDNO exit
--- 238,244 ----
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "ioB.ini"
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "ioC.ini"
!
! !insertmacro MUI_INSTALLOPTIONS_EXTRACT_AS "${RELEASE_NOTES}" "release.txt"
!
MessageBox MB_YESNO "Display POPFile Release Notes ?$\r$\n$\r$\n\
'Yes' recommended if you are upgrading." IDNO exit
***************
*** 277,280 ****
--- 286,294 ----
File "..\engine\license"
File "${RELEASE_NOTES}"
+ SearchPath ${CFG} notepad.exe
+ StrCmp ${CFG} "" 0 readme_ok
+ File /oname=${README}.txt "${RELEASE_NOTES}"
+
+ readme_ok:
File "..\engine\popfile.pl"
File "..\engine\insert.pl"
***************
*** 1242,1248 ****
# (the "pre" function for the 'Finish' page)
#
! # The 'Finish' page contains a single CheckBox to control whether or not the installer
! # starts the POPFile User Interface. The User Interface only works when POPFile is running,
! # so we must ensure this CheckBox can only be ticked if the installer has started POPFile.
#--------------------------------------------------------------------------
--- 1256,1263 ----
# (the "pre" function for the 'Finish' page)
#
! # The 'Finish' page contains two CheckBoxes: one to control whether or not the installer
! # starts the POPFile User Interface and one to control whether or not the 'ReadMe' file is
! # displayed. The User Interface only works when POPFile is running, so we must ensure its
! # CheckBox can only be ticked if the installer has started POPFile.
#--------------------------------------------------------------------------
***************
*** 1253,1257 ****
Push ${L_TEMP}
! ; Field 4 is the 'ReadMe' CheckBox on the 'Finish' page (assuming there is no 'Run' CheckBox)
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Flags" ""
--- 1268,1272 ----
Push ${L_TEMP}
! ; Field 4 is the 'Run' CheckBox on the 'Finish' page
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Flags" ""
***************
*** 1275,1278 ****
--- 1290,1325 ----
#--------------------------------------------------------------------------
+ # Installer Function: RunUI
+ # (the "Run" function for the 'Finish' page)
+ #--------------------------------------------------------------------------
+
+ Function RunUI
+ ExecShell "open" "http://127.0.0.1:${GUI}"
+ FunctionEnd
+
+ #--------------------------------------------------------------------------
+ # Installer Function: ShowReadMe
+ # (the "ReadMe" function for the 'Finish' page)
+ #--------------------------------------------------------------------------
+
+ Function ShowReadMe
+ !define L_TEMP $R9
+ Push ${L_TEMP}
+
+ SearchPath ${L_TEMP} notepad.exe
+ StrCmp ${L_TEMP} "" use_file_association
+ Exec 'notepad.exe "$INSTDIR\${README}"'
+ goto exit
+
+ use_file_association:
+ ExecShell "open" "$INSTDIR\${README}.txt"
+
+ exit:
+ Pop ${L_TEMP}
+
+ !undef L_TEMP
+ FunctionEnd
+
+ #--------------------------------------------------------------------------
# Installer Function: GetSeparator
#
***************
*** 1617,1620 ****
--- 1664,1668 ----
Delete $INSTDIR\*.dll
Delete $INSTDIR\*.change
+ Delete $INSTDIR\*.change.txt
Delete $INSTDIR\license
Delete $INSTDIR\popfile.cfg
|