Update of /cvsroot/popfile/windows
In directory sc8-pr-cvs1:/tmp/cvs-serv18749
Modified Files:
installer.nsi
Log Message:
Before displaying the "Release Notes", the installer now converts the file to a form which the standard Windows NOTEPAD.EXE can display. The converted file is also copied to the installation directory for later use. [See RFE #776214]
Index: installer.nsi
===================================================================
RCS file: /cvsroot/popfile/windows/installer.nsi,v
retrieving revision 1.104
retrieving revision 1.105
diff -C2 -d -r1.104 -r1.105
*** installer.nsi 10 Aug 2003 10:41:47 -0000 1.104
--- installer.nsi 10 Aug 2003 14:53:46 -0000 1.105
***************
*** 453,456 ****
--- 453,460 ----
Function .onInit
+ !define L_INPUT_FILE_HANDLE $R9
+ !define L_OUTPUT_FILE_HANDLE $R8
+ !define L_LINE $R7
+
; Conditional compilation: if ENGLISH_ONLY is defined, support only 'English'
***************
*** 463,468 ****
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "ioC.ini"
! !insertmacro MUI_INSTALLOPTIONS_EXTRACT_AS "${C_RELEASE_NOTES}" "release.txt"
FunctionEnd
--- 467,496 ----
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "ioC.ini"
! !insertmacro MUI_INSTALLOPTIONS_EXTRACT_AS "${C_RELEASE_NOTES}" "${C_README}"
+ ; Ensure the release notes are in a format which the standard Windows NOTEPAD.EXE can use.
+ ; When the "POPFile" section is processed, the converted release notes will be copied to the
+ ; installation directory to ensure user has a copy which can be read by NOTEPAD.EXE later.
+
+ FileOpen ${L_INPUT_FILE_HANDLE} "$PLUGINSDIR\${C_README}" r
+ FileOpen ${L_OUTPUT_FILE_HANDLE} "$PLUGINSDIR\${C_README}.txt" w
+ ClearErrors
+
+ loop:
+ FileRead ${L_INPUT_FILE_HANDLE} ${L_LINE}
+ IfErrors close_files
+ Push ${L_LINE}
+ Call TrimNewlines
+ Pop ${L_LINE}
+ FileWrite ${L_OUTPUT_FILE_HANDLE} ${L_LINE}$\r$\n
+ Goto loop
+
+ close_files:
+ FileClose ${L_INPUT_FILE_HANDLE}
+ FileClose ${L_OUTPUT_FILE_HANDLE}
+
+ !undef L_INPUT_FILE_HANDLE
+ !undef L_OUTPUT_FILE_HANDLE
+ !undef L_LINE
FunctionEnd
***************
*** 484,492 ****
$(PFI_LANG_MBRELNOTES_2)" IDNO exit
StrCmp $G_NOTEPAD "" use_file_association
! ExecWait 'notepad.exe "$PLUGINSDIR\release.txt"'
GoTo exit
use_file_association:
! ExecShell "open" "$PLUGINSDIR\release.txt"
exit:
--- 512,520 ----
$(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:
***************
*** 542,549 ****
File "..\engine\license"
File "${C_RELEASE_NOTES}"
! StrCmp $G_NOTEPAD "" 0 readme_ok
! File /oname=${C_README}.txt "${C_RELEASE_NOTES}"
!
! readme_ok:
File "..\engine\popfile.pl"
File "..\engine\insert.pl"
--- 570,574 ----
File "..\engine\license"
File "${C_RELEASE_NOTES}"
! CopyFiles /SILENT /FILESONLY "$PLUGINSDIR\${C_README}.txt" "$INSTDIR\${C_README}.txt"
File "..\engine\popfile.pl"
File "..\engine\insert.pl"
***************
*** 1849,1853 ****
StrCmp $G_NOTEPAD "" use_file_association
! Exec 'notepad.exe "$INSTDIR\${C_README}"'
goto exit
--- 1874,1878 ----
StrCmp $G_NOTEPAD "" use_file_association
! Exec 'notepad.exe "$INSTDIR\${C_README}.txt"'
goto exit
|