Added CreateShortcut /NoWorkingDir optional parameter
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6452 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
a864703ce9
commit
1e17d02ff7
5 changed files with 13 additions and 7 deletions
|
@ -4381,13 +4381,15 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
|
|||
#endif//!NSIS_SUPPORT_MESSAGEBOX
|
||||
case TOK_CREATESHORTCUT:
|
||||
#ifdef NSIS_SUPPORT_CREATESHORTCUT
|
||||
{
|
||||
ent.which=EW_CREATESHORTCUT;
|
||||
int noLnkWorkDir=0, s;
|
||||
if (!_tcsicmp(line.gettoken_str(1),_T("/NoWorkingDir"))) line.eattoken(), noLnkWorkDir++;
|
||||
ent.offsets[0]=add_string(line.gettoken_str(1));
|
||||
ent.offsets[1]=add_string(line.gettoken_str(2));
|
||||
ent.offsets[2]=add_string(line.gettoken_str(3));
|
||||
ent.offsets[3]=add_string(line.gettoken_str(4));
|
||||
ent.offsets[5]=add_string(line.gettoken_str(8));
|
||||
int s;
|
||||
ent.offsets[4]=line.gettoken_int(5,&s)&0xff;
|
||||
if (!s)
|
||||
{
|
||||
|
@ -4398,6 +4400,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
|
|||
}
|
||||
ent.offsets[4]=0;
|
||||
}
|
||||
if (noLnkWorkDir) ent.offsets[4] |= 0x8000;
|
||||
if (line.getnumtokens() > 6 && *line.gettoken_str(6))
|
||||
{
|
||||
int tab[3]={SW_SHOWNORMAL,SW_SHOWMAXIMIZED,SW_SHOWMINNOACTIVE/*SW_SHOWMINIMIZED doesn't work*/};
|
||||
|
@ -4407,7 +4410,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
|
|||
ERROR_MSG(_T("CreateShortCut: unknown show mode \"%") NPRIs _T("\"\n"),line.gettoken_str(6));
|
||||
PRINTHELP()
|
||||
}
|
||||
ent.offsets[4]|=tab[a]<<8;
|
||||
ent.offsets[4] |= tab[a]<<8;
|
||||
}
|
||||
if (line.getnumtokens() > 7)
|
||||
{
|
||||
|
@ -4453,6 +4456,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
|
|||
|
||||
DefineInnerLangString(NLF_CREATE_SHORTCUT);
|
||||
DefineInnerLangString(NLF_ERR_CREATING_SHORTCUT);
|
||||
}
|
||||
return add_entry(&ent);
|
||||
#else//!NSIS_SUPPORT_CREATESHORTCUT
|
||||
ERROR_MSG(_T("Error: %") NPRIs _T(" specified, NSIS_SUPPORT_CREATESHORTCUT not defined.\n"), line.gettoken_str(0));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue