Use a custom file reader with UTF8 support for nsi/nsh/nlf files and store UTF16LE or MBCS (stringblock) strings in ExeHeadStringList

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6289 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2013-03-07 21:25:35 +00:00
parent e6ac4e6d9b
commit dcddf977b2
18 changed files with 1208 additions and 623 deletions

View file

@ -6,13 +6,15 @@ These commands are similar to the C preprocessor in terms of purpose and functio
\S1{include} !include
\c [/NONFATAL] file
\# NOTE: \NsisInputCharset define cannot be used in a \c block
This command will include 'file' as if it was part of the original script. Note that if a file is included in another directory, the current directory is still where the script was compiled from (not where the included file resides). If the compiler can't find the file it will look for it in every include directory. See \R{addincludedir}{!addincludedir} for more information. If the /nonfatal switch is used and no files are found, a warning will be issued instead of an error.
\c [/NONFATAL] [/CHARSET=ACP|OEM|CP#|UTF8] file
This command will include 'file' as if it was part of the original script. Note that if a file is included in another directory, the current directory is still where the script was compiled from (not where the included file resides). If the compiler can't find the file it will look for it in every include directory. See \R{addincludedir}{!addincludedir} for more information. If the /nonfatal switch is used and no files are found, a warning will be issued instead of an error. /charset can be used to specify a codepage for plain text files without a BOM.
\c !include WinMessages.nsh
\c !include Library.nsh
\c !include C:\MyConfig.nsi
\c !include /CHARSET=CP1252 C:\MyConfig.nsi
\c !include ..\MyConfig.nsh
\c !include /NONFATAL file_that_may_exist_or_not.nsh

View file

@ -12,6 +12,8 @@
\define{NsisACPcp} system default ANSI codepage (ACP)
\define{NsisInputCharset} ACP|OEM|CP#|UTF8
\define{NsisWarnBlockContainerBegin} \\<div class=\\"wb\\"\\>
\define{NsisWarnBlockContainerEnd} \\</div\\>

View file

@ -29,6 +29,8 @@ If you want to use MakeNSIS on the command line, the syntax of the makensis comm
\b /NOCD disables the current directory change to that of the .nsi file
\b /INPUTCHARSET allows you to specify a specific codepage for files without a BOM. (\NsisInputCharset)
\b Using the /D switch one or more times will add to symbols to the globally defined list (See !define).
\b Using the /X switch one or more times will execute the code you specify following it. Example: "/XAutoCloseWindow false"