CreateShortCut > CreateShortcut

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6453 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2014-03-28 16:21:39 +00:00
parent 1e17d02ff7
commit da7d67e69d
13 changed files with 24 additions and 24 deletions

View file

@ -1056,7 +1056,7 @@ static int NSISCALL ExecuteEntry(entry *entry_)
if (!validpathspec(buf2))
GetStringFromParm(0x21);
log_printf8(_T("CreateShortCut: out: \"%s\", in: \"%s %s\", icon: %s,%d, sw=%d, hk=%d"),
log_printf8(_T("CreateShortcut: out: \"%s\", in: \"%s %s\", icon: %s,%d, sw=%d, hk=%d"),
buf1,buf2,buf0,buf3,parm4&0xff,(parm4&0xff00)>>8,parm4>>16);
hres = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER,

View file

@ -138,7 +138,7 @@ enum
#endif
#ifdef NSIS_SUPPORT_CREATESHORTCUT
EW_CREATESHORTCUT, // Make Shortcut: 5, [link file, target file, parameters, icon file, iconindex|show mode<<8|hotkey<<16]
EW_CREATESHORTCUT, // Make Shortcut: 5, [link file, target file, parameters, icon file, iconindex|show mode<<8|hotkey<<16|noworkingdir]
#endif
#ifdef NSIS_SUPPORT_COPYFILES

View file

@ -4395,7 +4395,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
{
if (line.getnumtokens() > 5 && *line.gettoken_str(5))
{
ERROR_MSG(_T("CreateShortCut: cannot interpret icon index\n"));
ERROR_MSG(_T("CreateShortcut: cannot interpret icon index\n"));
PRINTHELP()
}
ent.offsets[4]=0;
@ -4407,7 +4407,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
int a=line.gettoken_enum(6,_T("SW_SHOWNORMAL\0SW_SHOWMAXIMIZED\0SW_SHOWMINIMIZED\0"));
if (a < 0)
{
ERROR_MSG(_T("CreateShortCut: unknown show mode \"%") NPRIs _T("\"\n"),line.gettoken_str(6));
ERROR_MSG(_T("CreateShortcut: unknown show mode \"%") NPRIs _T("\"\n"),line.gettoken_str(6));
PRINTHELP()
}
ent.offsets[4] |= tab[a]<<8;
@ -4437,7 +4437,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
c=VK_F1-1+_ttoi(s+1);
if (_ttoi(s+1) < 1 || _ttoi(s+1) > 24)
{
warning_fl(_T("CreateShortCut: F-key \"%") NPRIs _T("\" out of range"),s);
warning_fl(_T("CreateShortcut: F-key \"%") NPRIs _T("\" out of range"),s);
}
}
else if (((s[0] >= _T('A') && s[0] <= _T('Z')) || (s[0] >= _T('0') && s[0] <= _T('9'))) && !s[1])
@ -4445,12 +4445,12 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
else
{
c=s[0];
warning_fl(_T("CreateShortCut: unrecognized hotkey \"%") NPRIs _T("\""),s);
warning_fl(_T("CreateShortcut: unrecognized hotkey \"%") NPRIs _T("\""),s);
}
ent.offsets[4] |= (c) << 16;
}
}
SCRIPT_MSG(_T("CreateShortCut: \"%") NPRIs _T("\"->\"%") NPRIs _T("\" %") NPRIs _T(" icon:%") NPRIs _T(",%d, showmode=0x%X, hotkey=0x%X, comment=%") NPRIs _T("\n"),
SCRIPT_MSG(_T("CreateShortcut: \"%") NPRIs _T("\"->\"%") NPRIs _T("\" %") NPRIs _T(" icon:%") NPRIs _T(",%d, showmode=0x%X, hotkey=0x%X, comment=%") NPRIs _T("\n"),
line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3),
line.gettoken_str(4),ent.offsets[4]&0xff,(ent.offsets[4]>>8)&0xff,ent.offsets[4]>>16,line.gettoken_str(8));

View file

@ -58,7 +58,7 @@ static tokenType tokenlist[TOK__LAST] =
{TOK_CRCCHECK,_T("CRCCheck"),1,0,_T("(on|force|off)"),TP_GLOBAL},
{TOK_CREATEDIR,_T("CreateDirectory"),1,0,_T("directory_name"),TP_CODE},
{TOK_CREATEFONT,_T("CreateFont"),2,5,_T("$(user_var: handle output) face_name [height weight /ITALIC /UNDERLINE /STRIKE]"),TP_CODE},
{TOK_CREATESHORTCUT,_T("CreateShortCut"),2,6,_T("[/NoWorkingDir] shortcut_name.lnk shortcut_target [parameters [icon_file [icon index [showmode [hotkey [comment]]]]]]\n showmode=(SW_SHOWNORMAL|SW_SHOWMAXIMIZED|SW_SHOWMINIMIZED)\n hotkey=(ALT|CONTROL|EXT|SHIFT)|(F1-F24|A-Z)"),TP_CODE},
{TOK_CREATESHORTCUT,_T("CreateShortcut"),2,6,_T("[/NoWorkingDir] shortcut_name.lnk shortcut_target [parameters [icon_file [icon index [showmode [hotkey [comment]]]]]]\n showmode=(SW_SHOWNORMAL|SW_SHOWMAXIMIZED|SW_SHOWMINIMIZED)\n hotkey=(ALT|CONTROL|EXT|SHIFT)|(F1-F24|A-Z)"),TP_CODE},
{TOK_DBOPTIMIZE,_T("SetDatablockOptimize"),1,0,_T("(off|on)"),TP_ALL},
{TOK_DELETEINISEC,_T("DeleteINISec"),2,0,_T("ini_file section_name"),TP_CODE},
{TOK_DELETEINISTR,_T("DeleteINIStr"),3,0,_T("ini_file section_name entry_name"),TP_CODE},