Skip to content

Commit

Permalink
Upgrade MUXC project to latest C++/WinRT (#1730)
Browse files Browse the repository at this point in the history
  • Loading branch information
jevansaks authored and ranjeshj committed Feb 11, 2020
1 parent 659887c commit 8bfcac7
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion dev/Generated/FontIconSource.properties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void FontIconSourceProperties::EnsureProperties()
winrt::name_of<winrt::FontFamily>(),
winrt::name_of<winrt::FontIconSource>(),
false /* isAttached */,
ValueHelper<winrt::FontFamily>::BoxValueIfNecessary({ c_fontIconSourceDefaultFontFamily }),
ValueHelper<winrt::FontFamily>::BoxValueIfNecessary(winrt::FontFamily{ c_fontIconSourceDefaultFontFamily }),
nullptr);
}
if (!s_FontSizeProperty)
Expand Down
6 changes: 3 additions & 3 deletions dev/IconSource/IconSource.idl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace MU_XC_NAMESPACE
namespace MU_XC_NAMESPACE
{

[WUXC_VERSION_RS3]
Expand Down Expand Up @@ -40,7 +40,7 @@ unsealed runtimeclass FontIconSource : IconSource
String Glyph { get; set; };
[MUX_DEFAULT_VALUE("20.0")]
Double FontSize { get; set; };
[MUX_DEFAULT_VALUE("{ c_fontIconSourceDefaultFontFamily }")]
[MUX_DEFAULT_VALUE("winrt::FontFamily{ c_fontIconSourceDefaultFontFamily }")]
Windows.UI.Xaml.Media.FontFamily FontFamily { get; set; };
[MUX_DEFAULT_VALUE("{ 400 }")]
Windows.UI.Text.FontWeight FontWeight { get; set; };
Expand Down Expand Up @@ -90,4 +90,4 @@ unsealed runtimeclass PathIconSource : IconSource
static Windows.UI.Xaml.DependencyProperty DataProperty { get; };
}

}
}
2 changes: 1 addition & 1 deletion dev/PullToRefresh/RefreshContainer/RefreshContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ void RefreshContainer::RaiseRefreshRequested()
PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
com_ptr<RefreshContainer> strongThis = get_strong();

winrt::DeferralCompletedHandler instance{ [strongThis]()
winrt::Deferral instance{ [strongThis]()
{
strongThis->CheckThread();
strongThis->RefreshCompleted();
Expand Down
2 changes: 1 addition & 1 deletion dev/PullToRefresh/RefreshVisualizer/RefreshVisualizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ void RefreshVisualizer::RaiseRefreshRequested()
PTR_TRACE_INFO(nullptr, TRACE_MSG_METH, METH_NAME, this);
com_ptr<RefreshVisualizer> strongThis = get_strong();

winrt::DeferralCompletedHandler instance{ [strongThis]()
winrt::Deferral instance{ [strongThis]()
{
strongThis->CheckThread();
strongThis->RefreshCompleted();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ winrt::Deferral RefreshRequestedEventArgs::GetDeferral()

com_ptr<RefreshRequestedEventArgs> strongThis = get_strong();

winrt::DeferralCompletedHandler instance{ [strongThis]()
winrt::Deferral instance{ [strongThis]()
{
strongThis->CheckThread();
strongThis->DecrementDeferralCount();
Expand Down
2 changes: 1 addition & 1 deletion dev/TeachingTip/TeachingTip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1235,7 +1235,7 @@ void TeachingTip::RaiseClosingEvent(bool attachDeferralCompletedHandler)

if (attachDeferralCompletedHandler)
{
winrt::DeferralCompletedHandler instance{ [strongThis = get_strong(), args]()
winrt::Deferral instance{ [strongThis = get_strong(), args]()
{
strongThis->CheckThread();
if (!args->Cancel())
Expand Down
2 changes: 1 addition & 1 deletion dev/TeachingTip/TeachingTipClosingEventArgs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ winrt::Deferral TeachingTipClosingEventArgs::GetDeferral()

com_ptr<TeachingTipClosingEventArgs> strongThis = get_strong();

winrt::DeferralCompletedHandler instance{ [strongThis]()
winrt::Deferral instance{ [strongThis]()
{
strongThis->CheckThread();
strongThis->DecrementDeferralCount();
Expand Down
12 changes: 6 additions & 6 deletions dev/dll/Microsoft.UI.Xaml.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. See LICENSE in the project root for license information. -->
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildProjectDirectory)\..\..\FeatureAreas.props" />
<Import Project="..\..\packages\Microsoft.Windows.CppWinRT.2.0.190722.3\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.190722.3\build\native\Microsoft.Windows.CppWinRT.props')" />
<Import Project="..\..\packages\Microsoft.Windows.CppWinRT.2.0.191202.6\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.191202.6\build\native\Microsoft.Windows.CppWinRT.props')" />
<Import Project="..\..\packages\Microsoft.SourceLink.GitHub.1.0.0-beta2-18618-05\build\Microsoft.SourceLink.GitHub.props" Condition="Exists('..\..\packages\Microsoft.SourceLink.GitHub.1.0.0-beta2-18618-05\build\Microsoft.SourceLink.GitHub.props')" />
<Import Project="..\..\packages\Microsoft.SourceLink.Common.1.0.0-beta2-18618-05\build\Microsoft.SourceLink.Common.props" Condition="Exists('..\..\packages\Microsoft.SourceLink.Common.1.0.0-beta2-18618-05\build\Microsoft.SourceLink.Common.props')" />
<Import Project="..\..\packages\Microsoft.Build.Tasks.Git.1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.props" Condition="Exists('..\..\packages\Microsoft.Build.Tasks.Git.1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.props')" />
Expand Down Expand Up @@ -432,7 +432,7 @@
<Import Project="..\..\packages\Microsoft.Build.Tasks.Git.1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets" Condition="Exists('..\..\packages\Microsoft.Build.Tasks.Git.1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets')" />
<Import Project="..\..\packages\Microsoft.SourceLink.Common.1.0.0-beta2-18618-05\build\Microsoft.SourceLink.Common.targets" Condition="Exists('..\..\packages\Microsoft.SourceLink.Common.1.0.0-beta2-18618-05\build\Microsoft.SourceLink.Common.targets')" />
<Import Project="..\..\packages\Microsoft.SourceLink.GitHub.1.0.0-beta2-18618-05\build\Microsoft.SourceLink.GitHub.targets" Condition="Exists('..\..\packages\Microsoft.SourceLink.GitHub.1.0.0-beta2-18618-05\build\Microsoft.SourceLink.GitHub.targets')" />
<Import Project="..\..\packages\Microsoft.Windows.CppWinRT.2.0.190722.3\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.190722.3\build\native\Microsoft.Windows.CppWinRT.targets')" />
<Import Project="..\..\packages\Microsoft.Windows.CppWinRT.2.0.191202.6\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.191202.6\build\native\Microsoft.Windows.CppWinRT.targets')" />
<Import Project="..\..\packages\MUXPGODatabase.0.0.2\build\MUXPGODatabase.targets" Condition="Exists('..\..\packages\MUXPGODatabase.0.0.2\build\MUXPGODatabase.targets')" />
</ImportGroup>
<PropertyGroup>
Expand Down Expand Up @@ -624,8 +624,8 @@
<Target Name="MakeSDKMetadata" AfterTargets="CppWinRTMergeProjectWinMDInputs" BeforeTargets="XamlMetadataCodeGenMUX" Inputs="$(OutDir)Unmerged\Microsoft.UI.Xaml.winmd" Outputs="$(OutDir)sdk\Microsoft.UI.xaml.winmd">
<PropertyGroup>
<MdMergeExe>"$(WindowsSdkDir)bin\$(WindowsTargetPlatformVersion)\$(PreferredToolArchitecture)\mdmerge.exe"</MdMergeExe>
<_MdMergeParameters>-v @(_MdMergeRefsDistinct->'-metadata_dir "%(RelativeDir)."', ' ')</_MdMergeParameters>
<_MdMergeParameters>$(_MdMergeParameters) -o "$(OutDir)\sdk" -i "$(CppWinRTUnmergedDir)" -partial -n:3 -createPublicMetadata -transformExperimental:transform</_MdMergeParameters>
<_MdMergeParameters>-v @(CppWinRTMdMergeMetadataDirectories->'-metadata_dir &quot;%(RelativeDir).&quot;', ' ')</_MdMergeParameters>
<_MdMergeParameters>$(_MdMergeParameters) -o "$(OutDir)\sdk" @(CppWinRTMdMergeInputs->'-i &quot;%(Identity)&quot;', ' ') -partial -n:3 -createPublicMetadata -transformExperimental:transform</_MdMergeParameters>
</PropertyGroup>
<Exec Command="$(MdMergeExe) $(_MdMergeParameters)" />
</Target>
Expand Down Expand Up @@ -661,8 +661,8 @@
<Error Condition="!Exists('..\..\packages\Microsoft.SourceLink.Common.1.0.0-beta2-18618-05\build\Microsoft.SourceLink.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.SourceLink.Common.1.0.0-beta2-18618-05\build\Microsoft.SourceLink.Common.targets'))" />
<Error Condition="!Exists('..\..\packages\Microsoft.SourceLink.GitHub.1.0.0-beta2-18618-05\build\Microsoft.SourceLink.GitHub.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.SourceLink.GitHub.1.0.0-beta2-18618-05\build\Microsoft.SourceLink.GitHub.props'))" />
<Error Condition="!Exists('..\..\packages\Microsoft.SourceLink.GitHub.1.0.0-beta2-18618-05\build\Microsoft.SourceLink.GitHub.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.SourceLink.GitHub.1.0.0-beta2-18618-05\build\Microsoft.SourceLink.GitHub.targets'))" />
<Error Condition="!Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.190722.3\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Windows.CppWinRT.2.0.190722.3\build\native\Microsoft.Windows.CppWinRT.props'))" />
<Error Condition="!Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.190722.3\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Windows.CppWinRT.2.0.190722.3\build\native\Microsoft.Windows.CppWinRT.targets'))" />
<Error Condition="!Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.191202.6\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Windows.CppWinRT.2.0.191202.6\build\native\Microsoft.Windows.CppWinRT.props'))" />
<Error Condition="!Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.191202.6\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Windows.CppWinRT.2.0.191202.6\build\native\Microsoft.Windows.CppWinRT.targets'))" />
</Target>
<Target Name="RunBinSkim" AfterTargets="AfterBuild" Condition="'$(Configuration)'=='Release'">
<PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion dev/dll/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<package id="Microsoft.Gsl" version="0.1.2.1" targetFramework="native" />
<package id="Microsoft.SourceLink.Common" version="1.0.0-beta2-18618-05" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.GitHub" version="1.0.0-beta2-18618-05" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.190722.3" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.191202.6" targetFramework="native" />
<package id="MUXCustomBuildTasks" version="1.0.47" targetFramework="native" />
<package id="MUXPGODatabase" version="0.0.2" targetFramework="native" />
</packages>

0 comments on commit 8bfcac7

Please sign in to comment.