- Fixed bug #844989 - multiple uninstaller subsections problems
- Removed "(CVS)" from version number git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3168 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
7fe6a9959d
commit
79a298aee3
4 changed files with 41 additions and 29 deletions
|
@ -1165,7 +1165,12 @@ int CEXEBuild::add_section(const char *secname, const char *defname, int expand/
|
|||
set_uninstall_mode(1);
|
||||
}
|
||||
|
||||
if (subsection_open_cnt && !(new_section.flags & SF_SUBSECEND))
|
||||
if ((new_section.flags & SF_SUBSECEND) && subsection_open_cnt && old_uninstall_mode)
|
||||
{
|
||||
set_uninstall_mode(1);
|
||||
}
|
||||
|
||||
if (subsection_open_cnt)
|
||||
{
|
||||
if (uninstall_mode != old_uninstall_mode)
|
||||
{
|
||||
|
@ -1182,28 +1187,6 @@ int CEXEBuild::add_section(const char *secname, const char *defname, int expand/
|
|||
cur_sections->add(&new_section, sizeof(section));
|
||||
build_cursection = (section *) cur_sections->get() + cur_header->blocks[NB_SECTIONS].num;
|
||||
|
||||
if (new_section.flags & (SF_SUBSEC | SF_SUBSECEND))
|
||||
{
|
||||
if (new_section.flags & SF_SUBSECEND)
|
||||
{
|
||||
subsection_open_cnt--;
|
||||
if (subsection_open_cnt < 0)
|
||||
{
|
||||
ERROR_MSG("SubSectionEnd: no SubSections are open\n");
|
||||
return PS_ERROR;
|
||||
}
|
||||
if (!subsection_open_cnt)
|
||||
set_uninstall_mode(0);
|
||||
}
|
||||
else
|
||||
subsection_open_cnt++;
|
||||
|
||||
add_entry_direct(EW_RET);
|
||||
build_cursection->code_size = 0;
|
||||
|
||||
build_cursection = 0;
|
||||
}
|
||||
|
||||
if (defname[0])
|
||||
{
|
||||
char buf[32];
|
||||
|
@ -1217,6 +1200,30 @@ int CEXEBuild::add_section(const char *secname, const char *defname, int expand/
|
|||
|
||||
cur_header->blocks[NB_SECTIONS].num++;
|
||||
|
||||
if (new_section.flags & (SF_SUBSEC | SF_SUBSECEND))
|
||||
{
|
||||
add_entry_direct(EW_RET);
|
||||
build_cursection->code_size = 0;
|
||||
|
||||
build_cursection = 0;
|
||||
|
||||
if (new_section.flags & SF_SUBSECEND)
|
||||
{
|
||||
subsection_open_cnt--;
|
||||
if (subsection_open_cnt < 0)
|
||||
{
|
||||
ERROR_MSG("SubSectionEnd: no SubSections are open\n");
|
||||
return PS_ERROR;
|
||||
}
|
||||
if (!subsection_open_cnt)
|
||||
{
|
||||
set_uninstall_mode(0);
|
||||
}
|
||||
}
|
||||
else
|
||||
subsection_open_cnt++;
|
||||
}
|
||||
|
||||
return PS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const char *NSIS_VERSION="v2.0b4 (CVS)";
|
||||
const char *NSIS_VERSION="v2.0b4";
|
||||
|
||||
/*
|
||||
Nullsoft Scriptable Install System (NSIS)
|
||||
|
|
|
@ -1934,7 +1934,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
|
|||
if (k == -1) PRINTHELP()
|
||||
SCRIPT_MSG("XPStyle: %s\n", line.gettoken_str(1));
|
||||
init_res_editor();
|
||||
char* szXPManifest = k ? 0 : "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><assembly xmlns=\"urn:schemas-microsoft-com:asm.v1\" manifestVersion=\"1.0\"><assemblyIdentity version=\"1.0.0.0\" processorArchitecture=\"X86\" name=\"Nullsoft.NSIS.exehead\" type=\"win32\"/><description>Nullsoft Install System v2.0b4 (CVS)</description><dependency><dependentAssembly><assemblyIdentity type=\"win32\" name=\"Microsoft.Windows.Common-Controls\" version=\"6.0.0.0\" processorArchitecture=\"X86\" publicKeyToken=\"6595b64144ccf1df\" language=\"*\" /></dependentAssembly></dependency></assembly>";
|
||||
char* szXPManifest = k ? 0 : "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><assembly xmlns=\"urn:schemas-microsoft-com:asm.v1\" manifestVersion=\"1.0\"><assemblyIdentity version=\"1.0.0.0\" processorArchitecture=\"X86\" name=\"Nullsoft.NSIS.exehead\" type=\"win32\"/><description>Nullsoft Install System v2.0b4</description><dependency><dependentAssembly><assemblyIdentity type=\"win32\" name=\"Microsoft.Windows.Common-Controls\" version=\"6.0.0.0\" processorArchitecture=\"X86\" publicKeyToken=\"6595b64144ccf1df\" language=\"*\" /></dependentAssembly></dependency></assembly>";
|
||||
res_editor->UpdateResource(MAKEINTRESOURCE(24), MAKEINTRESOURCE(1), MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), (unsigned char*)szXPManifest, k ? 0 : lstrlen(szXPManifest));
|
||||
}
|
||||
catch (exception& err) {
|
||||
|
@ -2667,7 +2667,12 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
|
|||
a++;
|
||||
}
|
||||
wsprintf(buf,"-%s",line.gettoken_str(a));
|
||||
if (which_token == TOK_SUBSECTION && !line.gettoken_str(a)[0]) PRINTHELP()
|
||||
if (which_token == TOK_SUBSECTION)
|
||||
{
|
||||
char *s = line.gettoken_str(a);
|
||||
if (!s[0] || (!strcmpi(s, "un.") && !s[3]))
|
||||
PRINTHELP();
|
||||
}
|
||||
|
||||
SCRIPT_MSG("%s %s",line.gettoken_str(0),line.gettoken_str(a));
|
||||
if (line.gettoken_str(a+1)[0]) SCRIPT_MSG(" ->(%s)",line.gettoken_str(a+1));
|
||||
|
|
|
@ -91,7 +91,7 @@ static tokenType tokenlist[TOK__LAST] =
|
|||
{TOK_INSTCOLORS,"InstallColors",1,1,"(/windows | (foreground_color background_color))"},
|
||||
{TOK_INSTDIR,"InstallDir",1,0,"default_install_directory"},
|
||||
{TOK_INSTPROGRESSFLAGS,"InstProgressFlags",0,-1,"[flag [...]]\n flag={smooth|colored}"},
|
||||
{TOK_INSTTYPE,"InstType",1,0,"install_type_name | /NOCUSTOM | /CUSTOMSTRING=str | /COMPONENTSONLYONCUSTOM"},
|
||||
{TOK_INSTTYPE,"InstType",1,0,"[un.]install_type_name | /NOCUSTOM | /CUSTOMSTRING=str | /COMPONENTSONLYONCUSTOM"},
|
||||
{TOK_INTOP,"IntOp",3,1,"$(user_var: result) val1 OP [val2]\n OP=(+ - * / % | & ^ ~ ! || &&)"},
|
||||
{TOK_INTCMP,"IntCmp",3,2,"val1 val2 jump_if_equal [jump_if_val1_less] [jump_if_val1_more]"},
|
||||
{TOK_INTCMPU,"IntCmpU",3,2,"val1 val2 jump_if_equal [jump_if_val1_less] [jump_if_val1_more]"},
|
||||
|
@ -133,10 +133,10 @@ static tokenType tokenlist[TOK__LAST] =
|
|||
{TOK_RENAME,"Rename",2,1,"[/REBOOTOK] source_file destination_file"},
|
||||
{TOK_RET,"Return",0,0,""},
|
||||
{TOK_RMDIR,"RMDir",1,1,"[/r|/REBOOTOK] directory_name"},
|
||||
{TOK_SECTION,"Section",0,3,"[/0] [section_name|-section_name] [section index output]"},
|
||||
{TOK_SECTION,"Section",0,3,"[/0] [-][un.][section_name] [section index output]"},
|
||||
{TOK_SECTIONEND,"SectionEnd",0,0,""},
|
||||
{TOK_SECTIONIN,"SectionIn",1,-1,"InstTypeIdx [InstTypeIdx [...]]"},
|
||||
{TOK_SUBSECTION,"SubSection",1,2,"[/e] subsection_name [section index output]"},
|
||||
{TOK_SUBSECTION,"SubSection",1,2,"[/e] [un.]subsection_name [section index output]"},
|
||||
{TOK_SUBSECTIONEND,"SubSectionEnd",0,0,""},
|
||||
{TOK_SEARCHPATH,"SearchPath",2,0,"$(user_var: result) filename"},
|
||||
{TOK_SECTIONSETFLAGS,"SectionSetFlags",2,0,"section_index flags"},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue