Next button text is now always added when needed, instfiles dialog is destroyed when needed.
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1832 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
1aeb327658
commit
1a865438f0
4 changed files with 27 additions and 18 deletions
|
@ -1171,16 +1171,6 @@ int CEXEBuild::write_output(void)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
|
||||
// Added by Amir Szekely 9th August 2002
|
||||
int err=add_plugins_dir_initializer();
|
||||
if (err != PS_OK)
|
||||
return err;
|
||||
#endif //NSIS_CONFIG_PLUGIN_SUPPORT
|
||||
|
||||
// Added by Amir Szekely 3rd August 2002
|
||||
if (WriteStringTables() == PS_ERROR) return PS_ERROR;
|
||||
|
||||
if (!build_entries.getlen())
|
||||
{
|
||||
ERROR_MSG("Error: invalid script: no entries specified\n");
|
||||
|
@ -1206,6 +1196,13 @@ int CEXEBuild::write_output(void)
|
|||
return 1;
|
||||
}
|
||||
|
||||
#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
|
||||
// Added by Amir Szekely 9th August 2002
|
||||
int err=add_plugins_dir_initializer();
|
||||
if (err != PS_OK)
|
||||
return err;
|
||||
#endif //NSIS_CONFIG_PLUGIN_SUPPORT
|
||||
|
||||
#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
|
||||
if (ubuild_entries.getlen())
|
||||
{
|
||||
|
@ -1374,8 +1371,10 @@ int CEXEBuild::write_output(void)
|
|||
|
||||
p->next=LANG_BTN_NEXT;
|
||||
|
||||
if (i<build_header.common.num_pages-1 && (p+1)->id==NSIS_PAGE_INSTFILES)
|
||||
if (i<build_header.common.num_pages-1 && (p+1)->id==NSIS_PAGE_INSTFILES) {
|
||||
p->next=LANG_BTN_INSTALL;
|
||||
install_used = true;
|
||||
}
|
||||
#ifdef NSIS_CONFIG_LICENSEPAGE
|
||||
if (p->id==NSIS_PAGE_LICENSE)
|
||||
p->next=LANG_BTN_LICENSE;
|
||||
|
@ -1384,6 +1383,8 @@ int CEXEBuild::write_output(void)
|
|||
p->back&=~2;
|
||||
if (i && (p-1)->id==NSIS_PAGE_COMPLETED)
|
||||
p->back&=~2;
|
||||
|
||||
if (p->next == LANG_BTN_NEXT) next_used = true;
|
||||
}
|
||||
(--p)->next=LANG_BTN_CLOSE;
|
||||
if (p->id==NSIS_PAGE_COMPLETED) (--p)->next=LANG_BTN_CLOSE;
|
||||
|
@ -1458,6 +1459,8 @@ int CEXEBuild::write_output(void)
|
|||
}
|
||||
if (p->id==NSIS_PAGE_INSTFILES || p->id==NSIS_PAGE_COMPLETED)
|
||||
p->back=noinstlogback?0:SW_SHOWNA;
|
||||
|
||||
if (p->next == LANG_BTN_NEXT) next_used = true;
|
||||
}
|
||||
(--p)->next=LANG_BTN_CLOSE;
|
||||
if (p->id==NSIS_PAGE_COMPLETED) (--p)->next=LANG_BTN_CLOSE;
|
||||
|
@ -1519,6 +1522,9 @@ int CEXEBuild::write_output(void)
|
|||
return PS_ERROR;
|
||||
}
|
||||
|
||||
// Generate language tables
|
||||
if (WriteStringTables() == PS_ERROR) return PS_ERROR;
|
||||
|
||||
// Pack exe header if asked for
|
||||
if (build_packname[0] && build_packcmd[0])
|
||||
{
|
||||
|
|
|
@ -149,6 +149,8 @@ class CEXEBuild {
|
|||
#define IsSet(s,lang) _IsSet(string_tables.size()?&(string_tables[0]->s):0,lang)
|
||||
bool _IsSet(int *str, LANGID lang); // Checks if a string is set in a given string table
|
||||
|
||||
bool next_used, install_used;
|
||||
|
||||
// a whole bunch O data.
|
||||
|
||||
// Added by Amir Szekely 31st July 2002
|
||||
|
|
|
@ -537,7 +537,10 @@ nextPage:
|
|||
EnableWindow(m_hwndOK,1);
|
||||
|
||||
if (this_page->id!=NSIS_PAGE_COMPLETED) DestroyWindow(m_curwnd);
|
||||
else if (g_autoclose) goto nextPage;
|
||||
else {
|
||||
if (g_autoclose) goto nextPage;
|
||||
return 0;
|
||||
}
|
||||
|
||||
mystrcpy(g_tmp,g_caption);
|
||||
process_string_fromtab(g_tmp+mystrlen(g_tmp),this_page->caption);
|
||||
|
|
|
@ -399,14 +399,12 @@ void CEXEBuild::FillDefaultsIfNeeded(StringTable *table, NLF *nlf/*=0*/) {
|
|||
{
|
||||
if (!table->installer.spacerequired && !no_space_texts) table->installer.spacerequired=add_string_main(str(NLF_SPACE_REQ),0);
|
||||
}
|
||||
if (table->installer.text
|
||||
#ifdef NSIS_CONFIG_COMPONENTPAGE
|
||||
|| table->installer.componenttext
|
||||
#endif
|
||||
|| build_custom_used || ubuild_custom_used
|
||||
)
|
||||
if (next_used)
|
||||
{
|
||||
if (!table->common.nextbutton) table->common.nextbutton=add_string_main(str(NLF_BTN_NEXT),0);
|
||||
}
|
||||
if (install_used)
|
||||
{
|
||||
if (!table->installer.installbutton) table->installer.installbutton=add_string_main(str(NLF_BTN_INSTALL),0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue