Skip to content

Commit

Permalink
Add version table and --help support
Browse files Browse the repository at this point in the history
  • Loading branch information
mqudsi committed Mar 11, 2020
1 parent f82eec2 commit c3ded06
Show file tree
Hide file tree
Showing 4 changed files with 129 additions and 0 deletions.
100 changes: 100 additions & 0 deletions paste/Resource.rc
Original file line number Diff line number Diff line change
@@ -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

9 changes: 9 additions & 0 deletions paste/paste.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
6 changes: 6 additions & 0 deletions paste/paste.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,12 @@
<ItemGroup>
<ClCompile Include="paste.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="resource.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="Resource.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
Expand Down
14 changes: 14 additions & 0 deletions paste/resource.h
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit c3ded06

Please # to comment.