From 6678a998ff5db58343029138b5c2cbbcae347907 Mon Sep 17 00:00:00 2001 From: kichik Date: Fri, 8 Nov 2002 16:58:45 +0000 Subject: [PATCH] Warning about misused /NOUNLOAD git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1619 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/script.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/script.cpp b/Source/script.cpp index ae465582..ec8457c1 100644 --- a/Source/script.cpp +++ b/Source/script.cpp @@ -3771,16 +3771,20 @@ int CEXEBuild::doCommand(int which_token, LineParser &line, FILE *fp, const char // First push dll args int parmst=i; // we push em in reverse order + int nounloadmisused=0; for (; i < line.getnumtokens(); i++) { int w=parmst + (line.getnumtokens()-i - 1); ent.which=EW_PUSHPOP; ent.offsets[0]=add_string(line.gettoken_str(w)); + if (!lstrcmpi(line.gettoken_str(w), "/NOUNLOAD")) nounloadmisused=1; ent.offsets[1]=0; ret=add_entry(&ent); if (ret != PS_OK) return ret; SCRIPT_MSG(" %s",line.gettoken_str(i)); } SCRIPT_MSG("\n"); + if (nounloadmisused) + warning("/NOUNLOAD must come first before any plugin parameter. Unless the plugin you are trying to use has a parameter /NOUNLOAD, you are doing something wrong."); // next, call it ent.which=EW_REGISTERDLL;