mirror of
https://github.com/microsoft/terminal.git
synced 2026-05-08 05:13:51 +00:00
Compare commits
31 Commits
dev/yeelam
...
dev/duhowe
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e55957dcfd | ||
|
|
c306414273 | ||
|
|
681b6cdc3b | ||
|
|
65e033687a | ||
|
|
fd26214d95 | ||
|
|
32b3687619 | ||
|
|
1af0ed0fb3 | ||
|
|
615f85e33c | ||
|
|
3e0441b47c | ||
|
|
91903d7916 | ||
|
|
14a1b1d2b1 | ||
|
|
e6dcf8f271 | ||
|
|
32c4dde0f1 | ||
|
|
5070bdc0b4 | ||
|
|
0c60502855 | ||
|
|
a53b7a8ddd | ||
|
|
a6cea559b2 | ||
|
|
d649b50fb0 | ||
|
|
0179a59a4f | ||
|
|
9b7cc69229 | ||
|
|
b61a2c67b1 | ||
|
|
e42429333d | ||
|
|
b973a8f647 | ||
|
|
200fca3be5 | ||
|
|
1a0ff53734 | ||
|
|
af5146f973 | ||
|
|
8c23e74bea | ||
|
|
b3c8458741 | ||
|
|
cefb894861 | ||
|
|
3f25afdb97 | ||
|
|
5310127d3a |
73
CMakeLists.txt
Normal file
73
CMakeLists.txt
Normal file
@@ -0,0 +1,73 @@
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
# We use the BYPRODUCTS feature for improved Ninja integration
|
||||
|
||||
if(${CMAKE_VERSION} VERSION_LESS 3.12)
|
||||
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
|
||||
endif()
|
||||
|
||||
cmake_policy(SET CMP0092 NEW)
|
||||
|
||||
project(conhost
|
||||
VERSION 1.0.0
|
||||
DESCRIPTION "Windows Console Host"
|
||||
LANGUAGES C CXX)
|
||||
|
||||
# Some projects (like the COM proxy) generate C files.
|
||||
list(APPEND CMAKE_CXX_SOURCE_FILE_EXTENSIONS c)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
|
||||
set(X_VCPKG_APPLOCAL_DEPS_INSTALL ON)
|
||||
|
||||
# Hybrid CRT (runtime library is static, crt is dynamic)
|
||||
set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreaded$<$<CONFIG:Debug>:Debug>)
|
||||
|
||||
execute_process(
|
||||
COMMAND pwsh -NoProfile -Command "${CMAKE_SOURCE_DIR}/tools/Generate-FeatureStagingHeader.ps1" -Branding Dev -Path "${CMAKE_CURRENT_LIST_DIR}\\src\\features.xml" -OutputPath "${CMAKE_BINARY_DIR}\\features.h"
|
||||
)
|
||||
|
||||
add_compile_definitions(
|
||||
UNICODE
|
||||
_UNICODE
|
||||
EXTERNAL_BUILD
|
||||
)
|
||||
|
||||
add_compile_options(
|
||||
/W3 /WX /utf-8
|
||||
/wd4201 /wd4702
|
||||
/permissive-
|
||||
/Zc:preprocessor
|
||||
/Zc:__cplusplus /Zc:__STDC__ /Zc:enumTypes /Zc:externConstexpr /Zc:templateScope /Zc:throwingNew
|
||||
/guard:cf
|
||||
/FI${CMAKE_BINARY_DIR}\\features.h
|
||||
$<$<NOT:$<CONFIG:DEBUG>>:/GL>
|
||||
)
|
||||
|
||||
add_link_options(
|
||||
$<$<NOT:$<CONFIG:DEBUG>>:/LTCG>
|
||||
$<$<NOT:$<CONFIG:DEBUG>>:/OPT:REF>
|
||||
$<$<NOT:$<CONFIG:DEBUG>>:/OPT:ICF>
|
||||
# Hybrid CRT (switch the static crt for the dynaimc one)
|
||||
/nodefaultlib:libucrt$<$<CONFIG:Debug>:d>.lib
|
||||
/defaultlib:ucrt$<$<CONFIG:Debug>:d>.lib
|
||||
/guard:cf
|
||||
)
|
||||
|
||||
add_compile_definitions(
|
||||
"$<$<CONFIG:DEBUG>:DEBUG>"
|
||||
"$<$<CONFIG:DEBUG>:_DEBUG>"
|
||||
"$<$<CONFIG:DEBUG>:DBG>"
|
||||
)
|
||||
|
||||
cmake_policy(SET CMP0091 NEW)
|
||||
set(
|
||||
CMAKE_MSVC_RUNTIME_LIBRARY
|
||||
# Statically link the C++ runtime libraries, but partially override this below
|
||||
"MultiThreaded$<$<CONFIG:Debug>:Debug>"
|
||||
)
|
||||
add_link_options(
|
||||
"/DEFAULTLIB:ucrt$<$<CONFIG:Debug>:d>.lib" # include the dynamic UCRT
|
||||
"/NODEFAULTLIB:libucrt$<$<CONFIG:Debug>:d>.lib" # ignore the static UCRT
|
||||
)
|
||||
|
||||
add_subdirectory(src)
|
||||
34
src/CMakeLists.txt
Normal file
34
src/CMakeLists.txt
Normal file
@@ -0,0 +1,34 @@
|
||||
find_package(Microsoft.GSL CONFIG REQUIRED)
|
||||
find_package(wil CONFIG REQUIRED)
|
||||
|
||||
get_target_property(WIL_INCLUDE_DIR WIL::WIL INTERFACE_INCLUDE_DIRECTORIES)
|
||||
get_target_property(GSL_INCLUDE_DIR Microsoft.GSL::GSL INTERFACE_INCLUDE_DIRECTORIES)
|
||||
|
||||
find_path(FMT_INCLUDE_DIR NAMES format.h)
|
||||
|
||||
include_directories(
|
||||
inc
|
||||
${WIL_INCLUDE_DIR}
|
||||
../oss/stb
|
||||
../oss/chromium
|
||||
../oss/interval_tree
|
||||
../dep/Console
|
||||
../dep/NT
|
||||
../dep/Win32K
|
||||
../dep
|
||||
)
|
||||
|
||||
add_subdirectory(audio)
|
||||
add_subdirectory(buffer)
|
||||
add_subdirectory(host)
|
||||
add_subdirectory(interactivity)
|
||||
add_subdirectory(propsheet)
|
||||
add_subdirectory(propslib)
|
||||
add_subdirectory(renderer)
|
||||
add_subdirectory(server)
|
||||
add_subdirectory(terminal)
|
||||
#add_subdirectory(til)
|
||||
add_subdirectory(tsf)
|
||||
add_subdirectory(types)
|
||||
add_subdirectory(internal)
|
||||
add_subdirectory(winconpty)
|
||||
1
src/audio/CMakeLists.txt
Normal file
1
src/audio/CMakeLists.txt
Normal file
@@ -0,0 +1 @@
|
||||
add_subdirectory(midi)
|
||||
10
src/audio/midi/CMakeLists.txt
Normal file
10
src/audio/midi/CMakeLists.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
add_library(ConAudioMidi)
|
||||
target_sources(ConAudioMidi
|
||||
PRIVATE
|
||||
MidiAudio.cpp
|
||||
)
|
||||
|
||||
target_precompile_headers(ConAudioMidi
|
||||
PRIVATE
|
||||
precomp.h
|
||||
)
|
||||
1
src/buffer/CMakeLists.txt
Normal file
1
src/buffer/CMakeLists.txt
Normal file
@@ -0,0 +1 @@
|
||||
add_subdirectory(out)
|
||||
23
src/buffer/out/CMakeLists.txt
Normal file
23
src/buffer/out/CMakeLists.txt
Normal file
@@ -0,0 +1,23 @@
|
||||
add_library(ConBufferOut)
|
||||
target_sources(ConBufferOut
|
||||
PRIVATE
|
||||
cursor.cpp
|
||||
ImageSlice.cpp
|
||||
OutputCell.cpp
|
||||
OutputCellIterator.cpp
|
||||
OutputCellRect.cpp
|
||||
OutputCellView.cpp
|
||||
Row.cpp
|
||||
search.cpp
|
||||
TextAttribute.cpp
|
||||
textBuffer.cpp
|
||||
textBufferCellIterator.cpp
|
||||
textBufferTextIterator.cpp
|
||||
TextColor.cpp
|
||||
UTextAdapter.cpp
|
||||
)
|
||||
|
||||
target_precompile_headers(ConBufferOut
|
||||
PRIVATE
|
||||
precomp.h
|
||||
)
|
||||
94
src/host/CMakeLists.txt
Normal file
94
src/host/CMakeLists.txt
Normal file
@@ -0,0 +1,94 @@
|
||||
add_library(ConHostLib)
|
||||
target_sources(ConHostLib
|
||||
PRIVATE
|
||||
_output.cpp
|
||||
_stream.cpp
|
||||
AccessibilityNotifier.cpp
|
||||
alias.cpp
|
||||
cmdline.cpp
|
||||
ConsoleArguments.cpp
|
||||
consoleInformation.cpp
|
||||
dbcs.cpp
|
||||
directio.cpp
|
||||
getset.cpp
|
||||
globals.cpp
|
||||
handle.cpp
|
||||
history.cpp
|
||||
init.cpp
|
||||
input.cpp
|
||||
inputBuffer.cpp
|
||||
inputKeyInfo.cpp
|
||||
inputReadHandleData.cpp
|
||||
misc.cpp
|
||||
ntprivapi.cpp
|
||||
output.cpp
|
||||
outputStream.cpp
|
||||
PtySignalInputThread.cpp
|
||||
readData.cpp
|
||||
readDataCooked.cpp
|
||||
readDataDirect.cpp
|
||||
readDataRaw.cpp
|
||||
registry.cpp
|
||||
renderData.cpp
|
||||
renderFontDefaults.cpp
|
||||
screenInfo.cpp
|
||||
scrolling.cpp
|
||||
selection.cpp
|
||||
selectionInput.cpp
|
||||
selectionState.cpp
|
||||
settings.cpp
|
||||
srvinit.cpp
|
||||
stream.cpp
|
||||
tracing.cpp
|
||||
utils.cpp
|
||||
VtInputThread.cpp
|
||||
VtIo.cpp
|
||||
writeData.cpp
|
||||
)
|
||||
|
||||
target_include_directories(ConHostLib
|
||||
PRIVATE
|
||||
.
|
||||
"$<TARGET_PROPERTY:ConCOMProxy,INTERFACE_INCLUDE_DIRECTORIES>"
|
||||
)
|
||||
|
||||
target_precompile_headers(ConHostLib
|
||||
PRIVATE
|
||||
precomp.h
|
||||
)
|
||||
|
||||
find_package(fmt CONFIG REQUIRED)
|
||||
|
||||
target_link_libraries(ConHostLib
|
||||
INTERFACE
|
||||
ConCOMProxy
|
||||
ConAudioMidi
|
||||
ConBufferOut
|
||||
ConInteractivityBase
|
||||
ConInteractivityWin32
|
||||
ConInternalStubs
|
||||
ConPropsLib
|
||||
ConTermInput
|
||||
ConTermParser
|
||||
ConTermAdapt
|
||||
ConTSF
|
||||
ConServer
|
||||
|
||||
ConRenderBase
|
||||
ConRenderGdi
|
||||
ConRenderAtlas
|
||||
|
||||
ConTypes
|
||||
|
||||
fmt::fmt
|
||||
|
||||
onecoreuap_apiset.lib
|
||||
usp10.lib
|
||||
imm32.lib
|
||||
winmm.lib
|
||||
ntdll.lib
|
||||
)
|
||||
|
||||
add_subdirectory(proxy)
|
||||
add_subdirectory(exe)
|
||||
add_subdirectory(ft_fuzzer)
|
||||
34
src/host/exe/CMakeLists.txt
Normal file
34
src/host/exe/CMakeLists.txt
Normal file
@@ -0,0 +1,34 @@
|
||||
add_executable(conhost WIN32)
|
||||
|
||||
target_sources(conhost
|
||||
PRIVATE
|
||||
CConsoleHandoff.cpp
|
||||
exemain.cpp
|
||||
Host.EXE.rc
|
||||
OpenConsole.exe.manifest
|
||||
)
|
||||
|
||||
target_include_directories(conhost
|
||||
PRIVATE
|
||||
.
|
||||
..
|
||||
)
|
||||
|
||||
target_link_libraries(conhost
|
||||
PRIVATE
|
||||
ConHostLib
|
||||
ConCOMProxy
|
||||
)
|
||||
|
||||
target_link_options(conhost PRIVATE /entry:wWinMainCRTStartup)
|
||||
|
||||
target_precompile_headers(conhost
|
||||
PRIVATE
|
||||
../precomp.h
|
||||
)
|
||||
|
||||
install(
|
||||
TARGETS
|
||||
conhost
|
||||
DESTINATION bin
|
||||
)
|
||||
25
src/host/ft_fuzzer/CMakeLists.txt
Normal file
25
src/host/ft_fuzzer/CMakeLists.txt
Normal file
@@ -0,0 +1,25 @@
|
||||
add_executable(confuzz)
|
||||
|
||||
target_sources(confuzz
|
||||
PRIVATE
|
||||
fuzzmain.cpp
|
||||
../exe/Host.EXE.rc
|
||||
../exe/openconsole.exe.manifest
|
||||
)
|
||||
|
||||
target_include_directories(confuzz
|
||||
PRIVATE
|
||||
.
|
||||
..
|
||||
)
|
||||
|
||||
target_link_libraries(confuzz
|
||||
PRIVATE
|
||||
ConHostLib
|
||||
)
|
||||
|
||||
install(
|
||||
TARGETS
|
||||
confuzz
|
||||
DESTINATION bin
|
||||
)
|
||||
@@ -3,7 +3,5 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "precomp.h"
|
||||
|
||||
void InitSideBySide(_Out_writes_(ScratchBufferSize) PWSTR ScratchBuffer, __range(MAX_PATH, MAX_PATH) DWORD ScratchBufferSize);
|
||||
void InitEnvironmentVariables();
|
||||
|
||||
39
src/host/proxy/CMakeLists.txt
Normal file
39
src/host/proxy/CMakeLists.txt
Normal file
@@ -0,0 +1,39 @@
|
||||
set(IDL_FILES IConsoleHandoff.idl ITerminalHandoff.idl)
|
||||
|
||||
foreach(FILE ${IDL_FILES})
|
||||
get_filename_component(FILE_WE ${FILE} NAME_WE)
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/${FILE_WE}_p.c
|
||||
BYPRODUCTS
|
||||
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/${FILE_WE}_i.c
|
||||
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/${FILE_WE}.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/dlldata.c
|
||||
MAIN_DEPENDENCY ${FILE}
|
||||
COMMAND midl.exe /nologo /target NT100 /x64 /out "${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>" /h "${FILE_WE}.h" ${FILE}
|
||||
COMMENT "MIDL ${FILE}"
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
VERBATIM)
|
||||
endforeach(FILE)
|
||||
|
||||
set_source_files_properties(
|
||||
${CMAKE_CURRENT_BINARY_DIR}/Debug/dlldata.c
|
||||
${CMAKE_CURRENT_BINARY_DIR}/Release/dlldata.c
|
||||
${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/dlldata.c
|
||||
PROPERTIES GENERATED TRUE
|
||||
)
|
||||
|
||||
add_library(ConCOMProxy STATIC)
|
||||
set_target_properties(ConCOMProxy PROPERTIES LINKER_LANGUAGE CXX)
|
||||
target_sources(ConCOMProxy
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/ITerminalHandoff_p.c
|
||||
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/ITerminalHandoff_i.c
|
||||
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/IConsoleHandoff_p.c
|
||||
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/IConsoleHandoff_i.c
|
||||
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/dlldata.c
|
||||
)
|
||||
|
||||
target_include_directories(ConCOMProxy
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>
|
||||
)
|
||||
@@ -18,8 +18,6 @@ Revision History:
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "precomp.h"
|
||||
|
||||
class Registry
|
||||
{
|
||||
public:
|
||||
|
||||
2
src/interactivity/CMakeLists.txt
Normal file
2
src/interactivity/CMakeLists.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
add_subdirectory(base)
|
||||
add_subdirectory(win32)
|
||||
@@ -1,10 +1,6 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
#include "precomp.h"
|
||||
|
||||
#pragma hdrstop
|
||||
|
||||
namespace Microsoft::Console::Interactivity
|
||||
{
|
||||
enum class ApiLevel
|
||||
|
||||
17
src/interactivity/base/CMakeLists.txt
Normal file
17
src/interactivity/base/CMakeLists.txt
Normal file
@@ -0,0 +1,17 @@
|
||||
add_library(ConInteractivityBase)
|
||||
target_sources(ConInteractivityBase
|
||||
PRIVATE
|
||||
ApiDetector.cpp
|
||||
EventSynthesis.cpp
|
||||
HostSignalInputThread.cpp
|
||||
InteractivityFactory.cpp
|
||||
RemoteConsoleControl.cpp
|
||||
ServiceLocator.cpp
|
||||
VtApiRedirection.cpp
|
||||
PseudoConsoleWindowAccessibilityProvider.cpp
|
||||
)
|
||||
|
||||
target_precompile_headers(ConInteractivityBase
|
||||
PRIVATE
|
||||
precomp.h
|
||||
)
|
||||
@@ -3,8 +3,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "precomp.h"
|
||||
|
||||
#include "ApiDetector.hpp"
|
||||
|
||||
#include "../inc/IInteractivityFactory.hpp"
|
||||
@@ -12,8 +10,6 @@
|
||||
|
||||
#include <map>
|
||||
|
||||
#pragma hdrstop
|
||||
|
||||
namespace Microsoft::Console::Interactivity
|
||||
{
|
||||
class InteractivityFactory final : public IInteractivityFactory
|
||||
|
||||
25
src/interactivity/win32/CMakeLists.txt
Normal file
25
src/interactivity/win32/CMakeLists.txt
Normal file
@@ -0,0 +1,25 @@
|
||||
add_library(ConInteractivityWin32)
|
||||
target_sources(ConInteractivityWin32
|
||||
PRIVATE
|
||||
Clipboard.cpp
|
||||
ConsoleControl.cpp
|
||||
ConsoleInputThread.cpp
|
||||
consoleKeyInfo.cpp
|
||||
find.cpp
|
||||
icon.cpp
|
||||
menu.cpp
|
||||
screenInfoUiaProvider.cpp
|
||||
SystemConfigurationProvider.cpp
|
||||
uiaTextRange.cpp
|
||||
window.cpp
|
||||
windowdpiapi.cpp
|
||||
windowio.cpp
|
||||
WindowMetrics.cpp
|
||||
windowproc.cpp
|
||||
windowUiaProvider.cpp
|
||||
)
|
||||
|
||||
target_precompile_headers(ConInteractivityWin32
|
||||
PRIVATE
|
||||
precomp.h
|
||||
)
|
||||
@@ -12,8 +12,6 @@ Author(s):
|
||||
- Hernan Gatta (HeGatta) 29-Mar-2017
|
||||
--*/
|
||||
|
||||
#include "precomp.h"
|
||||
|
||||
#include "../inc/IConsoleInputThread.hpp"
|
||||
|
||||
namespace Microsoft::Console::Interactivity::Win32
|
||||
|
||||
@@ -14,8 +14,6 @@ Author(s):
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "precomp.h"
|
||||
|
||||
#include "../inc/ISystemConfigurationProvider.hpp"
|
||||
|
||||
namespace Microsoft::Console::Interactivity::Win32
|
||||
|
||||
@@ -18,8 +18,6 @@ Revision History:
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "precomp.h"
|
||||
|
||||
#include "../../host/screenInfo.hpp"
|
||||
|
||||
namespace Microsoft::Console::Interactivity::Win32
|
||||
|
||||
@@ -16,8 +16,6 @@ Revision History:
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "precomp.h"
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
namespace Microsoft::Console::Interactivity::Win32
|
||||
|
||||
@@ -16,7 +16,6 @@ Author(s):
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "precomp.h"
|
||||
#include "../types/UiaTextRangeBase.hpp"
|
||||
|
||||
namespace Microsoft::Console::Interactivity::Win32
|
||||
|
||||
@@ -19,8 +19,6 @@ Author(s):
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "precomp.h"
|
||||
|
||||
#include <UIAutomationCore.h>
|
||||
#include <wrl/implements.h>
|
||||
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "precomp.h"
|
||||
|
||||
#include "../../server/ProcessHandle.h"
|
||||
|
||||
#pragma hdrstop
|
||||
|
||||
10
src/internal/CMakeLists.txt
Normal file
10
src/internal/CMakeLists.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
add_library(ConInternalStubs)
|
||||
target_sources(ConInternalStubs
|
||||
PRIVATE
|
||||
stubs.cpp
|
||||
)
|
||||
|
||||
target_precompile_headers(ConInternalStubs
|
||||
PRIVATE
|
||||
precomp.h
|
||||
)
|
||||
62
src/propsheet/CMakeLists.txt
Normal file
62
src/propsheet/CMakeLists.txt
Normal file
@@ -0,0 +1,62 @@
|
||||
add_library(console MODULE)
|
||||
target_sources(console
|
||||
PRIVATE
|
||||
ColorControl.cpp
|
||||
ColorsPage.cpp
|
||||
console.cpp
|
||||
dbcs.cpp
|
||||
dll.cpp
|
||||
fontdlg.cpp
|
||||
globals.cpp
|
||||
init.cpp
|
||||
LayoutPage.cpp
|
||||
misc.cpp
|
||||
OptionsPage.cpp
|
||||
preview.cpp
|
||||
PropSheetHandler.cpp
|
||||
registry.cpp
|
||||
TerminalPropsheetPage.cpp
|
||||
util.cpp
|
||||
|
||||
${CMAKE_CURRENT_BINARY_DIR}/strid.h
|
||||
|
||||
console.rc
|
||||
console.def
|
||||
)
|
||||
|
||||
set_property(SOURCE console.rc APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/strid.rc)
|
||||
|
||||
target_include_directories(console
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
../host
|
||||
)
|
||||
|
||||
target_link_libraries(console
|
||||
PRIVATE
|
||||
ConInternalStubs
|
||||
ConPropsLib
|
||||
ConTypes
|
||||
|
||||
onecoreuap_apiset.lib
|
||||
shlwapi.lib
|
||||
)
|
||||
|
||||
target_precompile_headers(console
|
||||
PRIVATE
|
||||
precomp.h
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
DEPENDS strid.mc
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/strid.rc
|
||||
BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/strid.h
|
||||
COMMAND mc.exe -r "${CMAKE_CURRENT_BINARY_DIR}" -h "${CMAKE_CURRENT_BINARY_DIR}" strid.mc
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
install(
|
||||
TARGETS
|
||||
console
|
||||
DESTINATION bin
|
||||
)
|
||||
13
src/propslib/CMakeLists.txt
Normal file
13
src/propslib/CMakeLists.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
add_library(ConPropsLib)
|
||||
target_sources(ConPropsLib
|
||||
PRIVATE
|
||||
DelegationConfig.cpp
|
||||
RegistrySerialization.cpp
|
||||
ShortcutSerialization.cpp
|
||||
TrueTypeFontList.cpp
|
||||
)
|
||||
|
||||
target_precompile_headers(ConPropsLib
|
||||
PRIVATE
|
||||
precomp.h
|
||||
)
|
||||
@@ -1,6 +1,8 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
#pragma once
|
||||
|
||||
#define DEFINE_CONSOLEV2_PROPERTIES
|
||||
#define INC_OLE2
|
||||
|
||||
|
||||
3
src/renderer/CMakeLists.txt
Normal file
3
src/renderer/CMakeLists.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
add_subdirectory(base)
|
||||
add_subdirectory(gdi)
|
||||
add_subdirectory(atlas)
|
||||
52
src/renderer/atlas/CMakeLists.txt
Normal file
52
src/renderer/atlas/CMakeLists.txt
Normal file
@@ -0,0 +1,52 @@
|
||||
add_library(ConRenderAtlas)
|
||||
|
||||
target_include_directories(ConRenderAtlas
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>
|
||||
)
|
||||
|
||||
target_sources(ConRenderAtlas
|
||||
PRIVATE
|
||||
AtlasEngine.api.cpp
|
||||
AtlasEngine.cpp
|
||||
AtlasEngine.r.cpp
|
||||
Backend.cpp
|
||||
BackendD2D.cpp
|
||||
BackendD3D.cpp
|
||||
BuiltinGlyphs.cpp
|
||||
dwrite_helpers.cpp
|
||||
DWriteTextAnalysis.cpp
|
||||
stb_rect_pack.cpp
|
||||
wic.cpp
|
||||
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/shader_vs.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/shader_ps.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/custom_shader_vs.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/custom_shader_ps.h
|
||||
)
|
||||
|
||||
target_precompile_headers(ConRenderAtlas
|
||||
PRIVATE
|
||||
pch.h
|
||||
)
|
||||
|
||||
set(HLSL_SHADER_FILES shader_vs.hlsl shader_ps.hlsl custom_shader_ps.hlsl custom_shader_vs.hlsl)
|
||||
|
||||
set_source_files_properties(shader_vs.hlsl PROPERTIES ShaderType "vs")
|
||||
set_source_files_properties(shader_ps.hlsl PROPERTIES ShaderType "ps")
|
||||
set_source_files_properties(custom_shader_vs.hlsl PROPERTIES ShaderType "vs")
|
||||
set_source_files_properties(custom_shader_ps.hlsl PROPERTIES ShaderType "ps")
|
||||
set_source_files_properties(${HLSL_SHADER_FILES} PROPERTIES ShaderModel "4_0")
|
||||
|
||||
foreach(FILE ${HLSL_SHADER_FILES})
|
||||
get_filename_component(FILE_WE ${FILE} NAME_WE)
|
||||
get_source_file_property(shadertype ${FILE} ShaderType)
|
||||
get_source_file_property(shadermodel ${FILE} ShaderModel)
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/${FILE_WE}.h
|
||||
COMMAND fxc.exe /nologo /Emain /Vn${FILE_WE} /Zi /T${shadertype}_${shadermodel} $<IF:$<CONFIG:DEBUG>,/Od,/O3> /Zsb /Fh ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/${FILE_WE}.h /Fd ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/${FILE_WE}.pdb ${FILE}
|
||||
MAIN_DEPENDENCY ${FILE}
|
||||
COMMENT "HLSL ${FILE}"
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
VERBATIM
|
||||
)
|
||||
endforeach(FILE)
|
||||
17
src/renderer/base/CMakeLists.txt
Normal file
17
src/renderer/base/CMakeLists.txt
Normal file
@@ -0,0 +1,17 @@
|
||||
add_library(ConRenderBase)
|
||||
target_sources(ConRenderBase
|
||||
PRIVATE
|
||||
CSSLengthPercentage.cpp
|
||||
fontinfo.cpp
|
||||
FontInfoBase.cpp
|
||||
FontInfoDesired.cpp
|
||||
FontResource.cpp
|
||||
RenderEngineBase.cpp
|
||||
renderer.cpp
|
||||
RenderSettings.cpp
|
||||
)
|
||||
|
||||
target_precompile_headers(ConRenderBase
|
||||
PRIVATE
|
||||
precomp.h
|
||||
)
|
||||
13
src/renderer/gdi/CMakeLists.txt
Normal file
13
src/renderer/gdi/CMakeLists.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
add_library(ConRenderGdi)
|
||||
target_sources(ConRenderGdi
|
||||
PRIVATE
|
||||
invalidate.cpp
|
||||
math.cpp
|
||||
paint.cpp
|
||||
state.cpp
|
||||
)
|
||||
|
||||
target_precompile_headers(ConRenderGdi
|
||||
PRIVATE
|
||||
precomp.h
|
||||
)
|
||||
@@ -10,6 +10,7 @@ Abstract:
|
||||
- Avoid including internal project headers. Instead include them only in the classes that need them (helps with test project building).
|
||||
--*/
|
||||
|
||||
#pragma once
|
||||
#include <cwchar>
|
||||
#include <sal.h>
|
||||
|
||||
|
||||
34
src/server/CMakeLists.txt
Normal file
34
src/server/CMakeLists.txt
Normal file
@@ -0,0 +1,34 @@
|
||||
add_library(ConServer)
|
||||
target_sources(ConServer
|
||||
PRIVATE
|
||||
ApiDispatchers.cpp
|
||||
ApiDispatchersInternal.cpp
|
||||
ApiMessage.cpp
|
||||
ApiMessageState.cpp
|
||||
ApiSorter.cpp
|
||||
ConDrvDeviceComm.cpp
|
||||
ConsoleShimPolicy.cpp
|
||||
DeviceHandle.cpp
|
||||
Entrypoints.cpp
|
||||
IoDispatchers.cpp
|
||||
IoSorter.cpp
|
||||
ObjectHandle.cpp
|
||||
ObjectHeader.cpp
|
||||
ProcessHandle.cpp
|
||||
ProcessList.cpp
|
||||
ProcessPolicy.cpp
|
||||
WaitBlock.cpp
|
||||
WaitQueue.cpp
|
||||
WinNTControl.cpp
|
||||
)
|
||||
|
||||
target_precompile_headers(ConServer
|
||||
PRIVATE
|
||||
precomp.h
|
||||
)
|
||||
|
||||
# We need the interface import for ConCOMProxy to get the MIDL header path
|
||||
target_link_libraries(ConServer
|
||||
PRIVATE
|
||||
ConCOMProxy
|
||||
)
|
||||
3
src/terminal/CMakeLists.txt
Normal file
3
src/terminal/CMakeLists.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
add_subdirectory(adapter)
|
||||
add_subdirectory(input)
|
||||
add_subdirectory(parser)
|
||||
17
src/terminal/adapter/CMakeLists.txt
Normal file
17
src/terminal/adapter/CMakeLists.txt
Normal file
@@ -0,0 +1,17 @@
|
||||
add_library(ConTermAdapt)
|
||||
target_sources(ConTermAdapt
|
||||
PRIVATE
|
||||
adaptDispatch.cpp
|
||||
adaptDispatchGraphics.cpp
|
||||
FontBuffer.cpp
|
||||
MacroBuffer.cpp
|
||||
InteractDispatch.cpp
|
||||
PageManager.cpp
|
||||
SixelParser.cpp
|
||||
terminalOutput.cpp
|
||||
)
|
||||
|
||||
target_precompile_headers(ConTermAdapt
|
||||
PRIVATE
|
||||
precomp.h
|
||||
)
|
||||
11
src/terminal/input/CMakeLists.txt
Normal file
11
src/terminal/input/CMakeLists.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
add_library(ConTermInput)
|
||||
target_sources(ConTermInput
|
||||
PRIVATE
|
||||
mouseInput.cpp
|
||||
terminalInput.cpp
|
||||
)
|
||||
|
||||
target_precompile_headers(ConTermInput
|
||||
PRIVATE
|
||||
precomp.h
|
||||
)
|
||||
14
src/terminal/parser/CMakeLists.txt
Normal file
14
src/terminal/parser/CMakeLists.txt
Normal file
@@ -0,0 +1,14 @@
|
||||
add_library(ConTermParser)
|
||||
target_sources(ConTermParser
|
||||
PRIVATE
|
||||
base64.cpp
|
||||
InputStateMachineEngine.cpp
|
||||
OutputStateMachineEngine.cpp
|
||||
stateMachine.cpp
|
||||
tracing.cpp
|
||||
)
|
||||
|
||||
target_precompile_headers(ConTermParser
|
||||
PRIVATE
|
||||
precomp.h
|
||||
)
|
||||
11
src/tsf/CMakeLists.txt
Normal file
11
src/tsf/CMakeLists.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
add_library(ConTSF)
|
||||
target_sources(ConTSF
|
||||
PRIVATE
|
||||
Handle.cpp
|
||||
Implementation.cpp
|
||||
)
|
||||
|
||||
target_precompile_headers(ConTSF
|
||||
PRIVATE
|
||||
precomp.h
|
||||
)
|
||||
23
src/types/CMakeLists.txt
Normal file
23
src/types/CMakeLists.txt
Normal file
@@ -0,0 +1,23 @@
|
||||
add_library(ConTypes)
|
||||
target_sources(ConTypes
|
||||
PRIVATE
|
||||
CodepointWidthDetector.cpp
|
||||
ColorFix.cpp
|
||||
colorTable.cpp
|
||||
convert.cpp
|
||||
GlyphWidth.cpp
|
||||
ScreenInfoUiaProviderBase.cpp
|
||||
sgrStack.cpp
|
||||
TermControlUiaProvider.cpp
|
||||
TermControlUiaTextRange.cpp
|
||||
ThemeUtils.cpp
|
||||
UiaTextRangeBase.cpp
|
||||
UiaTracing.cpp
|
||||
utils.cpp
|
||||
viewport.cpp
|
||||
)
|
||||
|
||||
target_precompile_headers(ConTypes
|
||||
PRIVATE
|
||||
precomp.h
|
||||
)
|
||||
23
src/winconpty/CMakeLists.txt
Normal file
23
src/winconpty/CMakeLists.txt
Normal file
@@ -0,0 +1,23 @@
|
||||
add_library(conpty SHARED)
|
||||
target_sources(conpty
|
||||
PRIVATE
|
||||
winconpty.cpp
|
||||
../server/DeviceHandle.cpp
|
||||
../server/WinNTControl.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(conpty
|
||||
PRIVATE
|
||||
onecoreuap_apiset.lib
|
||||
)
|
||||
|
||||
target_precompile_headers(conpty
|
||||
PRIVATE
|
||||
precomp.h
|
||||
)
|
||||
|
||||
install(
|
||||
TARGETS
|
||||
conpty
|
||||
DESTINATION lib
|
||||
)
|
||||
@@ -1,8 +1,6 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
#include "precomp.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
|
||||
"dependencies": [
|
||||
"fmt",
|
||||
"ms-gsl"
|
||||
"ms-gsl",
|
||||
"wil"
|
||||
],
|
||||
"features": {
|
||||
"terminal": {
|
||||
|
||||
Reference in New Issue
Block a user