diff --git a/Source/build.cpp b/Source/build.cpp index 56757b37..84f2b43d 100644 --- a/Source/build.cpp +++ b/Source/build.cpp @@ -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; diff --git a/Source/exehead/exec.c b/Source/exehead/exec.c index 8174a56e..b5a88fd2 100644 --- a/Source/exehead/exec.c +++ b/Source/exehead/exec.c @@ -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); diff --git a/Source/script.cpp b/Source/script.cpp index 73028fed..9de036c3 100644 --- a/Source/script.cpp +++ b/Source/script.cpp @@ -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;