Language detection works for primary only again. It was broken since 1.14, heh
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2621 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
7144cb0f97
commit
6d9d1cc82d
3 changed files with 9 additions and 9 deletions
|
@ -763,7 +763,7 @@ int CEXEBuild::section_add_install_type(int inst_type)
|
|||
ERROR_MSG("Error: can't modify flags when no section is open\n");
|
||||
return PS_ERROR;
|
||||
}
|
||||
if (build_cursection->install_types == ~(int)0)
|
||||
if (build_cursection->install_types == ~0)
|
||||
build_cursection->install_types = 0;
|
||||
build_cursection->install_types|=inst_type;
|
||||
return PS_OK;
|
||||
|
@ -858,7 +858,7 @@ int CEXEBuild::add_section(const char *secname, const char *defname, int expand/
|
|||
build_cursection->code=cur_entries->getlen()/sizeof(entry);
|
||||
build_cursection->code_size=0;
|
||||
build_cursection->size_kb=0;
|
||||
build_cursection->install_types=*name?0:~(int)0;
|
||||
build_cursection->install_types=*name?0:~0;
|
||||
|
||||
if (secname[0]=='-')
|
||||
{
|
||||
|
|
|
@ -142,7 +142,7 @@ void NSISCALL build_g_logfile()
|
|||
static void NSISCALL set_language()
|
||||
{
|
||||
int i;
|
||||
LANGID lang_mask=~(LANGID)0;
|
||||
LANGID lang_mask=(LANGID)~0;
|
||||
LANGID lang=myatoi(state_language);
|
||||
char *language_table=0;
|
||||
int lang_num=g_inst_cmnheader->language_tables_num;
|
||||
|
@ -157,7 +157,7 @@ lang_again:
|
|||
}
|
||||
}
|
||||
if (i == lang_num) {
|
||||
if (lang_mask == ~(LANGID)0)
|
||||
if (lang_mask == (LANGID)~0)
|
||||
lang_mask=0x3ff; // primary lang
|
||||
else // we already tried once and we still don't have a language table
|
||||
lang_mask=0; // first lang
|
||||
|
|
|
@ -1312,13 +1312,13 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
|
|||
}
|
||||
build_header.install_directory_ptr = add_string_main(p);
|
||||
build_header.install_directory_auto_append = 0;
|
||||
if (*p && p[strlen(p)-1] != '\\')
|
||||
if (*p && *CharPrev(p, p + strlen(p)) != '\\')
|
||||
{
|
||||
p = build_strlist.get() + build_header.install_directory_ptr;
|
||||
char *p2 = strrchr(p, '\\');
|
||||
char *p2 = p + strlen(p);
|
||||
while (p2 >= p && *CharPrev(p, p2) != '\\') p2--;;
|
||||
if (p2)
|
||||
{
|
||||
p2++;
|
||||
build_header.install_directory_auto_append = build_header.install_directory_ptr + (p2 - p);
|
||||
}
|
||||
}
|
||||
|
@ -3382,7 +3382,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
|
|||
if (process_jump(line,1,&ent.offsets[0]) ||
|
||||
process_jump(line,2,&ent.offsets[1])) PRINTHELP()
|
||||
ent.offsets[2]=FLAG_OFFSET(abort);
|
||||
ent.offsets[3]=(int)~0;//new value mask - keep flag
|
||||
ent.offsets[3]=~0;//new value mask - keep flag
|
||||
SCRIPT_MSG("IfAbort ?%s:%s\n",line.gettoken_str(1),line.gettoken_str(2));
|
||||
return add_entry(&ent);
|
||||
case TOK_CLEARERRORS:
|
||||
|
@ -4127,7 +4127,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
|
|||
if (process_jump(line,1,&ent.offsets[0]) ||
|
||||
process_jump(line,2,&ent.offsets[1])) PRINTHELP()
|
||||
ent.offsets[2]=FLAG_OFFSET(exec_reboot);
|
||||
ent.offsets[3]=(int)~0;//new value mask - keep flag
|
||||
ent.offsets[3]=~0;//new value mask - keep flag
|
||||
SCRIPT_MSG("IfRebootFlag ?%s:%s\n",line.gettoken_str(1),line.gettoken_str(2));
|
||||
return add_entry(&ent);
|
||||
case TOK_SETREBOOTFLAG:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue