Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport project file changes from 2.7 release. #5946

Merged
merged 12 commits into from
Sep 22, 2021
Merged
1 change: 1 addition & 0 deletions dev/WebView2/WebView2.vcxitems
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory);$(XamlPublicHeadersPath);$(LiftedIXPIncludePaths)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);WEBVIEW2_INCLUDED</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions test/TestAppCX/MainPage.xaml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "CornerRadiusTestPage.xaml.h"
#include "TreeViewTestPage.xaml.h"
#include "BackdropMaterialTestPage.xaml.h"
#ifndef _ARM_
#ifdef WEBVIEW2_INCLUDED
#include "WebView2TestPage.xaml.h"
#endif

Expand Down Expand Up @@ -76,7 +76,7 @@ void TestAppCX::MainPage::GoToBackdropMaterialTestPage(Platform::Object^ sender,
void TestAppCX::MainPage::GoToWebView2TestPage(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
{
auto app = dynamic_cast<App^>(Application::Current);
#ifndef _ARM_
#ifdef WEBVIEW2_INCLUDED
app->RootFrame->Navigate(TypeName(WebView2TestPage::typeid), nullptr);
#endif
}
19 changes: 14 additions & 5 deletions test/TestAppCX/TestAppCX.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<Import Project="$(MSBuildProjectDirectory)\..\..\mux.controls.props" Condition="Exists('$(MSBuildProjectDirectory)\..\..\mux.controls.props') And $(BuildingWithBuildExe) != 'true'" />
<Import Project="$(MSBuildProjectDirectory)\..\..\environment.props" />
<Import Project="$(MSBuildProjectDirectory)\..\..\SdkVersion.props" Condition="$(BuildingWithBuildExe) == 'true'" />
<Import Project="$(MSBuildProjectDirectory)\..\..\FeatureAreas.props" />
<PropertyGroup Label="Globals">
<ProjectGuid>{92081f61-98bb-4105-a90f-b6d524b4f5c9}</ProjectGuid>
<RootNamespace>TestAppCX</RootNamespace>
Expand Down Expand Up @@ -129,55 +130,63 @@
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<DisableSpecificWarnings>4453;28204;4691</DisableSpecificWarnings>
<TreatWarningAsError>true</TreatWarningAsError>
<PreprocessorDefinitions Condition="$(FeatureWebView2Enabled) == 'true'">%(PreprocessorDefinitions);WEBVIEW2_INCLUDED</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<ClCompile>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<DisableSpecificWarnings>4453;28204;4691</DisableSpecificWarnings>
<TreatWarningAsError>true</TreatWarningAsError>
<PreprocessorDefinitions Condition="$(FeatureWebView2Enabled) == 'true'">%(PreprocessorDefinitions);WEBVIEW2_INCLUDED</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<DisableSpecificWarnings>4453;28204;4691</DisableSpecificWarnings>
<TreatWarningAsError>true</TreatWarningAsError>
<PreprocessorDefinitions Condition="$(FeatureWebView2Enabled) == 'true'">%(PreprocessorDefinitions);WEBVIEW2_INCLUDED</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<DisableSpecificWarnings>4453;28204;4691</DisableSpecificWarnings>
<TreatWarningAsError>true</TreatWarningAsError>
<PreprocessorDefinitions Condition="$(FeatureWebView2Enabled) == 'true'">%(PreprocessorDefinitions);WEBVIEW2_INCLUDED</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<DisableSpecificWarnings>4453;28204;4691</DisableSpecificWarnings>
<TreatWarningAsError>true</TreatWarningAsError>
<PreprocessorDefinitions Condition="$(FeatureWebView2Enabled) == 'true'">%(PreprocessorDefinitions);WEBVIEW2_INCLUDED</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<DisableSpecificWarnings>4453;28204;4691</DisableSpecificWarnings>
<TreatWarningAsError>true</TreatWarningAsError>
<PreprocessorDefinitions Condition="$(FeatureWebView2Enabled) == 'true'">%(PreprocessorDefinitions);WEBVIEW2_INCLUDED</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|arm64'">
<ClCompile>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
<TreatWarningAsError>true</TreatWarningAsError>
<PreprocessorDefinitions Condition="$(FeatureWebView2Enabled) == 'true'">%(PreprocessorDefinitions);WEBVIEW2_INCLUDED</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|arm64'">
<ClCompile>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
<TreatWarningAsError>true</TreatWarningAsError>
<PreprocessorDefinitions Condition="$(FeatureWebView2Enabled) == 'true'">%(PreprocessorDefinitions);WEBVIEW2_INCLUDED</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
Expand All @@ -203,7 +212,7 @@
<ClInclude Include="TreeViewTestPage.xaml.h">
<DependentUpon>TreeViewTestPage.xaml</DependentUpon>
</ClInclude>
<ClInclude Include="WebView2TestPage.xaml.h">
<ClInclude Include="WebView2TestPage.xaml.h" Condition="$(FeatureWebView2Enabled) == 'true'">
<DependentUpon>WebView2TestPage.xaml</DependentUpon>
</ClInclude>
</ItemGroup>
Expand All @@ -229,7 +238,7 @@
<Page Include="TreeViewTestPage.xaml">
<SubType>Designer</SubType>
</Page>
<Page Include="WebView2TestPage.xaml">
<Page Include="WebView2TestPage.xaml" Condition="$(FeatureWebView2Enabled) == 'true'">
<SubType>Designer</SubType>
</Page>
</ItemGroup>
Expand Down Expand Up @@ -281,7 +290,7 @@
<ClCompile Include="TreeViewTestPage.xaml.cpp">
<DependentUpon>TreeViewTestPage.xaml</DependentUpon>
</ClCompile>
<ClCompile Include="WebView2TestPage.xaml.cpp">
<ClCompile Include="WebView2TestPage.xaml.cpp" Condition="$(FeatureWebView2Enabled) == 'true'">
<DependentUpon>WebView2TestPage.xaml</DependentUpon>
</ClCompile>
</ItemGroup>
Expand All @@ -292,13 +301,13 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<Import Project="..\RetargetCopyLocalFiles.targets" />
<ImportGroup Label="ExtensionTargets">
<ImportGroup Label="ExtensionTargets" Condition="$(FeatureWebView2Enabled) == 'true'">
<Import Project="..\..\packages\Microsoft.Web.WebView2.1.0.1018-prerelease\build\native\Microsoft.Web.WebView2.targets" Condition="Exists('..\..\packages\Microsoft.Web.WebView2.1.0.1018-prerelease\build\native\Microsoft.Web.WebView2.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>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}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\Microsoft.Web.WebView2.1.0.1018-prerelease\build\native\Microsoft.Web.WebView2.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Web.WebView2.1.0.1018-prerelease\build\native\Microsoft.Web.WebView2.targets'))" />
<Error Condition="$(FeatureWebView2Enabled) == 'true' And !Exists('..\..\packages\Microsoft.Web.WebView2.1.0.1018-prerelease\build\native\Microsoft.Web.WebView2.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Web.WebView2.1.0.1018-prerelease\build\native\Microsoft.Web.WebView2.targets'))" />
</Target>
</Project>