size optimization - use GetStringFromParm instead of wsprintf
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5191 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
9d8874cd72
commit
05ddf4bfc7
2 changed files with 5 additions and 1 deletions
|
@ -842,7 +842,7 @@ static int NSISCALL ExecuteEntry(entry *entry_)
|
|||
char *buf0=GetStringFromParm(0x00);
|
||||
char *buf3=GetStringFromParm(0x31);
|
||||
char *buf2=GetStringFromParm(0x22);
|
||||
wsprintf(buf1,"%s %s",buf0,buf3);
|
||||
char *buf1=GetStringFromParm(0x15);
|
||||
update_status_text_buf1(LANG_EXECSHELL);
|
||||
x=(int)ShellExecute(g_hwnd,buf0[0]?buf0:NULL,buf3,buf2[0]?buf2:NULL,state_output_directory,parm3);
|
||||
if (x < 33)
|
||||
|
|
|
@ -3684,6 +3684,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
|
|||
#endif//!NSIS_SUPPORT_EXECUTE
|
||||
case TOK_EXECSHELL: // this uses improvements of Andras Varga
|
||||
#ifdef NSIS_SUPPORT_SHELLEXECUTE
|
||||
{
|
||||
ent.which=EW_SHELLEXEC;
|
||||
ent.offsets[0]=add_string(line.gettoken_str(1));
|
||||
ent.offsets[1]=add_string(line.gettoken_str(2));
|
||||
|
@ -3696,10 +3697,13 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
|
|||
if (a < 0) PRINTHELP()
|
||||
ent.offsets[3]=tab[a];
|
||||
}
|
||||
string detail=string(line.gettoken_str(1))+" "+string(line.gettoken_str(2));
|
||||
ent.offsets[5]=add_string(detail.c_str());
|
||||
SCRIPT_MSG("ExecShell: %s: \"%s\" \"%s\" %s\n",line.gettoken_str(1),line.gettoken_str(2),
|
||||
line.gettoken_str(3),line.gettoken_str(4));
|
||||
|
||||
DefineInnerLangString(NLF_EXEC_SHELL);
|
||||
}
|
||||
return add_entry(&ent);
|
||||
#else//!NSIS_SUPPORT_SHELLEXECUTE
|
||||
ERROR_MSG("Error: %s specified, NSIS_SUPPORT_SHELLEXECUTE not defined.\n", line.gettoken_str(0));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue