Unprocessed strings (such as InstType) can now use LangString/$(name) too. No more "skipped" messages before plugins.
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1253 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
2fd3bfbe9d
commit
2c96636160
3 changed files with 26 additions and 5 deletions
|
@ -396,7 +396,6 @@ int CEXEBuild::preprocess_string(char *out, const char *in)
|
|||
int CEXEBuild::add_string_main(const char *string, int process) // returns offset (in string block)
|
||||
{
|
||||
if (!*string) return 0;
|
||||
if (!process) return build_strlist.add(string,2);
|
||||
|
||||
if (*string == '$' && *(string+1) == '(') {
|
||||
int idx = -1;
|
||||
|
@ -410,6 +409,8 @@ int CEXEBuild::add_string_main(const char *string, int process) // returns offse
|
|||
if (idx >= 0) return -(idx+1+(sizeof(common_strings)+sizeof(installer_strings))/sizeof(int));
|
||||
}
|
||||
|
||||
if (!process) return build_strlist.add(string,2);
|
||||
|
||||
char buf[4096];
|
||||
preprocess_string(buf,string);
|
||||
return build_strlist.add(buf,2);
|
||||
|
@ -418,7 +419,6 @@ int CEXEBuild::add_string_main(const char *string, int process) // returns offse
|
|||
int CEXEBuild::add_string_uninst(const char *string, int process) // returns offset (in string block)
|
||||
{
|
||||
if (!*string) return 0;
|
||||
if (!process) return ubuild_strlist.add(string,2);
|
||||
|
||||
if (*string == '$' && *(string+1) == '(') {
|
||||
int idx = -1;
|
||||
|
@ -432,6 +432,8 @@ int CEXEBuild::add_string_uninst(const char *string, int process) // returns off
|
|||
if (idx >= 0) return -(idx+1+(sizeof(common_strings)+sizeof(uninstall_strings))/sizeof(int));
|
||||
}
|
||||
|
||||
if (!process) return ubuild_strlist.add(string,2);
|
||||
|
||||
char buf[4096];
|
||||
preprocess_string(buf,string);
|
||||
return ubuild_strlist.add(buf,2);
|
||||
|
@ -1925,6 +1927,12 @@ int CEXEBuild::add_plugins_dir_initializer(void)
|
|||
ret=add_function("Initialize_____Plugins");
|
||||
if (ret != PS_OK) return ret;
|
||||
again:
|
||||
// SetDetailsPrint none
|
||||
ent.which=EW_UPDATETEXT;
|
||||
ent.offsets[1]=4; // none
|
||||
ret=add_entry(&ent);
|
||||
if (ret != PS_OK) return ret;
|
||||
|
||||
zero_offset=add_string("$0");
|
||||
// StrCmp $PLUGINSDIR ""
|
||||
ent.which=EW_STRCMP;
|
||||
|
|
|
@ -184,7 +184,14 @@ static int NSISCALL ExecuteEntry(entry *entry_)
|
|||
return ExecuteCodeSegment(v,NULL);
|
||||
}
|
||||
case EW_UPDATETEXT:
|
||||
if (parm1) ui_st_updateflag=parm1;
|
||||
if (parm1) {
|
||||
static int old_st_updateflag=3;
|
||||
if (parm1&8) ui_st_updateflag=old_st_updateflag;
|
||||
else {
|
||||
old_st_updateflag=ui_st_updateflag;
|
||||
ui_st_updateflag=parm1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
char *buf3=process_string_fromparm_tobuf(0x30);
|
||||
|
|
|
@ -2613,9 +2613,9 @@ int CEXEBuild::doCommand(int which_token, LineParser &line, FILE *fp, const char
|
|||
case TOK_SETDETAILSPRINT:
|
||||
ent.which=EW_UPDATETEXT;
|
||||
ent.offsets[0] = 0;
|
||||
ent.offsets[1] = line.gettoken_enum(1,"none\0listonly\0textonly\0both\0");
|
||||
ent.offsets[1] = line.gettoken_enum(1,"lastused\0listonly\0textonly\0both\0none\0");
|
||||
if (ent.offsets[1] < 0) PRINTHELP()
|
||||
if (!ent.offsets[1]) ent.offsets[1]=4;
|
||||
if (!ent.offsets[1]) ent.offsets[1]=8;
|
||||
SCRIPT_MSG("SetDetailsPrint: %s\n",line.gettoken_str(1));
|
||||
return add_entry(&ent);
|
||||
case TOK_SETAUTOCLOSE:
|
||||
|
@ -3554,6 +3554,12 @@ int CEXEBuild::doCommand(int which_token, LineParser &line, FILE *fp, const char
|
|||
if (ret != PS_OK) return ret;
|
||||
build_overwrite=old_build_overwrite;
|
||||
|
||||
// SetDetailsPrint lastused
|
||||
ent.which=EW_UPDATETEXT;
|
||||
ent.offsets[1]=8; // lastused
|
||||
ret=add_entry(&ent);
|
||||
if (ret != PS_OK) return ret;
|
||||
|
||||
// Call the DLL
|
||||
char* command = strstr(line.gettoken_str(0),"::");
|
||||
if (command) command += 2;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue