From: Amir S. <ki...@gm...> - 2012-12-12 20:47:16
|
Actually, it is a semi-colon in English.nsh. The problem is, again, the BOM. If I remove the BOM from English.nsh, I get to the next issue of CHM not building. Anders, care to chime in on this? On Wed, Dec 12, 2012 at 12:33 PM, Oleksandr Gavenko <gav...@gm...>wrote: > I try build complicate .nsi file (because it uses 'MUI_LANGUAGE'): > > cmd# cd c:\opt\nsis\Examples > cmd# ..\makensis makensis.nsi > ... > !insertmacro: MUI_PAGE_WELCOME > !insertmacro: end of MUI_PAGE_WELCOME > !insertmacro: MUI_PAGE_LICENSE > > and I get 100% CPU load. I break build by Ctrl-c: > > Aborting on Ctrl+C... > > I comment licence macro usage: > > ; !insertmacro MUI_PAGE_LICENSE "..\COPYING" > > ================================================================ > > Next i get error: > > ... > Error: Invalid language file. > Error in macro MUI_LANGUAGE on macroline 9 > Error in script "makensis.nsi" on line 99 -- aborting creation process > > MUI_LANGUAGE macro have line: > > LoadLanguageFile "${NSISDIR}\Contrib\Language files\${LANGUAGE}.nlf" > > and error come from 'Source/lang.cpp': > > // NSIS Language File parser > LanguageTable * CEXEBuild::LoadLangFile(TCHAR *filename) { > ... > #ifndef _UNICODE > char fencoding = 0; // 0 = ansi, 8 = utf-8 (16/17 for uft-16le/be not > supported) > if (IsUTF8BOM(f)) fencoding = 8; > #endif > > // Check header > TCHAR buf[NSIS_MAX_STRLEN]; > buf[0] = SkipComments(f); > _fgetts(buf+1, NSIS_MAX_STRLEN, f); > > if (_tcsncmp(buf, _T("NLF v"), 5)) { > ERROR_MSG(_T("Error: Invalid language file.\n")); > return 0; > } > ... > > I put: > > ERROR_MSG(buf); > > before "if-error" and get such output: > > i╗?# Header, don't edit > > I save it to file first 3 symbol is 0xef-bb-bf - UTF-8 BOM. > > As by default UNICODE=yes (from "scons -h") '_UNICODE' macro defined and > 'IsUTF8BOM' does not executed... > > I delete '#ifdef'. This '#ifdef' introduced by: > > r6196 | anders_k | 2011-12-06 01:44:26 +0200 (Tue, 06 Dec 2011) | 2 lines > > Basic UTF-8 support in ansi build so it can read UTF-8 .nlf files and > LangStrings > > Seems that 'IsUTF8BOM' call required in any case... Can anyone look to > this? > > ================================================================ > > Next error is: > > !insertmacro: MUI_LANGUAGE > Error: Label declaration not valid outside of function/section > !include: error in script: "C:\opt\NSIS\Contrib\Language > files\English.nsh" on line 1 > Error in macro LANGFILE_INCLUDE_WITHDEFAULT on macroline 12 > Error in macro MUI_LANGUAGE on macroline 12 > Error in script "makensis.nsi" on line 99 -- aborting creation process > > So from 'Contrib/Modern UI 2/Localization.nsh': > > !insertmacro LANGFILE_INCLUDE_WITHDEFAULT "${NSISDIR}\Contrib\Language > files\${LANGUAGE}.nsh" "${NSISDIR}\Contrib\Language files\English.nsh" > > call macro: > > !macro LANGFILE_INCLUDE_WITHDEFAULT FILENAME FILENAME_DEFAULT > > from 'Include/LangFile.nsh' where line 12 is: > > !include "${FILENAME}" > > First line of "English.nsh" is: > > ;Language: English (1033) > > so it really have ':' - label char! Can any help with this also? > > ================================================================ > > I stop, think enough for today )) > > -- > Best regards! > > > ------------------------------------------------------------------------------ > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial > Remotely access PCs and mobile devices and provide instant support > Improve your efficiency, and focus on delivering more value-add services > Discover what IT Professionals Know. Rescue delivers > http://p.sf.net/sfu/logmein_12329d2d > _______________________________________________ > Nsis-devel mailing list > Nsi...@li... > https://lists.sourceforge.net/lists/listinfo/nsis-devel > |