From: <and...@us...> - 2024-09-02 14:58:14
|
Revision: 7440 http://sourceforge.net/p/nsis/code/7440 Author: anders_k Date: 2024-09-02 14:58:12 +0000 (Mon, 02 Sep 2024) Log Message: ----------- Handle CHARSET parameter (patch 315) Modified Paths: -------------- NSIS/trunk/Contrib/Makensisw/makensisw.cpp NSIS/trunk/Docs/src/history.but Modified: NSIS/trunk/Contrib/Makensisw/makensisw.cpp =================================================================== --- NSIS/trunk/Contrib/Makensisw/makensisw.cpp 2024-09-02 14:28:27 UTC (rev 7439) +++ NSIS/trunk/Contrib/Makensisw/makensisw.cpp 2024-09-02 14:58:12 UTC (rev 7440) @@ -151,13 +151,16 @@ enum { CMD_PICKCOMP = 0x0001, CMD_SPY = 0x0080, CMD_LOOKUP = 0x8000 }; static UINT ProcessCommandLine() { + LPCWSTR alwaysextraparam[] = { _T("INPUTCHARSET"), _T("ICS"), _T("OUTPUTCHARSET"), _T("OCS") }; TCHAR **argv; - int i, j, retflags = 0; + int i, j, retflags = 0, in_files = 0; int argc = SetArgv((TCHAR *)GetCommandLine(), &argv); if (argc > 1) { for (i = 1; i < argc; i++) { - if (!lstrcmpi(argv[i], _T("/Spy"))) retflags |= CMD_SPY; + if (in_files) goto openfile; + else if (!lstrcmpi(argv[i], _T("--"))) ++in_files; + else if (!lstrcmpi(argv[i], _T("/Spy"))) retflags |= CMD_SPY; else if (!lstrcmpi(argv[i], _T("/Lookup"))) retflags |= CMD_LOOKUP; else if (!StrCmpNI(argv[i], _T("/XSetCompressor "), COUNTOF("/XSetCompressor ") - !0)) { @@ -179,9 +182,12 @@ } else if (argv[i][0] == _T('-') || argv[i][0] == _T('/')) { - AddScriptCmdArgs(argv[i]); + AddScriptCmdArgs(argv[i]); + for (SIZE_T k = 0; k < COUNTOF(alwaysextraparam); ++k) + if (!lstrcmpi(argv[i] + 1, alwaysextraparam[k]) && ++i < argc) + AddScriptCmdArgs(argv[i]); } - else + else openfile: { SetScript(argv[i], false); PushMRUFile(g_sdata.script); Modified: NSIS/trunk/Docs/src/history.but =================================================================== --- NSIS/trunk/Docs/src/history.but 2024-09-02 14:28:27 UTC (rev 7439) +++ NSIS/trunk/Docs/src/history.but 2024-09-02 14:58:12 UTC (rev 7440) @@ -14,6 +14,8 @@ \b Support setting source file decoding charset with magic comment (\W{http://sf.net/p/nsis/patches/292}{patch #292}) +\b Handle CHARSET command line parameter in MakeNSISW (\W{http://sf.net/p/nsis/patches/315}{patch #315}) + \b Make System/Resource.dll reproducible (\W{http://sf.net/p/nsis/patches/312}{patch #312}) \b Zip2Exe accepts .zip as command line parameter This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |