build plug-in table only when needed. this also fixes warnings when using something like makensis.exe /X"OutFile bla.exe" /XSection /XSectionEnd
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3236 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
774f3d50de
commit
7bfcfac3c2
4 changed files with 16 additions and 11 deletions
|
@ -372,6 +372,7 @@ CEXEBuild::CEXEBuild()
|
||||||
|
|
||||||
#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
|
#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
|
||||||
build_plugin_unload=0;
|
build_plugin_unload=0;
|
||||||
|
plugins_processed=0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
last_used_lang=MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US);
|
last_used_lang=MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US);
|
||||||
|
@ -3093,6 +3094,10 @@ void CEXEBuild::notify(int code, char *data)
|
||||||
#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
|
#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
|
||||||
void CEXEBuild::build_plugin_table(void)
|
void CEXEBuild::build_plugin_table(void)
|
||||||
{
|
{
|
||||||
|
if (plugins_processed)
|
||||||
|
return;
|
||||||
|
plugins_processed=1;
|
||||||
|
|
||||||
plugin_used = false;
|
plugin_used = false;
|
||||||
uninst_plugin_used = false;
|
uninst_plugin_used = false;
|
||||||
char* nsisdir = definedlist.find("NSISDIR");
|
char* nsisdir = definedlist.find("NSISDIR");
|
||||||
|
@ -3102,8 +3107,9 @@ void CEXEBuild::build_plugin_table(void)
|
||||||
if (searchPath)
|
if (searchPath)
|
||||||
{
|
{
|
||||||
wsprintf(searchPath,"%s\\plugins",nsisdir);
|
wsprintf(searchPath,"%s\\plugins",nsisdir);
|
||||||
INFO_MSG("\nProcessing plugin dlls: \"%s\\*.dll\"\n",searchPath);
|
INFO_MSG("Processing plugin dlls: \"%s\\*.dll\"\n",searchPath);
|
||||||
m_plugins.FindCommands(searchPath,display_info?true:false);
|
m_plugins.FindCommands(searchPath,display_info?true:false);
|
||||||
|
INFO_MSG("\n");
|
||||||
delete[] searchPath;
|
delete[] searchPath;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,6 +78,7 @@ class CEXEBuild {
|
||||||
#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
|
#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
|
||||||
// Added by Ximon Eighteen 5th August 2002
|
// Added by Ximon Eighteen 5th August 2002
|
||||||
void build_plugin_table(void);
|
void build_plugin_table(void);
|
||||||
|
int plugins_processed;
|
||||||
#endif //NSIS_CONFIG_PLUGIN_SUPPORT
|
#endif //NSIS_CONFIG_PLUGIN_SUPPORT
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -261,7 +261,7 @@ int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
if (build.display_script)
|
if (build.display_script)
|
||||||
{
|
{
|
||||||
fprintf(g_output,"\n\nProcessing config: \n");
|
fprintf(g_output,"Processing config: \n");
|
||||||
fflush(g_output);
|
fflush(g_output);
|
||||||
}
|
}
|
||||||
int ret=build.process_script(cfg,exepath);
|
int ret=build.process_script(cfg,exepath);
|
||||||
|
@ -275,6 +275,8 @@ int main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
fprintf(g_output,"\n");
|
||||||
|
fflush(g_output);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -328,22 +330,16 @@ int main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
fprintf(g_output,"\n");
|
||||||
|
fflush(g_output);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
|
|
||||||
// Added by Ximon Eighteen 5th August 2002
|
|
||||||
if (!plugins_processed) {
|
|
||||||
build.build_plugin_table();
|
|
||||||
plugins_processed=1;
|
|
||||||
}
|
|
||||||
#endif //NSIS_CONFIG_PLUGIN_SUPPORT
|
|
||||||
|
|
||||||
if (build.display_script)
|
if (build.display_script)
|
||||||
{
|
{
|
||||||
build.notify(MAKENSIS_NOTIFY_SCRIPT,sfile);
|
build.notify(MAKENSIS_NOTIFY_SCRIPT,sfile);
|
||||||
fprintf(g_output,"\n\nProcessing script file: \"%s\"\n",sfile);
|
fprintf(g_output,"Processing script file: \"%s\"\n",sfile);
|
||||||
fflush(g_output);
|
fflush(g_output);
|
||||||
}
|
}
|
||||||
int ret=build.process_script(fp,sfile);
|
int ret=build.process_script(fp,sfile);
|
||||||
|
|
|
@ -779,6 +779,8 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
|
||||||
HKEY_CLASSES_ROOT,HKEY_LOCAL_MACHINE,HKEY_CURRENT_USER,HKEY_USERS,HKEY_CURRENT_CONFIG,HKEY_DYN_DATA,HKEY_PERFORMANCE_DATA
|
HKEY_CLASSES_ROOT,HKEY_LOCAL_MACHINE,HKEY_CURRENT_USER,HKEY_USERS,HKEY_CURRENT_CONFIG,HKEY_DYN_DATA,HKEY_PERFORMANCE_DATA
|
||||||
};
|
};
|
||||||
|
|
||||||
|
build_plugin_table();
|
||||||
|
|
||||||
entry ent={0,};
|
entry ent={0,};
|
||||||
switch (which_token)
|
switch (which_token)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue