Skip to content

Commit

Permalink
Bump UWP to 19041 (xamarin#11940)
Browse files Browse the repository at this point in the history
* Remove uwp build packages from nuspec

* 19041

* - bump 19041

* - remove spanning rects

* - fix features installs for 19041

* - fix comma

* - add android platforms
  • Loading branch information
PureWeen authored Sep 1, 2020
1 parent 30951b2 commit fc5002a
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 33 deletions.
2 changes: 1 addition & 1 deletion DualScreen/DualScreen.UWP/DualScreen.UWP.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<AssemblyName>DualScreen.UWP</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.18362.0</TargetPlatformVersion>
<TargetPlatformVersion>10.0.19041.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.16299.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<EnableDotNetNativeCompatibleProfile>true</EnableDotNetNativeCompatibleProfile>
Expand Down
15 changes: 5 additions & 10 deletions UWP.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,19 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(UwpMinTargetFrameworks)' == '' ">
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">uap10.0.14393;uap10.0.16299</TargetFrameworks>
<!--<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">uap10.0.14393;uap10.0.16299;uap10.0.18362</TargetFrameworks>-->
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netstandard2.0</TargetFrameworks>
</PropertyGroup>
<PropertyGroup>
<TargetPlatformVersion Condition="'$(TargetFramework)' == 'uap10.0.14393'">10.0.16299.0</TargetPlatformVersion>
<TargetPlatformVersion Condition="'$(TargetFramework)' == 'uap10.0.16299'">10.0.18362.0</TargetPlatformVersion>
<TargetPlatformVersion Condition="'$(TargetFramework)' == 'uap10.0.18362'">10.0.19559.0</TargetPlatformVersion>
<TargetPlatformVersion Condition="'$(TargetFramework)' == 'uap10.0.14393'">10.0.19041.0</TargetPlatformVersion>
<TargetPlatformVersion Condition="'$(TargetFramework)' == 'uap10.0.16299'">10.0.19041.0</TargetPlatformVersion>
</PropertyGroup>
<PropertyGroup Condition=" $(TargetFramework.StartsWith('uap10.0')) ">
<DefineConstants>$(DefineConstants);UWP</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(TargetPlatformVersion) == '10.0.16299.0'">
<PropertyGroup Condition="'$(TargetFramework)' == 'uap10.0.14393'">
<DefineConstants>$(DefineConstants);UWP_14393</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(TargetPlatformVersion) == '10.0.18362.0'">
<DefineConstants>$(DefineConstants);UWP_18362</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" $(TargetPlatformVersion.StartsWith('10.0.19')) ">
<DefineConstants>$(DefineConstants);UWP_18362;UWP_19000</DefineConstants>
<PropertyGroup Condition=" '$(TargetFramework)' == 'uap10.0.16299' ">
<DefineConstants>$(DefineConstants);UWP_18362;UWP_19041;UWP_14393;UWP_16299</DefineConstants>
</PropertyGroup>
</Project>
9 changes: 2 additions & 7 deletions UWP.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,8 @@
<ItemGroup Condition="'$(TargetFramework)' == 'uap10.0.14393' AND '$(OS)' == 'Windows_NT' ">
<PackageReference Include="NETStandard.Library" Version="2.0.1" />
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith('uap10.0')) AND '$(OS)' == 'Windows_NT' AND $(TargetPlatformMinVersion) &lt;= '10.0.16299.0' ">
<SDKReference Include="WindowsMobile, Version=10.0.18362.0">
<Name>Windows Mobile Extensions for the UWP</Name>
</SDKReference>
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith('uap10.0')) AND '$(OS)' == 'Windows_NT' AND $(TargetPlatformMinVersion) &gt;= '10.0.18362.0' ">
<SDKReference Include="WindowsMobile, Version=10.0.19559.0">
<ItemGroup Condition="$(TargetFramework.StartsWith('uap10.0')) AND '$(OS)' == 'Windows_NT' ">
<SDKReference Include="WindowsMobile, Version=10.0.19041.0">
<Name>Windows Mobile Extensions for the UWP</Name>
</SDKReference>
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<AssemblyName>Xamarin.Forms.ControlGallery.WindowsUniversal</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.18362.0</TargetPlatformVersion>
<TargetPlatformVersion>10.0.19041.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.16299.0</TargetPlatformMinVersion>
<SkipMicrosoftUIXamlCheckTargetPlatformVersion>true</SkipMicrosoftUIXamlCheckTargetPlatformVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
Expand Down
5 changes: 3 additions & 2 deletions Xamarin.Forms.DualScreen/DualScreenService.uwp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,9 @@ public Rectangle GetHinge()
var applicationView = ApplicationView.GetForCurrentView();
List<Windows.Foundation.Rect> spanningRects = null;

#if UWP_19000
spanningRects = applicationView.GetSpanningRects().ToList();
#if UWP_19041
// This will make a come back with winui2.5
//spanningRects = applicationView.GetSpanningRects().ToList();
#endif

if (spanningRects?.Count == 2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<AssemblyName>Xamarin.Forms.Platform.UAP.UnitTests</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.18362.0</TargetPlatformVersion>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.19041.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.16299.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
Expand Down
2 changes: 1 addition & 1 deletion Xamarin.Forms.Platform.UAP/Forms.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static void Init(IActivatedEventArgs launchActivatedEventArgs, IEnumerabl
var accent = (WSolidColorBrush)Windows.UI.Xaml.Application.Current.Resources["SystemColorControlAccentBrush"];
Color.SetAccent(accent.ToFormsColor());

#if UWP_14393
#if !UWP_16299
Log.Listeners.Add(new DelegateLogListener((c, m) => Debug.WriteLine(LogFormat, c, m)));
#else
Log.Listeners.Add(new DelegateLogListener((c, m) => Trace.WriteLine(m, c)));
Expand Down
2 changes: 1 addition & 1 deletion Xamarin.Forms.Platform.UAP/Platform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ internal Platform(Windows.UI.Xaml.Controls.Page page)
Windows.UI.Xaml.Application.Current.Resources.MergedDictionaries.Add(Forms.GetTabletResources());
}

#if !UWP_14393
#if UWP_16299
if (!current.Resources.ContainsKey(ShellRenderer.ShellStyle))
{
var myResourceDictionary = new Windows.UI.Xaml.ResourceDictionary();
Expand Down
2 changes: 1 addition & 1 deletion Xamarin.Forms.Platform.UAP/WindowsIsolatedStorage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using Windows.Storage.FileProperties;
using Windows.Storage.Streams;

#if UWP_14393
#if !UWP_16299
using FileMode = Xamarin.Forms.Internals.FileMode;
using FileAccess = Xamarin.Forms.Internals.FileAccess;
using FileShare = Xamarin.Forms.Internals.FileShare;
Expand Down
19 changes: 11 additions & 8 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -117,28 +117,29 @@ else

Information("MSBuildArguments: {0}", MSBuildArguments);

string androidSdks = EnvironmentVariable("ANDROID_API_SDKS", "platforms;android-28,platforms;android-29,build-tools;29.0.3");
string androidSdks = EnvironmentVariable("ANDROID_API_SDKS", "platform-tools,platforms;android-28,platforms;android-29,build-tools;29.0.3,platforms;android-30");

if(buildForVS2017)
androidSdks = "platforms;android-28,platforms;android-29,build-tools;29.0.3";

Information("ANDROID_API_SDKS: {0}", androidSdks);
string[] androidSdkManagerInstalls = androidSdks.Split(',');

(string name, string location)[] windowsSdksInstalls = new (string name, string location)[]
(string name, string location, string featureList)[] windowsSdksInstalls = new (string name, string location, string featureList)[]
{
("10.0.19041.0", "https://go.microsoft.com/fwlink/p/?linkid=2120843"),
("10.0.18362.0", "https://go.microsoft.com/fwlink/?linkid=2083338"),
("10.0.16299.0", "https://go.microsoft.com/fwlink/p/?linkid=864422"),
("10.0.14393.0", "https://go.microsoft.com/fwlink/p/?LinkId=838916")
("10.0.19041.0", "https://go.microsoft.com/fwlink/p/?linkid=2120843", "OptionId.WindowsPerformanceToolkit OptionId.WindowsDesktopDebuggers OptionId.AvrfExternal OptionId.WindowsSoftwareLogoToolkit OptionId.MSIInstallTools OptionId.SigningTools OptionId.UWPManaged OptionId.UWPCPP OptionId.UWPLocalized OptionId.DesktopCPPx86 OptionId.DesktopCPPx64 OptionId.DesktopCPParm OptionId.DesktopCPParm64"),
("10.0.18362.0", "https://go.microsoft.com/fwlink/?linkid=2083338", "+"),
("10.0.16299.0", "https://go.microsoft.com/fwlink/p/?linkid=864422", "+"),
("10.0.14393.0", "https://go.microsoft.com/fwlink/p/?LinkId=838916", "+")
};

string[] netFrameworkSdksLocalInstall = new string[]
{
"https://go.microsoft.com/fwlink/?linkid=2099470", //NET461 SDK
"https://go.microsoft.com/fwlink/?linkid=874338", //NET472 SDK
"https://go.microsoft.com/fwlink/?linkid=2099465", //NET47
"https://download.microsoft.com/download/A/1/D/A1D07600-6915-4CB8-A931-9A980EF47BB7/NDP47-DevPack-KB3186612-ENU.exe" //net47 targeting pack
"https://download.microsoft.com/download/A/1/D/A1D07600-6915-4CB8-A931-9A980EF47BB7/NDP47-DevPack-KB3186612-ENU.exe", //net47 targeting pack
"https://go.microsoft.com/fwlink/?linkid=2088517", //NET48 SDK
};

// these don't run on CI
Expand Down Expand Up @@ -401,7 +402,9 @@ Task("provision-windowssdk")

var result = StartProcess(installerPath, new ProcessSettings {
Arguments = new ProcessArgumentBuilder()
.Append(@"/features + /q")
.Append(@"/features ")
.Append(windowsSdk.featureList)
.Append(@" /q")
}
);

Expand Down

0 comments on commit fc5002a

Please sign in to comment.