Skip to content

Commit

Permalink
Handle CHARSET parameter (patch 315)
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7440 212acab6-be3b-0410-9dea-997c60f758d6
  • Loading branch information
sredna committed Sep 2, 2024
1 parent 751f8d3 commit 16edb74
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
14 changes: 10 additions & 4 deletions Contrib/Makensisw/makensisw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,16 @@ static void AddScriptCmdArgs(const TCHAR *arg)
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))
{
Expand All @@ -179,9 +182,12 @@ static UINT ProcessCommandLine()
}
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);
Expand Down
2 changes: 2 additions & 0 deletions Docs/src/history.but
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Workgroups party? The end of 16-bit?

\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
Expand Down

0 comments on commit 16edb74

Please sign in to comment.