diff --git a/Source/build.cpp b/Source/build.cpp index 78a764a0..a4dae074 100644 --- a/Source/build.cpp +++ b/Source/build.cpp @@ -292,6 +292,9 @@ CEXEBuild::CEXEBuild() #ifdef NSIS_CONFIG_UNINSTALL_SUPPORT build_uninst.common.num_pages=0; #endif + + build_custom_used=0; + ubuild_custom_used=0; } int CEXEBuild::getcurdbsize() { return cur_datablock->getlen(); } diff --git a/Source/build.h b/Source/build.h index 13da0577..520b3796 100644 --- a/Source/build.h +++ b/Source/build.h @@ -204,6 +204,8 @@ class CEXEBuild { StringList build_userlangstrings, ubuild_userlangstrings; GrowBuf build_pages, ubuild_pages; + int build_custom_used, ubuild_custom_used; + MMapBuf build_datablock, ubuild_datablock; // use GrowBuf here instead of MMapBuf if you want IGrowBuf *cur_datablock; diff --git a/Source/lang.cpp b/Source/lang.cpp index 36d3781d..ea99e6ca 100644 --- a/Source/lang.cpp +++ b/Source/lang.cpp @@ -397,9 +397,15 @@ void CEXEBuild::FillDefaultsIfNeeded(StringTable *table, NLF *nlf/*=0*/) { #endif ) { - // Changed by Amir Szekely 22nd July 2002 - // Adds the ability to disable space texts 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 (!table->common.nextbutton) table->common.nextbutton=add_string_main(str(NLF_BTN_NEXT),0); if (!table->installer.installbutton) table->installer.installbutton=add_string_main(str(NLF_BTN_INSTALL),0); } diff --git a/Source/script.cpp b/Source/script.cpp index b2aec34e..ae465582 100644 --- a/Source/script.cpp +++ b/Source/script.cpp @@ -553,6 +553,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line, FILE *fp, const char switch (k) { case 0: p.id = NSIS_PAGE_CUSTOM; + build_custom_used++; break; case 1: #ifdef NSIS_CONFIG_LICENSEPAGE @@ -648,6 +649,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line, FILE *fp, const char switch (k) { case 0: p.id = NSIS_PAGE_CUSTOM; + ubuild_custom_used++; break; case 1: p.id = NSIS_PAGE_UNINST;