Skip to content

Commit

Permalink
Removed some debug outputs + cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
lordmulder committed Nov 16, 2015
1 parent 30b3be9 commit 132c9ea
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
9 changes: 0 additions & 9 deletions Contrib/StdUtils/src/InvokeShellVerb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,6 @@ static bool MyInvokeShellVerb_LoadResStr(const WCHAR *const libFile, const DWORD
hMod = NULL;
}

if(success)
{
MessageBoxW(NULL, buffer, L"LoadResStr", MB_TOPMOST | MB_TASKMODAL);
}
else
{
MessageBoxW(NULL, L"<NOT FOUND>", L"LoadResStr", MB_TOPMOST | MB_TASKMODAL);
}

return success;
}

Expand Down
4 changes: 2 additions & 2 deletions Contrib/StdUtils/src/Resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
// VERSION
#define DLL_VERSION_MAJ_LO 1
#define DLL_VERSION_MIN_HI 0
#define DLL_VERSION_MIN_LO 8
#define DLL_VERSION_PATCHL 2
#define DLL_VERSION_MIN_LO 9
#define DLL_VERSION_PATCHL 0

// VERSION STRING
#define DLL_VERSION_STR_F1(X) #X
Expand Down
8 changes: 8 additions & 0 deletions Contrib/StdUtils/src/StdUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,10 @@ NSISFUNC(InvokeShellVerb)

if(!(file && path))
{
if(g_bStdUtilsVerbose)
{
MessageBox(NULL, T("Specified file name and/or path is missing!"), T("StdUtils::InvokeShellVerb"), MB_TOPMOST | MB_ICONSTOP);
}
pushstring(T("einval"));
if(file) delete [] file;
if(path) delete [] path;
Expand All @@ -750,6 +754,10 @@ NSISFUNC(InvokeShellVerb)

if((verb < 0) || (verb > 3))
{
if(g_bStdUtilsVerbose)
{
MessageBox(NULL, T("And invalid verb id has been specified!"), T("StdUtils::InvokeShellVerb"), MB_TOPMOST | MB_ICONSTOP);
}
pushstring(T("einval"));
if(file) delete [] file;
if(path) delete [] path;
Expand Down
7 changes: 4 additions & 3 deletions Docs/StdUtils/StdUtils.html
Original file line number Diff line number Diff line change
Expand Up @@ -622,8 +622,8 @@ <h1><u>StdUtils - Swiss Army Knife for NSIS</u></h1>
<a name="d452a779"></a><h2>InvokeShellVerb</h2>

<p><b><tt>${StdUtils.InvokeShellVerb} <i>user_var(output)</i> <i>path</i> <i>file</i> <i>verb_id</i></tt></b></p>
<p>The <tt>${StdUtils.InvokeShellVerb}</tt> function can be used to invoke a so-called "Shell Verb" on an arbitary item. The most common use for this is pinning (or unpinning) an item to (from) the Taskbar or the Startmenu on Windows 7 and later. The function expects three arguments: The directory where the item (e.g. executable file or shortcut) is located, the file name of the item and the <i>id</i> of the shell verb to be invoked. We need the <i>id</i> of the verb, because the verb's name (string), which is used to select the desired verb from the list of available verbs, is <i>language-specific</i>; it depends on the Windows system language. However, we certainly do <b>not</b> want to adjust our installer for each system language. Resource id's, on the other hand, are <i>language-independant</i>. By using resource id's, we can load the actual verb name (string) at runtime. Note that while this function works on Windows 7 (and later) only, it still is perfectly safe to call on older versions of Windows. If the function succeeded, then it returns "ok"; if the function is called with invalid parameters, then it returns "einval"; if the requested verb was not found for the specified item, or if the specified item does <i>not</i> exist, then "not_found" will be returned; if this function is used on Windows versions prior to Windows 7 (e.g. Vista or XP), then it will return "unsupported"; and if the function failed for another reason (e.g. file not found or invalid <i>verb_id</i>), then it will return "error".</p>
<p>Available shell verbs are:</p>
<p>The <tt>${StdUtils.InvokeShellVerb}</tt> function can be used to invoke a so-called "Shell Verb" on an arbitary item. The most common use for this is (un)pinning an item to/from the Taskbar or the Startmenu, on Windows 7 and later. The function expects three arguments: The directory where the item (e.g. executable file or shortcut) is located, the name of the item, and the <i>id</i> of the shell verb to be invoked. We need the <i>id</i> of the verb, because the verb's name (string), which is used to select the desired verb from the list of available verbs, is <i>language-specific</i>; it depends on the Windows system language. However, we certainly do <b>not</b> want to make our installer specific to a certain system language. Resource id's, on the other hand, are <i>language-independant</i>. By using resource id's, we can load the actual verb name (string) <i>at runtime</i>. Note that while this function works on Windows 7 (and later) only, it still is perfectly safe to call on older versions of Windows. If the function succeeded, then it returns "ok"; if the function is called with invalid parameters, then it returns "einval"; if the requested verb could <i>not</i> be found, if the request verb is unavailable for the specified item, or if the specified item does <i>not</i> exist, then "not_found" will be returned; if this function is used on Windows versions prior to Windows 7 (e.g. Vista or XP), then it will return "unsupported"; and if the function failed for another reason, then it will return "error".</p>
<p>Supported shell verbs IDs are:</p>
<ul>
<li><tt>${StdUtils.Const.ShellVerb.PinToTaskbar}</tt>
<li><tt>${StdUtils.Const.ShellVerb.UnpinFromTaskbar}</tt>
Expand Down Expand Up @@ -1028,9 +1028,10 @@ <h1><u>StdUtils - Swiss Army Knife for NSIS</u></h1>
<a name="53c38996"></a><h1>Version History</h1>

<ul>
<li><b>Version 1.09, not released yet</b>
<li><b>Version 1.09, 2015-11-16</b>
<ul>
<li>Modified the <tt>InvokeShellVerb</tt> function in order to make Startmenu pinning work on Windows 10.
<li>Silently ignore unknown NSIS callback message values.
</ul>
<br>
<li><b>Version 1.08, released 2015-10-10</b>
Expand Down
Binary file modified Plugins/Release_ANSI/StdUtils.dll
Binary file not shown.
Binary file modified Plugins/Release_Tiny/StdUtils.dll
Binary file not shown.
Binary file modified Plugins/Release_Unicode/StdUtils.dll
Binary file not shown.

0 comments on commit 132c9ea

Please sign in to comment.