Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion eng/WpfArcadeSdk/Sdk/Sdk.props
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@
Properly calculates the RuntimeIdentifier based on the Platform type. We don't want to affect the build by actually setting RuntimeIdentifier.
Those that are interested in setting the RuntimeIdentifier or having a property that mirrors it can use this one here.
-->
<WpfRuntimeIdentifier Condition="('$(Platform)'!='AnyCPU' and '$(Platform)'!='Win32') Or $(Platform.EndsWith('64'))">win-$(Platform)</WpfRuntimeIdentifier>
<WpfRuntimeIdentifier Condition="('$(Platform)'!='AnyCPU' and '$(Platform)'!='Win32') Or $(Platform.EndsWith('x64'))">win-$(Platform)</WpfRuntimeIdentifier>
<WpfRuntimeIdentifier Condition="'$(Platform)'=='AnyCPU' or '$(Platform)'=='Win32' or '$(Platform)'=='x86'">win-x86</WpfRuntimeIdentifier>
<WpfRuntimeIdentifier Condition="'$(Platform)'=='ARM64'">win-arm64</WpfRuntimeIdentifier>
</PropertyGroup>

<Import Project="$(WpfArcadeSdkToolsDir)RuntimeFrameworkReference.props"/>
Expand Down
2 changes: 1 addition & 1 deletion eng/WpfArcadeSdk/tools/AddDrtsToPayload.targets
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
-->
<PropertyGroup>
<!-- AnyCPU/x86 builds don't produce an output folder in artifacts. This only exists for x64 builds. -->
<PlatformFolder Condition="'$(Platform)'=='x64'">x64</PlatformFolder>
<PlatformFolder Condition="'$(Platform)'!='AnyCPU' AND '$(Platform)'!='x86'">$(Platform)</PlatformFolder>

<!-- For the test payload, we default to x86 for AnyCPU platform. -->
<PayloadBaseLocation>$(RepoRoot)artifacts\test\$(Configuration)\$(Platform)\</PayloadBaseLocation>
Expand Down
5 changes: 5 additions & 0 deletions eng/WpfArcadeSdk/tools/InjectModuleInitializer.targets
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@
<ILDAsmPath>$(Pkgruntime_win-x64_Microsoft_NETCore_ILDAsm)\runtimes\$(WpfRuntimeIdentifier)\native\</ILDAsmPath>
<ILAsmPath>$(Pkgruntime_win-x64_Microsoft_NETCore_ILAsm)\runtimes\$(WpfRuntimeIdentifier)\native\</ILAsmPath>
<CoreCLRPath>$(Pkgruntime_win-x64_Microsoft_NETCore_Runtime_CoreCLR)\runtimes\$(WpfRuntimeIdentifier)\native\</CoreCLRPath>
</PropertyGroup>

<PropertyGroup Condition="'$(WpfRuntimeIdentifier)'=='win-arm64'">
<ILDAsmPath>$(Pkgruntime_win-arm64_Microsoft_NETCore_ILDAsm)\runtimes\$(WpfRuntimeIdentifier)\native\</ILDAsmPath>
<ILAsmPath>$(Pkgruntime_win-arm64_Microsoft_NETCore_ILAsm)\runtimes\$(WpfRuntimeIdentifier)\native\</ILAsmPath>
<CoreCLRPath>$(Pkgruntime_win-arm64_Microsoft_NETCore_Runtime_CoreCLR)\runtimes\$(WpfRuntimeIdentifier)\native\</CoreCLRPath>
</PropertyGroup>

<PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions eng/WpfArcadeSdk/tools/Packaging.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<ArtifactsPackagingDir Condition="'$(ArtifactsPackagingDir)'=='' and $(Platform.EndsWith('64'))">$(ArtifactsDir)packaging\$(Configuration)\$(Platform)\</ArtifactsPackagingDir>
<ArtifactsPackagingDir Condition="'$(ArtifactsPackagingDir)'=='' and !$(Platform.EndsWith('64'))">$(ArtifactsDir)packaging\$(Configuration)\</ArtifactsPackagingDir>
<ArtifactsPackagingDir Condition="'$(ArtifactsPackagingDir)'=='' and $(Platform.EndsWith('x64'))">$(ArtifactsDir)packaging\$(Configuration)\$(Platform)\</ArtifactsPackagingDir>
<ArtifactsPackagingDir Condition="'$(ArtifactsPackagingDir)'=='' and !$(Platform.EndsWith('x64'))">$(ArtifactsDir)packaging\$(Configuration)\</ArtifactsPackagingDir>

<!-- We like using RID prefix when generating nuget package names -->
<PackageRuntimeIdentifierPrefix Condition="'$(Platform)'!='AnyCPU' and '$(Platform)'!='Win32'">runtime.win-$(Platform)</PackageRuntimeIdentifierPrefix>
Expand Down
238 changes: 125 additions & 113 deletions eng/WpfArcadeSdk/tools/Packaging.targets

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion eng/WpfArcadeSdk/tools/Redist.targets
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@
<Copy SourceFiles="@(AdditionalRedistFile)"
DestinationFolder="%(AdditionalRedistFile.Destination)" />
</Target>
</Project>
</Project>
49 changes: 26 additions & 23 deletions eng/WpfArcadeSdk/tools/SdkReferences.targets
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
Version="$(MicrosoftPrivateWinformsVersion)"
ExcludeAssets="All"
GeneratePathProperty="True"
Condition="'$(MSBuildProjectExtension)'!='.vcxproj'
And '$(TargetFrameworkIdentifier)' == '.NETCoreApp'
And ('$(TargetFrameworkVersion)' == 'v3.0' Or '$(TargetFrameworkVersion)' == 'v3.1' Or '$(TargetFrameworkVersion)' == 'v5.0')
Condition="'$(MSBuildProjectExtension)'!='.vcxproj'
And '$(TargetFrameworkIdentifier)' == '.NETCoreApp'
And ('$(TargetFrameworkVersion)' == 'v3.0' Or '$(TargetFrameworkVersion)' == 'v3.1' Or '$(TargetFrameworkVersion)' == 'v5.0')
And '$(NoAutoMicrosoftPrivateWinformsReference)'!='true'"/>

<!--
When @(NetCoreReference) is non-empty, exclude all assets (ExcludeAssets = All) and re-add them in
When @(NetCoreReference) is non-empty, exclude all assets (ExcludeAssets = All) and re-add them in
ResolveMicrosoftNetCoreAppReferences target
-->
<PackageReference Update="Microsoft.NETCore.App"
Expand Down Expand Up @@ -119,17 +119,17 @@
<Target
Name="ResolveMicrosoftDotNetWpfGitHubReferences"
Returns="@(ReferencePath)"
Condition="'@(MicrosoftDotNetWpfGitHubReference)'!=''
Condition="'@(MicrosoftDotNetWpfGitHubReference)'!=''
And '$(MSBuildProjectExtension)' != '.vcxproj'
And '$(TargetFrameworkIdentifier)' == '.NETCoreApp'
And ('$(TargetFrameworkVersion)' == 'v3.0' Or '$(TargetFrameworkVersion)' == 'v3.1' Or '$(TargetFrameworkVersion)' == 'v5.0')
And '$(TargetFrameworkIdentifier)' == '.NETCoreApp'
And ('$(TargetFrameworkVersion)' == 'v3.0' Or '$(TargetFrameworkVersion)' == 'v3.1' Or '$(TargetFrameworkVersion)' == 'v5.0')
and '$(DoNotLimitMicrosoftDotNetWpfGitHubReferences)'!='true'">
<!--
<!--
In your project, Add a references to WPF GitHub transport package like this:
<ItemGroup>
<MicrosoftDotNetWpfGitHubReference Include="System.Xaml" />
</ItemGroup>

It will get translated into something like this:
<ItemGroup>
<Reference Include="C:\Users\username\.nuget\packages\microsoft.dotnet.wpf.github\4.8.0-preview4.19174.2\ref\netcoreapp3.0\System.Xaml.dll" />
Expand All @@ -139,9 +139,12 @@
<!-- Since WPF reference assemblies do not carry internals, we need to directly reference the RID-specific lib assemblies from dotnet_wpf_int builds. -->
<WpfGitHubRidSpecificPackagePath Condition="'$(WpfRuntimeIdentifier)'=='win-x86' And '$(Configuration)' != 'Debug'">$(Pkgruntime_win-x86_Microsoft_DotNet_Wpf_GitHub)</WpfGitHubRidSpecificPackagePath>
<WpfGitHubRidSpecificPackagePath Condition="'$(WpfRuntimeIdentifier)'=='win-x86' And '$(Configuration)' == 'Debug'">$(Pkgruntime_win-x86_Microsoft_DotNet_Wpf_GitHub_Debug)</WpfGitHubRidSpecificPackagePath>

<WpfGitHubRidSpecificPackagePath Condition="'$(WpfRuntimeIdentifier)'=='win-x64' And '$(Configuration)' != 'Debug'">$(Pkgruntime_win-x64_Microsoft_DotNet_Wpf_GitHub)</WpfGitHubRidSpecificPackagePath>
<WpfGitHubRidSpecificPackagePath Condition="'$(WpfRuntimeIdentifier)'=='win-x64' And '$(Configuration)' == 'Debug'">$(Pkgruntime_win-x64_Microsoft_DotNet_Wpf_GitHub_Debug)</WpfGitHubRidSpecificPackagePath>

<WpfGitHubRidSpecificPackagePath Condition="'$(WpfRuntimeIdentifier)'=='win-arm64' And '$(Configuration)' != 'Debug'">$(Pkgruntime_win-arm64_Microsoft_DotNet_Wpf_GitHub)</WpfGitHubRidSpecificPackagePath>
<WpfGitHubRidSpecificPackagePath Condition="'$(WpfRuntimeIdentifier)'=='win-arm64' And '$(Configuration)' == 'Debug'">$(Pkgruntime_win-arm64_Microsoft_DotNet_Wpf_GitHub_Debug)</WpfGitHubRidSpecificPackagePath>
</PropertyGroup>
<ItemGroup>
<Reference Include="$(WpfGitHubRidSpecificPackagePath)\lib\$(TargetFramework)\%(MicrosoftDotNetWpfGitHubReference.Identity).dll"
Expand All @@ -154,45 +157,45 @@
<Target
Name="ResolveMicrosoftDotNetWpfDncEngReferencesForCpp"
Returns="@(Link)"
Condition="'@(MicrosoftDotNetWpfGitHubReference)'!=''
Condition="'@(MicrosoftDotNetWpfGitHubReference)'!=''
And '$(MSBuildProjectExtension)' == '.vcxproj'
and '$(DoNotLimitMicrosoftDotNetWpfGitHubReferences)'!='true'">
<!--
Normally, we would use lib files from RID-specific Microsoft.DotNet.Wpf.DncEng package directly. Since this package
<!--
Normally, we would use lib files from RID-specific Microsoft.DotNet.Wpf.DncEng package directly. Since this package
was most likley not restored prior to the start of the build, it had to be restored from with the CppHelper target, and the libs in this package
are now enumerated within @(NuGetReferencesForCpp) item.
are now enumerated within @(NuGetReferencesForCpp) item.
-->
<!--

<!--
Select items from with @(NuGetReferencesForCpp) (which is a proxy for Microsoft.DotNet.Wpf.DncEng's native libs)
that were requested in MicrosoftDotNetWpfGitHubReference
-->
<FilterItem1ByItem2 Item1="@(NuGetReferencesForCpp->'%(FileName)')"
Item2="@(MicrosoftDotNetWpfGitHubReference)"
Item2="@(MicrosoftDotNetWpfGitHubReference)"
Metadata2="Identity"
PreserveItem1Metadata="true">
<Output ItemName="_nugetLibReferencesForCpp" TaskParameter="Result" />
</FilterItem1ByItem2>

<ItemGroup>
<Link Include="@(_nugetLibReferencesForCpp->'%(FilePath)')" />
<Link Include="@(_nugetLibReferencesForCpp->'%(FilePath)')" />
</ItemGroup>
</Target>

<!--
<!--
In your project, Add a references to WinForms transport package like this:
<ItemGroup>
<MicrosoftPrivateWinFormsReference Include="Accessbility" />
</ItemGroup>

It will get translated into something like this:
<ItemGroup>
<Reference Include="C:\Users\username\.nuget\packages\microsoft.private.winforms\4.8.0-preview4.19170.4\lib\netcoreapp3.0\Accessibility.dll" />
</ItemGroup>
-->
<Target Name="ResolveWinFormsReferences"
Condition="'@(MicrosoftPrivateWinFormsReference)'!=''
And '$(TargetFrameworkIdentifier)' == '.NETCoreApp'
Condition="'@(MicrosoftPrivateWinFormsReference)'!=''
And '$(TargetFrameworkIdentifier)' == '.NETCoreApp'
And ('$(TargetFrameworkVersion)' == 'v3.0' Or '$(TargetFrameworkVersion)' == 'v3.1' Or '$(TargetFrameworkVersion)' == 'v5.0') ">
<ItemGroup>
<Reference Include="$(PkgMicrosoft_Private_Winforms)\ref\$(TargetFramework)\%(MicrosoftPrivateWinFormsReference.Identity).dll"
Expand Down
5 changes: 4 additions & 1 deletion eng/WpfArcadeSdk/tools/Wpf.Cpp.props
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@
<Architecture Condition="'$(Platform)'=='Win32'">x86</Architecture>
<Architecture Condition="'$(Architecture)'==''">x64</Architecture>

<TraceWpp>$(Windows10SdkPath)bin\$(WindowsTargetPlatformVersion)\$(Architecture)\tracewpp.exe</TraceWpp>
<!-- This should always use either x86 or x64 -->
<TraceWppArchitecture Condition="'$(Architecture)'=='ARM64'">x64</TraceWppArchitecture>
<TraceWppArchitecture Condition="'$(Architecture)'!='ARM64'">$(Architecture)</TraceWppArchitecture>
<TraceWpp>$(Windows10SdkPath)bin\$(WindowsTargetPlatformVersion)\$(TraceWppArchitecture)\tracewpp.exe</TraceWpp>

<GenerateAssemblyInfo>$(ManagedCxx)</GenerateAssemblyInfo>
<BuildProjectReferences>true</BuildProjectReferences>
Expand Down
Loading