From 93b7747cb19c1cbe31fd8df6674ab26767a733d2 Mon Sep 17 00:00:00 2001 From: Dustin Howett Date: Tue, 16 Jul 2019 17:22:09 -0700 Subject: [PATCH 1/4] Roll up dependencies under WindowsTerminal.vcxproj --- .../WindowsTerminal/WindowsTerminal.vcxproj | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/cascadia/WindowsTerminal/WindowsTerminal.vcxproj b/src/cascadia/WindowsTerminal/WindowsTerminal.vcxproj index c5d619d4f28..8d0c27acc9d 100644 --- a/src/cascadia/WindowsTerminal/WindowsTerminal.vcxproj +++ b/src/cascadia/WindowsTerminal/WindowsTerminal.vcxproj @@ -155,4 +155,27 @@ + + + + <_ContinueOnError Condition="'$(BuildingProject)' == 'true'">true + <_ContinueOnError Condition="'$(BuildingProject)' != 'true'">false + + + + + + + + + + From 1a01465be80fcf93b912f736422779c41b15dd00 Mon Sep 17 00:00:00 2001 From: Dustin Howett Date: Tue, 16 Jul 2019 17:24:02 -0700 Subject: [PATCH 2/4] Remove all our weird dependency hacks --- .../CascadiaPackage/CascadiaPackage.wapproj | 29 ++++-------- src/cascadia/TerminalApp/TerminalApp.vcxproj | 23 +++++++--- .../WindowsTerminal/WindowsTerminal.vcxproj | 45 +------------------ 3 files changed, 26 insertions(+), 71 deletions(-) diff --git a/src/cascadia/CascadiaPackage/CascadiaPackage.wapproj b/src/cascadia/CascadiaPackage/CascadiaPackage.wapproj index f17debf7b3b..5d2c3c57a28 100644 --- a/src/cascadia/CascadiaPackage/CascadiaPackage.wapproj +++ b/src/cascadia/CascadiaPackage/CascadiaPackage.wapproj @@ -260,24 +260,6 @@ - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - @@ -286,8 +268,13 @@ This task will copy OpenConsole.exe to the appx as conhost.exe, and place it adjacent to WindowsTerminal.exe. --> - + + <_FilteredNonWapProjProjectOutput Include="@(PackagingOutputs)" Condition="'%(Extension)' != '.pri' AND + '%(PackagingOutputs.OutputGroup)' != 'GetResolvedSDKReferences' AND + '%(PackagingOutputs.OutputGroup)' != '_GetProjectArchitecture' AND + '%(PackagingOutputs.OutputGroup)' != 'EmbedOutputGroupForPackaging'"/> + <_TemporaryFilteredWapProjOutput Include="@(_FilteredNonWapProjProjectOutput)" /> <_FilteredNonWapProjProjectOutput Remove="@(_TemporaryFilteredWapProjOutput)" /> @@ -308,16 +295,16 @@ Since PRI file generation is _before_ manifest generation (for possibly obvious or important reasons), that doesn't work for us. - --> <_GenerateProjectPriFileDependsOn>OpenConsoleLiftDesktopBridgePriFiles;$(_GenerateProjectPriFileDependsOn) <_PriFile Include="@(_NonWapProjProjectOutput)" Condition="'%(Extension)' == '.pri'" /> - + + --> diff --git a/src/cascadia/TerminalApp/TerminalApp.vcxproj b/src/cascadia/TerminalApp/TerminalApp.vcxproj index 2a38ed959d8..b07b3b58cf3 100644 --- a/src/cascadia/TerminalApp/TerminalApp.vcxproj +++ b/src/cascadia/TerminalApp/TerminalApp.vcxproj @@ -77,12 +77,6 @@ - - - <_BinRoot Condition="'$(Platform)' != 'Win32'">$(OpenConsoleDir)$(Platform)\$(Configuration)\ - <_BinRoot Condition="'$(Platform)' == 'Win32'">$(OpenConsoleDir)$(Configuration)\ - - - - - true - PreserveNewest - - - - - true - PreserveNewest - - - - - - - + - - - - - - <_BinRoot Condition="'$(Platform)' != 'Win32'">$(OpenConsoleDir)$(Platform)\$(Configuration)\ - <_BinRoot Condition="'$(Platform)' == 'Win32'">$(OpenConsoleDir)$(Configuration)\ - - - - - - $(_BinRoot)\TerminalApp\TerminalApp.winmd - true - false - false - - - - true - $(OpenConsoleDir)\dep\jsoncpp\json;%(AdditionalIncludeDirectories); @@ -96,22 +88,4 @@ - - - - <_TerminalAppLibProjectReference Include="@(_ResolvedProjectReferencePaths)" Condition="'%(Filename)' == 'TerminalApp'" /> - <_ResolvedProjectReferencePaths Remove="@(_TerminalAppLibProjectReference)" /> - <_ResolvedProjectReferencePaths Include="@(_TerminalAppLibProjectReference)"> - - - - - - - - <_ResolvedProjectReferencePaths Remove="@(_TerminalAppLibProjectReference)" /> - <_ResolvedProjectReferencePaths Include="@(_TerminalAppLibProjectReference)" /> - - - diff --git a/src/cascadia/TerminalApp/lib/TerminalAppLib.vcxproj b/src/cascadia/TerminalApp/lib/TerminalAppLib.vcxproj index acffbbbf132..87aef62aa0a 100644 --- a/src/cascadia/TerminalApp/lib/TerminalAppLib.vcxproj +++ b/src/cascadia/TerminalApp/lib/TerminalAppLib.vcxproj @@ -202,15 +202,6 @@ 10.0.17763.0 - - - true - - diff --git a/src/cascadia/TerminalConnection/TerminalConnection.vcxproj b/src/cascadia/TerminalConnection/TerminalConnection.vcxproj index d7edead559d..b365b57fc45 100644 --- a/src/cascadia/TerminalConnection/TerminalConnection.vcxproj +++ b/src/cascadia/TerminalConnection/TerminalConnection.vcxproj @@ -64,14 +64,6 @@ - - - true - diff --git a/src/cascadia/TerminalControl/TerminalControl.vcxproj b/src/cascadia/TerminalControl/TerminalControl.vcxproj index 1fd40b42984..45423c499e0 100644 --- a/src/cascadia/TerminalControl/TerminalControl.vcxproj +++ b/src/cascadia/TerminalControl/TerminalControl.vcxproj @@ -62,14 +62,6 @@ $(OpenConsoleDir)src\types\inc;%(AdditionalIncludeDirectories) - - - true - diff --git a/src/cascadia/TerminalSettings/TerminalSettings.vcxproj b/src/cascadia/TerminalSettings/TerminalSettings.vcxproj index b40d1d8ae43..dcdbd8ff462 100644 --- a/src/cascadia/TerminalSettings/TerminalSettings.vcxproj +++ b/src/cascadia/TerminalSettings/TerminalSettings.vcxproj @@ -48,14 +48,6 @@ - - - true - diff --git a/src/cascadia/WindowsTerminal/WindowsTerminal.vcxproj b/src/cascadia/WindowsTerminal/WindowsTerminal.vcxproj index b3cb1a490b9..30323e9269f 100644 --- a/src/cascadia/WindowsTerminal/WindowsTerminal.vcxproj +++ b/src/cascadia/WindowsTerminal/WindowsTerminal.vcxproj @@ -89,10 +89,6 @@ WindowsLocalDebugger - - - true - diff --git a/src/common.build.post.props b/src/common.build.post.props index 5539b05eed4..b5caebf23bd 100644 --- a/src/common.build.post.props +++ b/src/common.build.post.props @@ -1,12 +1,8 @@  - + the project. --> + $(SolutionDir)\bin\$(Platform)\$(Configuration)\ $(SolutionDir)\obj\$(Platform)\$(Configuration)\$(ProjectName)\ diff --git a/src/cppwinrt.build.post.props b/src/cppwinrt.build.post.props index 38b012cb9ec..2ce1ad307aa 100644 --- a/src/cppwinrt.build.post.props +++ b/src/cppwinrt.build.post.props @@ -1,45 +1,11 @@ - - - $(OpenConsoleDir)\bin\$(Platform)\$(Configuration)\$(ProjectName)\ - $(OpenConsoleDir)\bin\$(Platform)\$(Configuration)\$(ProjectName)\ - $(OpenConsoleDir)\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(OutDir) - - - - - echo OutDir=$(OutDir) - (xcopy /Y "$(OutDir)$(ProjectName).dll" "$(OpenConsoleDir)$(Platform)\$(Configuration)\$(ProjectName).dll*" ) - (xcopy /Y "$(OutDir)$(ProjectName).pdb" "$(OpenConsoleDir)$(Platform)\$(Configuration)\$(ProjectName).pdb*" ) - - - - - echo OutDir=$(OutDir) - (xcopy /Y "$(OutDir)$(ProjectName).dll" "$(OpenConsoleDir)$(Configuration)\$(ProjectName).dll*" ) - (xcopy /Y "$(OutDir)$(ProjectName).pdb" "$(OpenConsoleDir)$(Configuration)\$(ProjectName).pdb*" ) - - - - - false false + + $(SolutionDir)\bin\$(Platform)\$(Configuration)\$(ProjectName)\ + $(SolutionDir)\obj\$(Platform)\$(Configuration)\$(ProjectName)\ CA5CAD1A-224A-4171-B13A-F16E576FDD12 diff --git a/src/cascadia/TerminalApp/App.cpp b/src/cascadia/TerminalApp/App.cpp index e0ef0a96b52..28262594a20 100644 --- a/src/cascadia/TerminalApp/App.cpp +++ b/src/cascadia/TerminalApp/App.cpp @@ -153,6 +153,7 @@ namespace winrt::TerminalApp::implementation // Display the dialog. Controls::ContentDialogResult result = co_await dialog.ShowAsync(Controls::ContentDialogPlacement::Popup); + (void)result; // After the dialog is dismissed, the dialog lock (held by `lock`) will // be released so another can be shown. @@ -1076,7 +1077,7 @@ namespace winrt::TerminalApp::implementation // Arguments: // - sender: the control that originated this event // - eventArgs: the event's constituent arguments - void App::_OnTabSelectionChanged(const IInspectable& sender, const Controls::SelectionChangedEventArgs& eventArgs) + void App::_OnTabSelectionChanged(const IInspectable& sender, const Controls::SelectionChangedEventArgs& /* eventArgs */) { auto tabView = sender.as(); auto selectedIndex = tabView.SelectedIndex(); @@ -1111,7 +1112,7 @@ namespace winrt::TerminalApp::implementation // Arguments: // - sender: the control that originated this event // - eventArgs: the event's constituent arguments - void App::_OnTabClosing(const IInspectable& sender, const MUX::Controls::TabViewTabClosingEventArgs& eventArgs) + void App::_OnTabClosing(const IInspectable& /* sender */, const MUX::Controls::TabViewTabClosingEventArgs& eventArgs) { const auto tabViewItem = eventArgs.Item(); _RemoveTabViewItem(tabViewItem); @@ -1126,7 +1127,7 @@ namespace winrt::TerminalApp::implementation // Arguments: // - sender: the control that originated this event // - eventArgs: the event's constituent arguments - void App::_OnTabItemsChanged(const IInspectable& sender, const Windows::Foundation::Collections::IVectorChangedEventArgs& eventArgs) + void App::_OnTabItemsChanged(const IInspectable& /* sender */, const Windows::Foundation::Collections::IVectorChangedEventArgs& /* eventArgs */) { _UpdateTabView(); } @@ -1204,11 +1205,11 @@ namespace winrt::TerminalApp::implementation _tabs.erase(_tabs.begin() + tabIndexFromControl); _tabView.Items().RemoveAt(tabIndexFromControl); - if (tabIndexFromControl == focusedTabIndex) + if (static_cast(tabIndexFromControl) == focusedTabIndex) { if (focusedTabIndex >= _tabs.size()) { - focusedTabIndex = _tabs.size() - 1; + focusedTabIndex = gsl::narrow_cast(_tabs.size() - 1); } if (focusedTabIndex < 0) diff --git a/src/cascadia/TerminalApp/MinMaxCloseControl.cpp b/src/cascadia/TerminalApp/MinMaxCloseControl.cpp index 8706851e25b..0bfa6f39979 100644 --- a/src/cascadia/TerminalApp/MinMaxCloseControl.cpp +++ b/src/cascadia/TerminalApp/MinMaxCloseControl.cpp @@ -48,17 +48,17 @@ namespace winrt::TerminalApp::implementation } } - void MinMaxCloseControl::Maximize_Click(winrt::Windows::Foundation::IInspectable const& sender, winrt::Windows::UI::Xaml::RoutedEventArgs const& e) + void MinMaxCloseControl::Maximize_Click(winrt::Windows::Foundation::IInspectable const& /*sender*/, winrt::Windows::UI::Xaml::RoutedEventArgs const& /*e*/) { _OnMaximize(HTMAXBUTTON); } - void MinMaxCloseControl::DragBar_DoubleTapped(winrt::Windows::Foundation::IInspectable const& sender, winrt::Windows::UI::Xaml::Input::DoubleTappedRoutedEventArgs const& e) + void MinMaxCloseControl::DragBar_DoubleTapped(winrt::Windows::Foundation::IInspectable const& /*sender*/, winrt::Windows::UI::Xaml::Input::DoubleTappedRoutedEventArgs const& /*e*/) { _OnMaximize(HTCAPTION); } - void MinMaxCloseControl::Minimize_Click(winrt::Windows::Foundation::IInspectable const& sender, winrt::Windows::UI::Xaml::RoutedEventArgs const& e) + void MinMaxCloseControl::Minimize_Click(winrt::Windows::Foundation::IInspectable const& /*sender*/, winrt::Windows::UI::Xaml::RoutedEventArgs const& /*e*/) { if (_window) { @@ -66,7 +66,7 @@ namespace winrt::TerminalApp::implementation } } - void MinMaxCloseControl::Close_Click(winrt::Windows::Foundation::IInspectable const& sender, winrt::Windows::UI::Xaml::RoutedEventArgs const& e) + void MinMaxCloseControl::Close_Click(winrt::Windows::Foundation::IInspectable const& /*sender*/, winrt::Windows::UI::Xaml::RoutedEventArgs const& /*e*/) { ::PostQuitMessage(0); } diff --git a/src/cascadia/TerminalApp/TerminalApp.vcxproj b/src/cascadia/TerminalApp/TerminalApp.vcxproj index a041965d34f..c05b5e78ec8 100644 --- a/src/cascadia/TerminalApp/TerminalApp.vcxproj +++ b/src/cascadia/TerminalApp/TerminalApp.vcxproj @@ -88,4 +88,22 @@ + + + + + <_TerminalAppLibProjectReference Include="@(_ResolvedProjectReferencePaths)" Condition="'%(Filename)' == 'TerminalApp'" /> + <_ResolvedProjectReferencePaths Remove="@(_TerminalAppLibProjectReference)" /> + <_ResolvedProjectReferencePaths Include="@(_TerminalAppLibProjectReference)"> + + + + + + + + <_ResolvedProjectReferencePaths Remove="@(_TerminalAppLibProjectReference)" /> + <_ResolvedProjectReferencePaths Include="@(_TerminalAppLibProjectReference)" /> + + diff --git a/src/cascadia/TerminalApp/lib/TerminalAppLib.vcxproj b/src/cascadia/TerminalApp/lib/TerminalAppLib.vcxproj index 87aef62aa0a..89cebfcea0f 100644 --- a/src/cascadia/TerminalApp/lib/TerminalAppLib.vcxproj +++ b/src/cascadia/TerminalApp/lib/TerminalAppLib.vcxproj @@ -139,8 +139,7 @@ - <_BinRoot Condition="'$(Platform)' != 'Win32'">$(OpenConsoleDir)$(Platform)\$(Configuration)\ - <_BinRoot Condition="'$(Platform)' == 'Win32'">$(OpenConsoleDir)$(Configuration)\ + <_BinRoot>$(OpenConsoleDir)bin\$(Platform)\$(Configuration)\ diff --git a/src/cascadia/TerminalControl/TermControl.cpp b/src/cascadia/TerminalControl/TermControl.cpp index 283208f9300..7edc6789ad5 100644 --- a/src/cascadia/TerminalControl/TermControl.cpp +++ b/src/cascadia/TerminalControl/TermControl.cpp @@ -917,7 +917,7 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation _scrollBar.Value(static_cast(newValue)); } - void TermControl::_ScrollbarChangeHandler(Windows::Foundation::IInspectable const& sender, + void TermControl::_ScrollbarChangeHandler(Windows::Foundation::IInspectable const& /*sender*/, Controls::Primitives::RangeBaseValueChangedEventArgs const& args) { const auto newValue = args.NewValue(); diff --git a/src/common.build.post.props b/src/common.build.post.props index b5caebf23bd..f1770c7b8fe 100644 --- a/src/common.build.post.props +++ b/src/common.build.post.props @@ -3,7 +3,6 @@ - $(SolutionDir)\bin\$(Platform)\$(Configuration)\ $(SolutionDir)\obj\$(Platform)\$(Configuration)\$(ProjectName)\ diff --git a/src/common.build.pre.props b/src/common.build.pre.props index fc3c97c08da..210bd47979a 100644 --- a/src/common.build.pre.props +++ b/src/common.build.pre.props @@ -1,5 +1,12 @@ + + + $(SolutionDir)\bin\$(Platform)\$(Configuration)\ + $(OutDir) + + diff --git a/src/cppwinrt.build.post.props b/src/cppwinrt.build.post.props index 2ce1ad307aa..ce3a2e90e43 100644 --- a/src/cppwinrt.build.post.props +++ b/src/cppwinrt.build.post.props @@ -1,11 +1,5 @@ - - - - $(OutDir) - - - - - 10.0.18362.0 - 10.0.18362.0 - true - true - en-US - 14.0 - 10.0 - - + + + 10.0.18362.0 + true + true + 10.0 + en-US + + - Use pch.h $(IntDir)pch.pch Level4 - %(AdditionalOptions) /permissive- /bigobj /Zc:twoPhase- /std:c++17 + %(AdditionalOptions) /permissive- /bigobj /Zc:twoPhase- 28204 _WINRT_DLL;%(PreprocessorDefinitions) $(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories) - Console true $(ProjectName).def - - - Disabled - - - - - - - true - - - true - true - - - - - $(OpenConsoleDir)\src\inc;$(OpenConsoleDir)\dep;$(OpenConsoleDir)\dep\Console;$(OpenConsoleDir)\dep\gsl\include;$(OpenConsoleDir)\dep\wil\include;%(AdditionalIncludeDirectories) - WindowsApp.lib;%(AdditionalDependencies) false