Merged PR 4587251: conhost: ingest OSS up to 86685079e

- build: move oss required to build conhost out of dep/

This change is necessary as the dep/ folder is not synced into the
Windows source tree.

I've also added a build rule producing a lib for {fmt}.

This will be required for our next OS ingestion.

Related work items: #26069643
This commit is contained in:
Dustin Howett 2020-04-21 21:53:22 +00:00
commit c6cb3b53dd
64 changed files with 65 additions and 81 deletions

View file

@ -2,4 +2,5 @@ IMap
ICustom
IObject
LCID
NCHITTEST
rfind

View file

@ -39,6 +39,7 @@ oldnewthing
osgwiki
paulcam
pauldotknopf
PGP
Pham
Rincewind
rprichard

View file

@ -52,6 +52,7 @@ SUMS$
\.yml$
\.zip$
^dep/
^oss/
^doc/reference/UTF8-torture-test\.txt$
^src/interactivity/onecore/BgfxEngine\.
^src/renderer/wddmcon/WddmConRenderer\.

View file

@ -7,10 +7,7 @@ ABCDEFGHIJ
abcdefghijk
abcdefghijklmnop
ABCDEFGHIJKLMNOPQRST
ABCDEFGHIJKLMNOPQRSTQ
abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJPQRST
ABCDEFGHIJPQRSTQ
QQQQQQQQQQABCDEFGHIJ
QQQQQQQQQQABCDEFGHIJKLMNOPQRSTQQQQQQQQQ
QQQQQQQQQQABCDEFGHIJKLMNOPQRSTQQQQQQQQQQ

View file

@ -1,6 +1,3 @@
aaaaa
aaaaaa
aaaaaaaaaaaaaaaaaaa
AAAAAABBBBBBCCC
AAAAABBBBBBBCCC
AAD
@ -77,7 +74,6 @@ applet
appletname
applicationmodel
APPLMODAL
APPLOGIC
appmodel
apps
APPWINDOW
@ -136,15 +132,13 @@ azzle
baac
backend
backgrounded
backgrounder
Backgrounder
backgrounding
backport
backstory
Batang
baz
Bazz
BBBB
BBBBBBBBBBBBBBBBBBBBBBBBBB
BBBBCCCCC
bbc
bbd
@ -238,7 +232,6 @@ CBoolean
cbt
cbuffer
CCCBB
CCCC
ccf
cch
CCHAR
@ -318,7 +311,6 @@ cnt
CNTRL
codebase
Codeflow
codeofconduct
codepage
codepoint
codeproject
@ -400,7 +392,6 @@ constness
contentfiles
conterm
CONTEXTMENU
controlkeystates
contsf
contypes
convarea
@ -472,9 +463,7 @@ CURRENTPAGE
CURSORCOLOR
CURSORSIZE
CURSORTYPE
customframe
CUU
cvd
cw
Cwa
cwch
@ -507,8 +496,6 @@ CYVSCROLL
dahall
dai
DATABLOCK
dataprotection
dataprotectionprovider
DATAVIEW
DATAW
dba
@ -536,7 +523,6 @@ dcommon
DCompile
dcompiler
ddb
DDDD
dde
DDESHARE
DDevice
@ -632,7 +618,7 @@ dialogbox
diffing
DINLINE
directio
directx
DIRECTX
Dirs
DISABLENOSCROLL
DISPLAYATTRIBUTE
@ -713,7 +699,6 @@ edputil
edu
eeb
eee
EEEE
Efast
EHsc
EJO
@ -778,7 +763,6 @@ FACENODE
FACESIZE
failfast
FAILIFTHERE
FAILOUT
fallthrough
FARPROC
fba
@ -804,7 +788,6 @@ fesb
ffc
FFDE
FFF
ffff
FFrom
FGCOLOR
fgetc
@ -827,7 +810,6 @@ finalizer
FINDCASE
FINDDLG
FINDDOWN
findlocalename
FINDSTR
FINDSTRINGEXACT
FINDUP
@ -900,7 +882,6 @@ GETALIASESLENGTH
GETALIASEXES
GETALIASEXESLENGTH
GETAUTOHIDEBAREX
getboundingrectangles
GETCARETWIDTH
getch
getchar
@ -919,7 +900,6 @@ GETDLGCODE
GETDPISCALEDSIZE
GETFONTINFO
GETFONTSIZE
getglyphs
GETHARDWARESTATE
GETHUNGAPPTIMEOUT
GETICON
@ -929,8 +909,6 @@ GETKEYSTATE
GETLARGESTWINDOWSIZE
GETLBTEXT
getline
getlocalename
getlocalenamelength
GETMINMAXINFO
GETMOUSEINFO
GETNUMBEROFFONTS
@ -940,8 +918,6 @@ GETPOS
GETSELECTIONINFO
getset
GETSTATE
getstring
getstringlength
GETTEXT
GETTEXTLEN
GETTITLE
@ -953,9 +929,6 @@ GETWHEELSCROLLLINES
getwriter
Gfun
gfx
ggggg
gggggg
ggggggg
gh
github
githubusercontent
@ -988,7 +961,7 @@ GWL
GWLP
gwsz
HABCDEF
hackathon
Hackathon
halfwidth
HALTCOND
HANGEUL
@ -1018,7 +991,6 @@ hhx
HIBYTE
HICON
HIDEWINDOW
hidpi
HIGHLIGHTTEXT
hinst
HINSTANCE
@ -1109,9 +1081,6 @@ idllib
IDOK
IDR
idth
idwritefontcollection
idwritelocalizedstrings
idwritetextanalyzer
idx
IDXGI
IDynamic
@ -1139,7 +1108,6 @@ ime
Imm
IMouse
impl
implementingtextandtextrange
inbox
inclusivity
INCONTEXT
@ -1160,7 +1128,6 @@ inout
INPATHROOT
Inplace
inproc
inputdev
Inputkeyinfo
INPUTPROCESSORPROFILE
inputrc
@ -1211,14 +1178,11 @@ iterm
itermcolors
ITerminal
IText
itextprovider
itextrangeprovider
itf
Ith
itoa
IUI
IUia
iuiautomationtextrange
IUnknown
ivalid
IVector
@ -1311,7 +1275,6 @@ listptr
listptrsize
lk
lld
LLLLLLLL
llvm
llx
LMENU
@ -1526,7 +1489,6 @@ nbsp
Nc
NCCALCSIZE
NCCREATE
nchittest
NCHITTEST'ed
NCLBUTTONDOWN
NCLBUTTONUP
@ -1555,13 +1517,10 @@ NEWTEXTMETRIC
NEWTEXTMETRICEX
Newtonsoft
NEXTLINE
nf
nfe
nlength
Nls
NLSMODE
nn
nnn
NOACTIVATE
NOAPPLYNOW
NOCLIP
@ -1697,6 +1656,7 @@ osfhandle
OSG
OSGENG
osign
oss
ostream
ostringstream
Ou
@ -1784,7 +1744,6 @@ PFONT
PFONTENUMDATA
PFS
pgdn
pgp
pguid
pgup
PHANDLE
@ -1817,9 +1776,7 @@ pntm
PNTSTATUS
POBJECT
Podcast
pointerpoint
POINTSLIST
polytextoutw
POLYTEXTW
popclip
popd
@ -1936,7 +1893,6 @@ pythonw
qi
QJ
qo
QQQQ
qsort
queryable
QUESTIONMARK
@ -2058,7 +2014,6 @@ robomac
roundtrip
ROWSTOSCROLL
RRF
RRRRRRR
rtcore
RTEXT
rtf
@ -2226,7 +2181,6 @@ SOURCESDIRECTORY
SPACEBAR
spammy
spand
Spc
splashscreen
sprintf
sqlproj
@ -2315,7 +2269,6 @@ syscalls
SYSCHAR
SYSCOMMAND
SYSDEADCHAR
sysinfo
Sysinternals
SYSKEYDOWN
SYSKEYUP
@ -2428,7 +2381,6 @@ TOPLEFT
TOPRIGHT
tosign
touchpad
tounicodeex
towlower
towupper
Tpp
@ -2490,8 +2442,6 @@ uget
uia
UIACCESS
uiacore
uiauto
uiautomationclient
uiautomationcore
Uid
uielem
@ -2512,7 +2462,6 @@ Unfocus
unfocuses
unhighlighting
unicode
unicodechar
UNICODESTRING
UNICODETEXT
UNICRT
@ -2579,7 +2528,6 @@ uxtheme
Vals
Vanara
vararg
varenum
vbproj
vclib
Vcount
@ -2616,7 +2564,6 @@ VProc
VRaw
VREDRAW
vsc
vsconfig
vscprintf
VSCROLL
vsinfo
@ -2694,7 +2641,6 @@ wikipedia
wil
WImpl
WINAPI
winauto
winbase
winbasep
wincon
@ -2725,10 +2671,8 @@ WINDOWPOSCHANGING
windowproc
windowrect
windowsapp
windowsinsiderpreview
windowsinternalstring
WINDOWSIZE
windowsterminal
windowsx
WINDOWTEXT
windowtheme
@ -2783,7 +2727,6 @@ WPresent
wprintf
wprp
wprpi
wpt
wregex
WResult
writeback
@ -2840,7 +2783,6 @@ xca
XCast
xce
XCENTER
XChars
XColors
xcopy
XCount
@ -2872,13 +2814,11 @@ xutr
xvalue
XVIRTUALSCREEN
XWalk
xxxx
xy
yact
YAML
YCast
YCENTER
YChars
YCount
YDPI
yml

View file

@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v2.0.0
with:
fetch-depth: 5
- uses: check-spelling/check-spelling@0.0.14-alpha
- uses: check-spelling/check-spelling@0.0.15-alpha
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
bucket: .github/actions

View file

@ -33,7 +33,7 @@ Display the help message.
Opens a new tab with the given customizations. On its _first_ invocation, also
opens a new window. Subsequent `new-tab` commands will all open new tabs in the
same window.
same window. <sup>[[1](#footnote-1)]</sup>
**Parameters**:
@ -44,7 +44,7 @@ same window.
`split-pane [-H]|[-V] [terminal_parameters]`
Creates a new pane in the currently focused tab by splitting the given pane
vertically or horizontally.
vertically or horizontally. <sup>[[1](#footnote-1)]</sup>
**Parameters**:
@ -89,6 +89,10 @@ following:
selected profile. If the user wants to use a `;` in this commandline, it
should be escaped as `\;`.
### Notes
* <span id="footnote-1"></span> [1]: If you try to run a `wt` commandline while running in a Windows Terminal window, the commandline will _always_ create a new window by default. Being able to run `wt` commandlines in the _current_ window is planned in the future - for more information, refer to [#4472].
## Examples
### Open Windows Terminal in the current directory
@ -126,3 +130,4 @@ This creates a new Windows Terminal window with one tab, and 3 panes:
`commandline`).
[#4023]: https://github.com/microsoft/terminal/pull/4023
[#4472]: https://github.com/microsoft/terminal/issues/4472

8
oss/README.md Normal file
View file

@ -0,0 +1,8 @@
### Component-Governance-tracked OSS dependencies
This directory contains mirrored open-source projects that are used by the
console host and Windows Terminal. Code in this directory will be replicated
into the Windows OS repository.
All projects in this directory **must** bear Component Governance Manifests
(`cgmanifest.json` files) indicating their provenance.

View file

@ -5,7 +5,7 @@ import "../AppLogic.idl";
namespace TerminalApp
{
// ADD ARBITRARY APP LOGIC TO APPLOGIC.IDL, NOT HERE.
// ADD ARBITRARY APP LOGIC TO AppLogic.idl, NOT HERE.
// This is for XAML platform setup only.
[default_interface] runtimeclass App : Microsoft.Toolkit.Win32.UI.XamlHost.XamlApplication
{

View file

@ -141,7 +141,7 @@ namespace winrt::TerminalApp::implementation
// Function Description:
// - Get the AppLogic for the current active Xaml application, or null if there isn't one.
// Return value:
// - A pointer (bare) to the applogic, or nullptr. The app logic outlives all other objects,
// - A pointer (bare) to the AppLogic, or nullptr. The app logic outlives all other objects,
// unless the application is in a terrible way, so this is "safe."
AppLogic* AppLogic::Current() noexcept
try

View file

@ -86,7 +86,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(OpenConsoleDir)\src\inc;$(OpenConsoleDir)\dep;$(OpenConsoleDir)\dep\Console;$(OpenConsoleDir)\dep\chromium;$(OpenConsoleDir)\dep\fmt\include;$(SolutionDir)\dep\dynamic_bitset;$(SolutionDir)\dep\libpopcnt;$(OpenConsoleDir)\dep\Win32K;$(OpenConsoleDir)\dep\gsl\include;$(OpenConsoleDir)\dep\wil\include;%(AdditionalIncludeDirectories);</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(OpenConsoleDir)\src\inc;$(OpenConsoleDir)\dep;$(OpenConsoleDir)\dep\Console;$(OpenConsoleDir)\dep\Win32K;$(OpenConsoleDir)\dep\gsl\include;$(OpenConsoleDir)\dep\wil\include;$(SolutionDir)\oss\chromium;$(SolutionDir)\oss\fmt\include;$(SolutionDir)\oss\dynamic_bitset;$(SolutionDir)\oss\libpopcnt;%(AdditionalIncludeDirectories);</AdditionalIncludeDirectories>
</ClCompile>
<ClCompile>
<!-- Manually include the generated TerminalCore header's path, because

View file

@ -83,7 +83,7 @@
<PrecompiledHeaderFile>precomp.h</PrecompiledHeaderFile>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<AdditionalIncludeDirectories>$(SolutionDir)\src\inc;$(SolutionDir)\dep;$(SolutionDir)\dep\Console;$(SolutionDir)\dep\chromium;$(SolutionDir)\dep\fmt\include;$(SolutionDir)\dep\dynamic_bitset;$(SolutionDir)\dep\libpopcnt;$(SolutionDir)\dep\Win32K;$(SolutionDir)\dep\gsl\include;$(SolutionDir)\dep\wil\include;%(AdditionalIncludeDirectories);</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)\src\inc;$(SolutionDir)\dep;$(SolutionDir)\dep\Console;$(SolutionDir)\dep\Win32K;$(SolutionDir)\dep\gsl\include;$(SolutionDir)\dep\wil\include;$(SolutionDir)\oss\chromium;$(SolutionDir)\oss\fmt\include;$(SolutionDir)\oss\dynamic_bitset;$(SolutionDir)\oss\libpopcnt;%(AdditionalIncludeDirectories);</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
@ -147,7 +147,7 @@
<CodeAnalysisRuleSet>$(SolutionDir)\src\StaticAnalysis.ruleset</CodeAnalysisRuleSet>
<EnableCppCoreCheck>true</EnableCppCoreCheck>
<RunCodeAnalysis>true</RunCodeAnalysis>
<CAExcludePath>$(CAExcludePath);$(SolutionDir)\dep;$(SolutionDir)\packages</CAExcludePath>
<CAExcludePath>$(CAExcludePath);$(SolutionDir)\dep;$(SolutionDir)\oss;$(SolutionDir)\packages</CAExcludePath>
<OpenConsoleVcpkgConfiguration>Release</OpenConsoleVcpkgConfiguration>
<OpenConsoleTppVcpkgConfiguration>Release</OpenConsoleTppVcpkgConfiguration>
</PropertyGroup>

2
src/dep/dirs Normal file
View file

@ -0,0 +1,2 @@
DIRS=\
fmt \

View file

@ -12,14 +12,14 @@
<ItemDefinitionGroup>
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<AdditionalIncludeDirectories>$(SolutionDir)\dep\fmt\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)\oss\fmt\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="$(SolutionDir)\dep\fmt\src\*.cc" />
<ClCompile Include="$(SolutionDir)\oss\fmt\src\*.cc" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="$(SolutionDir)\dep\fmt\include\fmt\*.h" />
<ClInclude Include="$(SolutionDir)\oss\fmt\include\fmt\*.h" />
</ItemGroup>
<!-- Careful reordering these. Some default props (contained in these files) are order sensitive. -->
<Import Project="$(SolutionDir)src\common.build.post.props" />

20
src/dep/fmt/sources Normal file
View file

@ -0,0 +1,20 @@
!include ..\..\project.inc
# -------------------------------------
# Program Information
# -------------------------------------
TARGETNAME = ConOSSFmt
TARGETTYPE = LIBRARY
# -------------------------------------
# Windows Console
# - OSS Dependency: {fmt}
# -------------------------------------
PRECOMPILED_CXX = 0
SOURCES = \
..\..\..\oss\fmt\src\format.cc \
..\..\..\oss\fmt\src\os.cc \

View file

@ -1,6 +1,7 @@
DIRS=\
buffer \
interactivity \
dep \
host \
propsheet \
propslib \

View file

@ -36,8 +36,11 @@ CONSOLE_OBJ_PATH = $(WINCORE_OBJ_PATH)\console\open\src
INCLUDES= \
$(INCLUDES); \
$(CONSOLE_SRC_PATH)\inc; \
$(CONSOLE_OBJ_PATH)\..\..\dep\$(O)\vpack; \
$(CONSOLE_SRC_PATH)\..\..\inc; \
$(CONSOLE_SRC_PATH)\..\oss\dynamic_bitset; \
$(CONSOLE_SRC_PATH)\..\oss\libpopcnt; \
$(CONSOLE_SRC_PATH)\..\oss\chromium; \
$(CONSOLE_SRC_PATH)\..\oss\fmt\include; \
$(MINWIN_INTERNAL_PRIV_SDK_INC_PATH_L); \
$(MINWIN_RESTRICTED_PRIV_SDK_INC_PATH_L); \
$(MINCORE_INTERNAL_PRIV_SDK_INC_PATH_L); \

View file

@ -51,6 +51,8 @@ MSC_WARNING_LEVEL = /W4 /WX
# Code in the OneCore depot automatically excludes default Win32 libraries.
CONSOLE_SRC_PATH = $(PROJECT_ROOT)\core\console\open\src
# -------------------------------------
# Sources, Headers, and Libraries
# -------------------------------------
@ -62,7 +64,10 @@ SOURCES = \
INCLUDES = \
..\..\..\inc; \
$(WINCORE_OBJ_PATH)\console\dep\$(O)\vpack; \
$(CONSOLE_SRC_PATH)\..\oss\dynamic_bitset; \
$(CONSOLE_SRC_PATH)\..\oss\libpopcnt; \
$(CONSOLE_SRC_PATH)\..\oss\chromium; \
$(CONSOLE_SRC_PATH)\..\oss\fmt\include; \
$(INCLUDES) \
TARGETLIBS = \

View file

@ -33,7 +33,7 @@ Run the test:
- Run with no arguments to see the order in which processes are signaled.
- Run `closetest.exe -d alternate --gap -n 4` to require multiple Close
button clicks.
- Observe the "closetest: child nnn: attached to console" messages in DbgView
- Observe the "closetest: child ###: attached to console" messages in DbgView
- Click the console's Close button.
- Observe the `CTRL_CLOSE_EVENT` messages in DbgView.
DETAILS: