From c3ded0624184d725eaefba635f91f010619dd6da Mon Sep 17 00:00:00 2001 From: Mahmoud Al-Qudsi Date: Wed, 11 Mar 2020 16:54:48 -0500 Subject: [PATCH] Add version table and --help support --- paste/Resource.rc | 100 ++++++++++++++++++++++++++++++++++++++++++++ paste/paste.cpp | 9 ++++ paste/paste.vcxproj | 6 +++ paste/resource.h | 14 +++++++ 4 files changed, 129 insertions(+) create mode 100644 paste/Resource.rc create mode 100644 paste/resource.h diff --git a/paste/Resource.rc b/paste/Resource.rc new file mode 100644 index 0000000..ddc2e50 --- /dev/null +++ b/paste/Resource.rc @@ -0,0 +1,100 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "winres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (United States) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""winres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 2,0,0,1 + PRODUCTVERSION 2,0,0,1 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x40004L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", "NeoSmart Technologies" + VALUE "FileDescription", "Paste clipboard contents. Run paste.exe --help for more info." + VALUE "FileVersion", "2.0.0.1" + VALUE "InternalName", "paste.exe" + VALUE "LegalCopyright", "Copyright NeoSmart Technologies 2017-2020" + VALUE "OriginalFilename", "paste.exe" + VALUE "ProductName", "NeoSmart paste" + VALUE "ProductVersion", "2.0.0.1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // English (United States) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/paste/paste.cpp b/paste/paste.cpp index 88c2ab6..307ef22 100644 --- a/paste/paste.cpp +++ b/paste/paste.cpp @@ -182,6 +182,15 @@ int wmain(void) { lineEnding = LineEnding::CrLf; } + else if (lstrcmpi(argv[1], L"--help") == 0 || lstrcmpi(argv[1], L"-h") == 0 + || lstrcmpi(argv[1], L"/?") == 0 || lstrcmpi(argv[1], L"/help") == 0 + || lstrcmpi(argv[1], L"/h") == 0) + { + Write(L"paste.exe by NeoSmart Technologies\n"); + Write(L"https://github.com/neosmart/paste\n\n"); + Write(L"USAGE: paste.exe [--lf|--crlf|--help]\n"); + ExitProcess(0); + } } if (!OpenClipboard(nullptr)) diff --git a/paste/paste.vcxproj b/paste/paste.vcxproj index 5f11ceb..b8eadb0 100644 --- a/paste/paste.vcxproj +++ b/paste/paste.vcxproj @@ -165,6 +165,12 @@ + + + + + + diff --git a/paste/resource.h b/paste/resource.h new file mode 100644 index 0000000..7ca31da --- /dev/null +++ b/paste/resource.h @@ -0,0 +1,14 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by Resource.rc + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 101 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif