diff --git a/Contrib/StartMenu/Example.nsi b/Contrib/StartMenu/Example.nsi index 9a9a82e7..c5c9d04b 100644 --- a/Contrib/StartMenu/Example.nsi +++ b/Contrib/StartMenu/Example.nsi @@ -40,11 +40,11 @@ Section StrCmp $R1 ">" skip CreateDirectory $SMPROGRAMS\$R0 - CreateShortCut $SMPROGRAMS\$R0\MakeNSISw.lnk $INSTDIR\makensisw.exe + CreateShortcut $SMPROGRAMS\$R0\MakeNSISw.lnk $INSTDIR\makensisw.exe SetShellVarContext All CreateDirectory $SMPROGRAMS\$R0 - CreateShortCut "$SMPROGRAMS\$R0\All users MakeNSISw.lnk" $INSTDIR\makensisw.exe + CreateShortcut "$SMPROGRAMS\$R0\All users MakeNSISw.lnk" $INSTDIR\makensisw.exe skip: SectionEnd \ No newline at end of file diff --git a/Docs/src/generalpurpose.but b/Docs/src/generalpurpose.but index 1d42f7a7..5e39719b 100644 --- a/Docs/src/generalpurpose.but +++ b/Docs/src/generalpurpose.but @@ -33,7 +33,7 @@ You should always specify an absolute path. \c CreateDirectory $INSTDIR\some\directory -\S2{createshortcut} CreateShortCut +\S2{createshortcut} CreateShortcut \c [/NoWorkingDir] link.lnk target.file [parameters [icon.file [icon_index_number [start_options [keyboard_shortcut [description]]]]]] @@ -45,7 +45,7 @@ description should be the description of the shortcut, or comment as it is calle The error flag is set if the shortcut cannot be created (i.e. either of the paths (link or target) does not exist, or some other error). \c CreateDirectory "$SMPROGRAMS\My Company" -\c CreateShortCut "$SMPROGRAMS\My Company\My Program.lnk" "$INSTDIR\My Program.exe" \ +\c CreateShortcut "$SMPROGRAMS\My Company\My Program.lnk" "$INSTDIR\My Program.exe" \ \c "some command line parameters" "$INSTDIR\My Program.exe" 2 SW_SHOWNORMAL \ \c ALT|CONTROL|SHIFT|F5 "a description" diff --git a/Docs/src/script.but b/Docs/src/script.but index bcf80eed..d82eee3c 100644 --- a/Docs/src/script.but +++ b/Docs/src/script.but @@ -78,7 +78,7 @@ Variables start with $. User variables should be declared. To extend a command over multiple lines, use a backslash (\\) at the end of the line. The next line will effectively be concatenated to the end of it. For example: -\c CreateShortCut "$SMPROGRAMS\NSIS\ZIP2EXE project workspace.lnk" \ +\c CreateShortcut "$SMPROGRAMS\NSIS\ZIP2EXE project workspace.lnk" \ \c "$INSTDIR\source\zip2exe\zip2exe.dsw" \c \c MessageBox MB_YESNO|MB_ICONQUESTION \ diff --git a/Docs/src/var.but b/Docs/src/var.but index d9d239f7..26cd9114 100644 --- a/Docs/src/var.but +++ b/Docs/src/var.but @@ -103,7 +103,7 @@ The system temporary directory (usually \c{C:\\Windows\\Temp} but detected at ru \e{$STARTMENU} -The start menu folder (useful in adding start menu items using \R{createshortcut}{CreateShortCut}). The context of this constant (All Users or Current user) depends on the \R{setshellvarcontext}{SetShellVarContext} setting. The default is the current user. +The start menu folder (useful in adding start menu items using \R{createshortcut}{CreateShortcut}). The context of this constant (All Users or Current user) depends on the \R{setshellvarcontext}{SetShellVarContext} setting. The default is the current user. \e{$SMPROGRAMS} diff --git a/Examples/Modern UI/StartMenu.nsi b/Examples/Modern UI/StartMenu.nsi index 760f8acc..441fd656 100644 --- a/Examples/Modern UI/StartMenu.nsi +++ b/Examples/Modern UI/StartMenu.nsi @@ -76,7 +76,7 @@ Section "Dummy Section" SecDummy ;Create shortcuts CreateDirectory "$SMPROGRAMS\$StartMenuFolder" - CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\Uninstall.exe" + CreateShortcut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\Uninstall.exe" !insertmacro MUI_STARTMENU_WRITE_END diff --git a/Examples/bigtest.nsi b/Examples/bigtest.nsi index 62f5211c..473d1b49 100644 --- a/Examples/bigtest.nsi +++ b/Examples/bigtest.nsi @@ -138,7 +138,7 @@ SectionIn 1 4 3 SectionEnd -Section "Test CreateShortCut" +Section "Test CreateShortcut" SectionIn 1 2 3 @@ -238,10 +238,10 @@ Function "CSCTest" CreateDirectory "$SMPROGRAMS\Big NSIS Test" SetOutPath $INSTDIR ; for working directory - CreateShortCut "$SMPROGRAMS\Big NSIS Test\Uninstall BIG NSIS Test.lnk" "$INSTDIR\bt-uninst.exe" ; use defaults for parameters, icon, etc. + CreateShortcut "$SMPROGRAMS\Big NSIS Test\Uninstall BIG NSIS Test.lnk" "$INSTDIR\bt-uninst.exe" ; use defaults for parameters, icon, etc. ; this one will use notepad's icon, start it minimized, and give it a hotkey (of Ctrl+Shift+Q) - CreateShortCut "$SMPROGRAMS\Big NSIS Test\silent.nsi.lnk" "$INSTDIR\silent.nsi" "" "$WINDIR\notepad.exe" 0 SW_SHOWMINIMIZED CONTROL|SHIFT|Q - CreateShortCut "$SMPROGRAMS\Big NSIS Test\TheDir.lnk" "$INSTDIR\" "" "" 0 SW_SHOWMAXIMIZED CONTROL|SHIFT|Z + CreateShortcut "$SMPROGRAMS\Big NSIS Test\silent.nsi.lnk" "$INSTDIR\silent.nsi" "" "$WINDIR\notepad.exe" 0 SW_SHOWMINIMIZED CONTROL|SHIFT|Q + CreateShortcut "$SMPROGRAMS\Big NSIS Test\TheDir.lnk" "$INSTDIR\" "" "" 0 SW_SHOWMAXIMIZED CONTROL|SHIFT|Z FunctionEnd diff --git a/Examples/example2.nsi b/Examples/example2.nsi index 6798db1b..ebb31d79 100644 --- a/Examples/example2.nsi +++ b/Examples/example2.nsi @@ -63,8 +63,8 @@ SectionEnd Section "Start Menu Shortcuts" CreateDirectory "$SMPROGRAMS\Example2" - CreateShortCut "$SMPROGRAMS\Example2\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 - CreateShortCut "$SMPROGRAMS\Example2\Example2 (MakeNSISW).lnk" "$INSTDIR\example2.nsi" "" "$INSTDIR\example2.nsi" 0 + CreateShortcut "$SMPROGRAMS\Example2\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 + CreateShortcut "$SMPROGRAMS\Example2\Example2 (MakeNSISW).lnk" "$INSTDIR\example2.nsi" "" "$INSTDIR\example2.nsi" 0 SectionEnd diff --git a/Examples/makensis.nsi b/Examples/makensis.nsi index 9491278e..6c0aec71 100644 --- a/Examples/makensis.nsi +++ b/Examples/makensis.nsi @@ -347,10 +347,10 @@ ${MementoSection} "Desktop Shortcut" SecShortcuts SectionIn 1 2 SetOutPath $INSTDIR !ifndef NO_STARTMENUSHORTCUTS - CreateShortCut "$SMPROGRAMS\NSIS${NAMESUFFIX}.lnk" "$INSTDIR\NSIS.exe" + CreateShortcut "$SMPROGRAMS\NSIS${NAMESUFFIX}.lnk" "$INSTDIR\NSIS.exe" !endif - CreateShortCut "$DESKTOP\NSIS${NAMESUFFIX}.lnk" "$INSTDIR\NSIS.exe" + CreateShortcut "$DESKTOP\NSIS${NAMESUFFIX}.lnk" "$INSTDIR\NSIS.exe" ${MementoSectionEnd} diff --git a/SCons/config.py b/SCons/config.py index 8dc7b333..ec4559ee 100644 --- a/SCons/config.py +++ b/SCons/config.py @@ -242,7 +242,7 @@ cfg.Add( cfg.Add( BoolVariable( 'NSIS_SUPPORT_CREATESHORTCUT', - 'enables support for CreateShortCut.', + 'enables support for CreateShortcut.', 'yes' ) ) diff --git a/Source/exehead/exec.c b/Source/exehead/exec.c index 69786c2f..5dc763af 100644 --- a/Source/exehead/exec.c +++ b/Source/exehead/exec.c @@ -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, diff --git a/Source/exehead/fileform.h b/Source/exehead/fileform.h index 9b15e468..c8b92ee2 100644 --- a/Source/exehead/fileform.h +++ b/Source/exehead/fileform.h @@ -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 diff --git a/Source/script.cpp b/Source/script.cpp index 2c6b7dff..3569a95b 100644 --- a/Source/script.cpp +++ b/Source/script.cpp @@ -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)); diff --git a/Source/tokens.cpp b/Source/tokens.cpp index 91282ba4..5a2732da 100644 --- a/Source/tokens.cpp +++ b/Source/tokens.cpp @@ -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},