-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #170 from end2endzone/feature-issue110
Merge feature-issue110
- Loading branch information
Showing
25 changed files
with
890 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
find_package(rapidassist REQUIRED) | ||
|
||
set(REFRESH_DEBUG_ARGS_CON_RESOURCE_FILES "" | ||
resource.h | ||
showargs.ico | ||
showargs.rc | ||
) | ||
|
||
add_executable(arguments.debugger.console | ||
${SHELLANYTHING_EXPORT_HEADER} | ||
${SHELLANYTHING_VERSION_HEADER} | ||
${SHELLANYTHING_CONFIG_HEADER} | ||
${REFRESH_DEBUG_ARGS_CON_RESOURCE_FILES} | ||
../arguments.debugger.window/arguments.cpp | ||
../arguments.debugger.window/arguments.h | ||
framework.h | ||
main.cpp | ||
targetver.h | ||
) | ||
|
||
# Group external files as filter for Visual Studio | ||
source_group("Resource Files" FILES ${REFRESH_DEBUG_ARGS_CON_RESOURCE_FILES}) | ||
|
||
# Force UNICODE for target | ||
target_compile_definitions(arguments.debugger.console PRIVATE -D_UNICODE -DUNICODE) | ||
|
||
# Force CMAKE_DEBUG_POSTFIX for executables | ||
set_target_properties(arguments.debugger.console PROPERTIES DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX}) | ||
|
||
# Define include directories for the executable. | ||
target_include_directories(arguments.debugger.console | ||
PRIVATE | ||
${GTEST_INCLUDE_DIR} | ||
rapidassist | ||
${CMAKE_SOURCE_DIR}/src/shared | ||
) | ||
|
||
# Define linking dependencies. | ||
add_dependencies(arguments.debugger.console sa.shared) | ||
target_link_libraries(arguments.debugger.console | ||
PRIVATE | ||
sa.shared | ||
rapidassist | ||
) | ||
|
||
install(TARGETS arguments.debugger.console | ||
EXPORT shellanything-targets | ||
ARCHIVE DESTINATION ${SHELLANYTHING_INSTALL_LIB_DIR} | ||
LIBRARY DESTINATION ${SHELLANYTHING_INSTALL_LIB_DIR} | ||
RUNTIME DESTINATION ${SHELLANYTHING_INSTALL_BIN_DIR} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// header.h : include file for standard system include files, | ||
// or project specific include files | ||
// | ||
|
||
#pragma once | ||
|
||
#include "targetver.h" | ||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers | ||
// Windows Header Files | ||
#include <windows.h> | ||
// C RunTime Header Files | ||
#include <stdlib.h> | ||
#include <malloc.h> | ||
#include <memory.h> | ||
#include <tchar.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#include <iostream> | ||
#include <io.h> | ||
#include <fcntl.h> | ||
#include <string> | ||
#include "framework.h" | ||
#include "../arguments.debugger.window/arguments.h" | ||
|
||
#include "rapidassist/console.h" | ||
|
||
|
||
// Debug arguments example: | ||
// This is "multiple arguments at once" including "utf-8 characters" such as the Greek alphabet Αα Ββ Γγ Δδ Εε Ζζ Ηη Θθ Ιι Κκ Λλ Μμ Νν Ξξ Οο Ππ Ρρ Σσ/ς Ττ Υυ Φφ Χχ Ψψ Ωω. | ||
|
||
|
||
// https://stackoverflow.com/questions/33836706/what-are-tchar-strings-and-the-a-or-w-version-of-win32-api-functions | ||
|
||
#if defined(UNICODE) | ||
std::wistream& tcin = std::wcin; | ||
std::wostream& tcout = std::wcout; | ||
#else | ||
std::istream& tcin = std::cin; | ||
std::ostream& tcout = std::cout; | ||
#endif | ||
|
||
int _tmain(int argc, _TCHAR* argv[]) | ||
{ | ||
_setmode(_fileno(stdout), _O_U16TEXT); | ||
|
||
// The string that appears in the application's title bar. | ||
tcout << _T("ShellAything Arguments Debugging Application\n"); | ||
|
||
tstring_t arguments_desc; | ||
ReadCommandLineArguments(arguments_desc); | ||
|
||
tcout << arguments_desc << "\n"; | ||
|
||
tcout << "Press any key to continue . . ."; | ||
int tmp = ra::console::WaitKeyPress(); | ||
tcout << "\n"; | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
//{{NO_DEPENDENCIES}} | ||
// Microsoft Visual C++ generated include file. | ||
// Used by showargs.rc | ||
|
||
#define IDS_APP_TITLE 103 | ||
// | ||
#define IDR_MAINFRAME 128 | ||
#define IDD_SHOWARGS_DIALOG 102 | ||
#define IDD_ABOUTBOX 103 | ||
#define IDM_ABOUT 104 | ||
#define IDM_EXIT 105 | ||
#define IDI_SHOWARGS 107 | ||
#define IDC_SHOWARGS 109 | ||
#define ID_EDITCHILD 129 | ||
#ifndef IDC_STATIC | ||
#define IDC_STATIC -1 | ||
#endif | ||
// Next default values for new objects | ||
// | ||
#ifdef APSTUDIO_INVOKED | ||
#ifndef APSTUDIO_READONLY_SYMBOLS | ||
|
||
#define _APS_NO_MFC 130 | ||
#define _APS_NEXT_RESOURCE_VALUE 130 | ||
#define _APS_NEXT_COMMAND_VALUE 32771 | ||
#define _APS_NEXT_CONTROL_VALUE 1000 | ||
#define _APS_NEXT_SYMED_VALUE 110 | ||
#endif | ||
#endif |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#pragma once | ||
|
||
// // Including SDKDDKVer.h defines the highest available Windows platform. | ||
// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and | ||
// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. | ||
#include <SDKDDKVer.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
find_package(rapidassist REQUIRED) | ||
|
||
set(REFRESH_DEBUG_ARGS_WIN_RESOURCE_FILES "" | ||
resource.h | ||
showargs.ico | ||
showargs.rc | ||
) | ||
|
||
add_executable(arguments.debugger.window WIN32 | ||
${SHELLANYTHING_EXPORT_HEADER} | ||
${SHELLANYTHING_VERSION_HEADER} | ||
${SHELLANYTHING_CONFIG_HEADER} | ||
${REFRESH_DEBUG_ARGS_WIN_RESOURCE_FILES} | ||
arguments.cpp | ||
arguments.h | ||
framework.h | ||
gui.cpp | ||
targetver.h | ||
) | ||
|
||
# Group external files as filter for Visual Studio | ||
source_group("Resource Files" FILES ${REFRESH_DEBUG_ARGS_WIN_RESOURCE_FILES}) | ||
|
||
# Force UNICODE for target | ||
target_compile_definitions(arguments.debugger.window PRIVATE -D_UNICODE -DUNICODE) | ||
|
||
# Force CMAKE_DEBUG_POSTFIX for executables | ||
set_target_properties(arguments.debugger.window PROPERTIES DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX}) | ||
|
||
# Define include directories for the executable. | ||
target_include_directories(arguments.debugger.window | ||
PRIVATE | ||
${GTEST_INCLUDE_DIR} | ||
rapidassist | ||
${CMAKE_SOURCE_DIR}/src/shared | ||
) | ||
|
||
# Define linking dependencies. | ||
add_dependencies(arguments.debugger.window sa.shared) | ||
target_link_libraries(arguments.debugger.window | ||
PRIVATE | ||
sa.shared | ||
rapidassist | ||
) | ||
|
||
install(TARGETS arguments.debugger.window | ||
EXPORT shellanything-targets | ||
ARCHIVE DESTINATION ${SHELLANYTHING_INSTALL_LIB_DIR} | ||
LIBRARY DESTINATION ${SHELLANYTHING_INSTALL_LIB_DIR} | ||
RUNTIME DESTINATION ${SHELLANYTHING_INSTALL_BIN_DIR} | ||
) |
2 changes: 2 additions & 0 deletions
2
...debugger.window/How to Create a Multiline Edit Control - Win32 apps - Microsoft Learn.url
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[InternetShortcut] | ||
URL=https://learn.microsoft.com/en-us/windows/win32/controls/use-a-multiline-edit-control |
2 changes: 2 additions & 0 deletions
2
...Walkthrough- Create a traditional Windows Desktop application (C++) - Microsoft Learn.url
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[InternetShortcut] | ||
URL=https://learn.microsoft.com/en-us/cpp/windows/walkthrough-creating-windows-desktop-applications-cpp?view=msvc-170 |
Oops, something went wrong.