Skip to content

Commit

Permalink
feat: Update to WinAppSDK 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromelaban committed Nov 24, 2021
1 parent 4ecf3b8 commit 9fd0a0c
Show file tree
Hide file tree
Showing 8 changed files with 68 additions and 82 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.0.0-experimental1" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.0.0" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22000.196" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="5.0.0" />
<PackageReference Include="Uno.Core.Extensions.Logging.Singleton" Version="4.0.0-dev.7" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.0.0-experimental1" />
<PackageReference Include="Microsoft.WindowsAppSDK.Foundation" Version="1.0.0-experimental1" />
<PackageReference Include="Microsoft.WindowsAppSDK.WinUI" Version="1.0.0-experimental1" />
<PackageReference Include="Microsoft.WindowsAppSDK.InteractiveExperiences" Version="1.0.0-experimental1" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.0.0" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22000.196" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="5.0.0" />
<PackageReference Include="Uno.Core.Extensions.Logging.Singleton" Version="4.0.0-dev.7" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.WindowsAppSDK" Version="[1.0.0-experimental1]">
<IncludeAssets>build</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.WindowsAppSDK.WinUI" Version="[1.0.0-experimental1]">
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.0.0">
<IncludeAssets>build</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22000.196">
<IncludeAssets>build</IncludeAssets>
</PackageReference>
</ItemGroup>
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.targets" />
</Project>
5 changes: 2 additions & 3 deletions src/Uno.UI.Toolkit/Uno.UI.Toolkit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,8 @@
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='net5.0-windows10.0.18362.0' or '$(TargetFramework)'=='uap10.0.17763'">
<PackageReference Include="Microsoft.WindowsAppSDK" Condition="'$(UNO_UWP_BUILD)'!='true'">
<Version>1.0.0-preview2</Version>
</PackageReference>
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.0.0" Condition="'$(UNO_UWP_BUILD)'!='true'" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22000.196" Condition="'$(UNO_UWP_BUILD)'!='true'"/>

<FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" RuntimeFrameworkVersion="10.0.18362.21" Condition="'$(UNO_UWP_BUILD)'!='true'" />
<FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" TargetingPackVersion="10.0.18362.21" Condition="'$(UNO_UWP_BUILD)'!='true'" />
Expand Down
68 changes: 0 additions & 68 deletions src/Uno.UI/Uno.UI.Skia.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -111,72 +111,4 @@
<UndefineProperties>TargetFramework</UndefineProperties>
</ProjectReference>
</ItemGroup>

<ItemGroup>
<UpToDateCheckInput Remove="Microsoft\UI\Input\InputCursor.cs" />
<UpToDateCheckInput Remove="Microsoft\UI\Input\InputDesktopResourceCursor.cs" />
<UpToDateCheckInput Remove="Microsoft\UI\Input\InputKeyboardSource.cs" />
<UpToDateCheckInput Remove="Microsoft\UI\Input\InputLightDismissAction.cs" />
<UpToDateCheckInput Remove="Microsoft\UI\Input\InputLightDismissEventArgs.cs" />
<UpToDateCheckInput Remove="Microsoft\UI\Input\InputObject.cs" />
<UpToDateCheckInput Remove="Microsoft\UI\Input\InputPointerSource.cs" />
<UpToDateCheckInput Remove="Microsoft\UI\Input\InputPointerSourceDeviceKinds.cs" />
<UpToDateCheckInput Remove="Microsoft\UI\Input\InputSystemCursor.cs" />
<UpToDateCheckInput Remove="Microsoft\UI\Input\InputSystemCursorShape.cs" />
<UpToDateCheckInput Remove="Microsoft\UI\Input\IPointerPointTransform.cs" />
<UpToDateCheckInput Remove="Microsoft\UI\Input\PointerDeviceType.cs" />
<UpToDateCheckInput Remove="Microsoft\UI\Input\PointerEventArgs.cs" />
<UpToDateCheckInput Remove="UI\Xaml\Data\BindingExtensions.cs" />
<UpToDateCheckInput Remove="UI\Xaml\Markup\ApplyExtensions.cs" />
</ItemGroup>

<ItemGroup>
<Compile Include="Mixins\DependencyPropertyMixins.g.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>DependencyPropertyMixins.tt</DependentUpon>
</Compile>
</ItemGroup>

<ItemGroup>
<None Include="Mixins\Android\BaseActivity.Callbacks.g.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>BaseActivity.Callbacks.tt</DependentUpon>
</None>
<None Include="Mixins\Android\FrameworkElementMixins.g.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>FrameworkElementMixins.tt</DependentUpon>
</None>
<None Include="Mixins\iOS\FrameworkElementMixins.g.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>FrameworkElementMixins.tt</DependentUpon>
</None>
<None Include="Mixins\macOS\FrameworkElementMixins.g.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>FrameworkElementMixins.tt</DependentUpon>
</None>
</ItemGroup>

<ItemGroup>
<None Update="Mixins\Android\BaseActivity.Callbacks.tt">
<LastGenOutput>BaseActivity.Callbacks.g.cs</LastGenOutput>
</None>
<None Update="Mixins\Android\FrameworkElementMixins.tt">
<LastGenOutput>FrameworkElementMixins.g.cs</LastGenOutput>
</None>
<None Update="Mixins\DependencyPropertyMixins.tt">
<LastGenOutput>DependencyPropertyMixins.g.cs</LastGenOutput>
</None>
<None Update="Mixins\iOS\FrameworkElementMixins.tt">
<LastGenOutput>FrameworkElementMixins.g.cs</LastGenOutput>
</None>
<None Update="Mixins\macOS\FrameworkElementMixins.tt">
<LastGenOutput>FrameworkElementMixins.g.cs</LastGenOutput>
</None>
</ItemGroup>

</Project>
38 changes: 38 additions & 0 deletions src/Uno.UWP/Microsoft/UI/IconId.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace Microsoft.UI
{
public struct IconId : IEquatable<IconId>
{
public ulong Value;

public IconId(ulong _Value)
{
Value = _Value;
}

public static bool operator ==(IconId x, IconId y)
=> x.Value == y.Value;

public static bool operator !=(IconId x, IconId y)
=> !(x == y);

public bool Equals(IconId other)
=> this == other;

public override bool Equals(object obj)
{
if (obj is IconId)
{
IconId y = (IconId)obj;
return this == y;
}
return false;
}

public override int GetHashCode()
=> Value.GetHashCode();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
<When Condition="'$(UNO_UWP_BUILD)'=='false'">
<ItemGroup>
<PackageReference Include="Microsoft.WindowsAppSDK">
<Version>1.0.0-preview3</Version>
<Version>1.0.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.WindowsAppSDK.WinUI">
<Version>1.0.0-experimental1</Version>
Expand All @@ -143,7 +143,7 @@
</PackageReference>
<PackageReference Include="Microsoft.WindowsAppSDK.InteractiveExperiences">
<Version>1.0.0-experimental1</Version>
</PackageReference>
</PackageReference>
</ItemGroup>
</When>
<Otherwise>
Expand Down Expand Up @@ -192,5 +192,21 @@
<ReferenceCopyLocalPaths Remove="@(_itemToRemove)"/>
</ItemGroup>
</Target>

<ItemGroup Condition="'$(PkgMicrosoft_WindowsAppSDK)'!=''">
<Reference Include="$(PkgMicrosoft_WindowsAppSDK)\lib\uap10.0\*.winmd" />
</ItemGroup>

<Target Name="IncludeUap" BeforeTargets="BeforeBuild">
<!--
Manually include UAP files that are excluded from the build by the
default nuget resolution, which uses `uap10.0.xxx` and ignores `uap10.0`.
This target is needed in case the restore happens during the build.
-->
<ItemGroup>
<Reference Include="$(PkgMicrosoft_WindowsAppSDK)\lib\uap10.0\*.winmd" />
</ItemGroup>
</Target>

<Import Project="..\Common.targets" />
</Project>
2 changes: 2 additions & 0 deletions src/Uno.UWPSyncGenerator/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ static void Main(string[] args)
new SyncGenerator().Build(@"..\..\..\Uno.UI", "Uno.UI", "Microsoft.Graphics");
new SyncGenerator().Build(@"..\..\..\Uno.UI.Dispatching", "Uno.UI.Dispatching", "Microsoft.UI.Dispatching");
new SyncGenerator().Build(@"..\..\..\Uno.UI.Composition", "Uno.UI.Composition", "Microsoft.UI.Composition");
new SyncGenerator().Build(@"..\..\..\Uno.UI.Dispatching", "Uno.UI.Dispatching", "Microsoft.UI");
new SyncGenerator().Build(@"..\..\..\Uno.UI.Composition", "Uno.UI.Composition", "Microsoft.UI");

new SyncGenerator().Build(@"..\..\..\Uno.UI", "Uno.UI", "Microsoft.UI.Text");
new SyncGenerator().Build(@"..\..\..\Uno.UI", "Uno.UI", "Microsoft.ApplicationModel.Resources");
Expand Down

0 comments on commit 9fd0a0c

Please sign in to comment.