CallInstDLL /NOUNLOAD added
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@813 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
ca7f63a285
commit
4c9029094e
6 changed files with 14 additions and 7 deletions
|
@ -1835,6 +1835,7 @@ void CEXEBuild::print_warnings()
|
|||
void CEXEBuild::build_plugin_table(void)
|
||||
{
|
||||
plugin_used = false;
|
||||
uninst_plugin_used = false;
|
||||
char* nsisdir = definedlist.find("NSISDIR");
|
||||
if (nsisdir)
|
||||
{
|
||||
|
@ -1933,7 +1934,7 @@ again:
|
|||
ret=function_end();
|
||||
if (ret != PS_OK) return ret;
|
||||
|
||||
if (uninstaller_writes_used && !uninstall) {
|
||||
if (uninst_plugin_used && !uninstall) {
|
||||
add_function("un.Initialize_____Plugins");
|
||||
uninstall = true;
|
||||
goto again;
|
||||
|
|
|
@ -116,6 +116,7 @@ class CEXEBuild {
|
|||
// Added by Ximon Eighteen 5th August 2002
|
||||
Plugins m_plugins;
|
||||
bool plugin_used;
|
||||
bool uninst_plugin_used;
|
||||
#endif //NSIS_CONFIG_PLUGIN_SUPPORT
|
||||
|
||||
// build.cpp functions used mostly within build.cpp
|
||||
|
|
|
@ -841,7 +841,7 @@ static int NSISCALL ExecuteEntry(entry *entries, int pos)
|
|||
update_status_text_from_lang(LANGID_CANNOTFINDSYMBOL,buf2);
|
||||
log_printf3("Error registering DLL: %s not found in %s",buf2,buf);
|
||||
}
|
||||
FreeLibrary(h);
|
||||
if (!parm3) FreeLibrary(h);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -79,7 +79,7 @@ enum
|
|||
|
||||
EW_GETDLLVERSION, // GetDLLVersion: 3 [file highout lowout]
|
||||
|
||||
EW_REGISTERDLL, // Register DLL: 3,[DLL file name, string ptr of function to call, text to put in display (<0 if none/pass parms)]
|
||||
EW_REGISTERDLL, // Register DLL: 3,[DLL file name, string ptr of function to call, text to put in display (<0 if none/pass parms), 1 - no unload, 0 - unload]
|
||||
|
||||
EW_CREATESHORTCUT, // Make Shortcut: 5, [link file, target file, parameters, icon file, iconindex|show mode<<8|hotkey<<16]
|
||||
|
||||
|
|
|
@ -2028,7 +2028,11 @@ int CEXEBuild::doCommand(int which_token, LineParser &line, FILE *fp, const char
|
|||
}
|
||||
else if (which_token == TOK_CALLINSTDLL)
|
||||
{
|
||||
ent.offsets[1] = add_string(line.gettoken_str(2));
|
||||
int a = 2;
|
||||
if (!stricmp(line.gettoken_str(a++), "/NOUNLOAD"))
|
||||
ent.offsets[3]=1;
|
||||
if (a+1 != line.getnumtokens()) PRINTHELP();
|
||||
ent.offsets[1]=add_string(line.gettoken_str(a));
|
||||
if (ent.offsets[1]<0) PRINTHELP()
|
||||
ent.offsets[2]=-1;
|
||||
}
|
||||
|
@ -2039,7 +2043,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line, FILE *fp, const char
|
|||
ent.offsets[2]=add_string("Registering: ");
|
||||
}
|
||||
|
||||
SCRIPT_MSG("%s: \"%s\" %s\n",line.gettoken_str(0),line.gettoken_str(1), line.gettoken_str(2));
|
||||
SCRIPT_MSG("%s: \"%s\" %s\n",line.gettoken_str(0),line.gettoken_str(1), line.gettoken_str(ent.offsets[3]?3:2));
|
||||
return add_entry(&ent);
|
||||
#endif//NSIS_SUPPORT_ACTIVEXREG
|
||||
case TOK_RENAME:
|
||||
|
@ -3433,7 +3437,8 @@ int CEXEBuild::doCommand(int which_token, LineParser &line, FILE *fp, const char
|
|||
char* dllPath = m_plugins.GetPluginDll(line.gettoken_str(0));
|
||||
if (dllPath)
|
||||
{
|
||||
plugin_used = true;
|
||||
if (uninstall_mode) uninst_plugin_used = true;
|
||||
else plugin_used = true;
|
||||
|
||||
ent.which=EW_CALL;
|
||||
ent.offsets[0]=ns_func.add(uninstall_mode?"un.Initialize_____Plugins":"Initialize_____Plugins",0);
|
||||
|
|
|
@ -25,7 +25,7 @@ static tokenType tokenlist[TOK__LAST] =
|
|||
{TOK_BRANDINGTEXT,"BrandingText",1,2,"[/LANG=lang_id] [/TRIM(LEFT|RIGHT|CENTER)] installer_text"},
|
||||
{TOK_BRINGTOFRONT,"BringToFront",0,0,""},
|
||||
{TOK_CALL,"Call",1,0,"function_name | [:label_name]"},
|
||||
{TOK_CALLINSTDLL,"CallInstDLL",2,0,"dll_path_on_target.dll function"},
|
||||
{TOK_CALLINSTDLL,"CallInstDLL",2,1,"dll_path_on_target.dll [/NOUNLOAD] function"},
|
||||
{TOK_CAPTION,"Caption",1,1,"[/LANG=lang_id] installer_caption"},
|
||||
{TOK_CHANGEUI,"ChangeUI",2,0,"(all|dlg_id) ui_file.exe"},
|
||||
{TOK_CLEARERRORS,"ClearErrors",0,0,""},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue