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

♻️ Update sample projects #205

Merged
merged 9 commits into from
Jan 24, 2024
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
1 change: 1 addition & 0 deletions samples/NewTemplate/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<DotNetVersion>net7.0</DotNetVersion>
<DebugType>portable</DebugType>
<DebugSymbols>True</DebugSymbols>
<SynthesizeLinkMetadata>true</SynthesizeLinkMetadata>
Expand Down
53 changes: 27 additions & 26 deletions samples/NewTemplate/Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
<Project ToolsVersion="15.0">
<ItemGroup>
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
<PackageVersion Include="Microsoft.Windows.Compatibility" Version="7.0.4" />
<PackageVersion Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.756" />
<!--<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.3.230331000" />-->
<!-- Use previous version for unpackaged apps due to build issue https://github.com/microsoft/WindowsAppSDK/issues/3591 -->
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.3.230602002" />
<PackageVersion Include="SkiaSharp.Skottie" Version="2.88.3" />
<PackageVersion Include="SkiaSharp.Views.Uno.WinUI" Version="2.88.3" />
<PackageVersion Include="Uno.Core.Extensions.Logging.Singleton" Version="4.0.1" />
<PackageVersion Include="Uno.Extensions.Logging.OSLog" Version="1.6.0-dev.2" />
<PackageVersion Include="Uno.Extensions.Logging.WebAssembly.Console" Version="1.6.0-dev.2" />
<PackageVersion Include="Uno.Resizetizer" Version="1.0.2" />
<PackageVersion Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="5.0.0-dev.1171" />
<PackageVersion Include="Uno.UniversalImageLoader" Version="1.9.36" />
<PackageVersion Include="Uno.Wasm.Bootstrap" Version="7.0.24" />
<PackageVersion Include="Uno.Wasm.Bootstrap.DevServer" Version="7.0.24" />
<PackageVersion Include="Uno.Wasm.Bootstrap.Server" Version="7.0.20" />
<PackageVersion Include="Uno.WinUI" Version="5.0.0-dev.1171" />
<PackageVersion Include="Uno.WinUI.RemoteControl" Version="5.0.0-dev.1171" />
<PackageVersion Include="Uno.WinUI.Skia.Gtk" Version="5.0.0-dev.1171" />
<PackageVersion Include="Uno.WinUI.Skia.Linux.FrameBuffer" Version="5.0.0-dev.1171" />
<PackageVersion Include="Uno.WinUI.Skia.Wpf" Version="5.0.0-dev.1171" />
<PackageVersion Include="Uno.WinUI.WebAssembly" Version="5.0.0-dev.1171" />
<PackageVersion Include="Xamarin.Google.Android.Material" Version="1.8.0" />
</ItemGroup>
<ItemGroup>
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
<PackageVersion Include="Microsoft.Windows.Compatibility" Version="7.0.4" />
<PackageVersion Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.756" />
<!--<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.3.230331000" />-->
<!-- Use previous version for unpackaged apps due to build issue https://github.com/microsoft/WindowsAppSDK/issues/3591 -->
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.3.230602002" />
<PackageVersion Include="SkiaSharp.Skottie" Version="2.88.3" />
<PackageVersion Include="SkiaSharp.Views.Uno.WinUI" Version="2.88.3" />
<PackageVersion Include="Uno.Core.Extensions.Logging.Singleton" Version="4.0.1" />
<PackageVersion Include="Uno.Extensions.Logging.OSLog" Version="1.6.0-dev.2" />
<PackageVersion Include="Uno.Extensions.Logging.WebAssembly.Console" Version="1.6.0-dev.2" />
<!--<PackageVersion Include="Uno.Resizetizer" Version="1.0.2" />-->
<PackageVersion Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="5.0.48" />
<PackageVersion Include="Uno.UniversalImageLoader" Version="1.9.36" />
<PackageVersion Include="Uno.Wasm.Bootstrap" Version="7.0.24" />
<PackageVersion Include="Uno.Wasm.Bootstrap.DevServer" Version="7.0.24" />
<PackageVersion Include="Uno.Wasm.Bootstrap.Server" Version="7.0.20" />
<PackageVersion Include="Uno.WinUI" Version="5.0.48" />
<PackageVersion Include="Uno.WinUI.RemoteControl" Version="5.0.48" />
<PackageVersion Include="Uno.WinUI.Skia.Gtk" Version="5.0.48" />
<PackageVersion Include="Uno.WinUI.Skia.Linux.FrameBuffer" Version="5.0.48" />
<PackageVersion Include="Uno.WinUI.Skia.Wpf" Version="5.0.48" />
<PackageVersion Include="Uno.WinUI.WebAssembly" Version="5.0.48" />
<PackageVersion Include="Xamarin.Google.Android.Material" Version="1.8.0" />
<PackageVersion Include="Uno.WinUI.DevServer" Version="5.0.48" />
</ItemGroup>
</Project>
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>

<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="uap rescap">
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="uap rescap">

<Identity
Name="8284486D-9D53-48F2-B1FB-E5689C4B6F72"
Publisher="O=Resizetizer.Extensions.Sample"
Version="1.0.0.0" />
<Identity
Name="Resizetizer.Extensions.Sample"
Publisher="O=Resizetizer.Extensions.Sample"
Version="1.0.0.0" />

<Properties>
<DisplayName>Resizetizer.Extensions.Sample</DisplayName>
<PublisherDisplayName>Resizetizer.Extensions.Sample</PublisherDisplayName>
</Properties>
<Properties>
<DisplayName>Resizetizer.Extensions.Sample</DisplayName>
<PublisherDisplayName>Resizetizer.Extensions.Sample</PublisherDisplayName>
</Properties>

<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
</Dependencies>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
</Dependencies>

<Resources>
<Resource Language="x-generate"/>
</Resources>
<Resources>
<Resource Language="x-generate"/>
</Resources>

<Applications>
<Application Id="App"
Executable="$targetnametoken$.exe"
EntryPoint="$targetentrypoint$">
<uap:VisualElements
DisplayName="Resizetizer.Extensions.Sample"
Description="Resizetizer.Extensions.Sample">
<uap:SplashScreen />
</uap:VisualElements>
</Application>
</Applications>
<Applications>
<Application Id="App"
Executable="$targetnametoken$.exe"
EntryPoint="$targetentrypoint$">
<uap:VisualElements
DisplayName="Resizetizer.Extensions.Sample"
Description="Resizetizer.Extensions.Sample">
<uap:SplashScreen />
</uap:VisualElements>
</Application>
</Applications>

<Capabilities>
<rescap:Capability Name="runFullTrust" />
</Capabilities>
<Capabilities>
<rescap:Capability Name="runFullTrust" />
</Capabilities>
</Package>
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
using System;
using GLib;
using Uno.UI.Runtime.Skia;
using Uno.UI.Runtime.Skia.Gtk;

namespace Resizetizer.Extensions.Sample.Skia.Gtk;

public class Program
{
public static void Main(string[] args)
{
ExceptionManager.UnhandledException += delegate (UnhandledExceptionArgs expArgs)
{
Console.WriteLine("GLIB UNHANDLED EXCEPTION" + expArgs.ExceptionObject.ToString());
expArgs.ExitApplication = true;
};
public static void Main(string[] args)
{
ExceptionManager.UnhandledException += delegate (UnhandledExceptionArgs expArgs)
{
Console.WriteLine("GLIB UNHANDLED EXCEPTION" + expArgs.ExceptionObject.ToString());
expArgs.ExitApplication = true;
};

var host = new GtkHost(() => new AppHead());
var host = new GtkHost(() => new AppHead());

host.Run();
}
host.Run();
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType Condition="'$(Configuration)'=='Release'">WinExe</OutputType>
<OutputType Condition="'$(Configuration)'=='Debug'">Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>$(DotNetVersion)</TargetFramework>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup>
Expand All @@ -15,14 +15,19 @@
<PackageReference Include="Microsoft.Extensions.Logging.Console" />
<PackageReference Include="SkiaSharp.Views.Uno.WinUI" />
<PackageReference Include="SkiaSharp.Skottie" />
<PackageReference Include="Uno.WinUI.RemoteControl" Condition="'$(Configuration)'=='Debug'" />
<PackageReference Include="Uno.WinUI.DevServer" Condition="'$(Configuration)'=='Debug'" />
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Resizetizer.Extensions.Sample\Resizetizer.Extensions.Sample.csproj" />
</ItemGroup>
<Import Project="..\Resizetizer.Extensions.Sample.Base\base.props" />

<Target Name="ValidateOverrides" BeforeTargets="Restore;_CheckForUnsupportedTargetFramework" Condition="'$(OverrideTargetFramework)' != ''">
<Error
Text="OverrideTargetFramework set to '$(OverrideTargetFramework)' is invalid. Set OverrideTargetFramework to $([MSBuild]::Escape('$'))(DotNetVersion) or skip building this project (eg unload the project in Visual Studio)"
Condition="'$(OverrideTargetFramework)'!='$(DotNetVersion)'" />
</Target>

<Target Name="ValidateTransientLocalAssets" AfterTargets="Build" Condition="'$(TargetFramework)'!=''">
<PropertyGroup>
Expand All @@ -37,4 +42,4 @@
<Error Condition="!Exists('$(_ResizetizerAppIconPath)')" Text=".ico file wasn't created." />
<Error Condition="!Exists('$(_ResizetizerAppIconImagesPath)')" Text="App icon image file wasn't created." />
</Target>
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@

<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2, PerMonitor</dpiAwareness>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2, PerMonitor</dpiAwareness>
</windowsSettings>
</application>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Microsoft.UI.Xaml;
using System;
using Uno.UI.Runtime.Skia;
using Uno.UI.Runtime.Skia.Linux.FrameBuffer;
using Windows.UI.Core;

namespace Resizetizer.Extensions.Sample.Skia.Framebuffer;
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>

<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="uap rescap">
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="uap rescap">

<Identity
Name="8284486D-9D53-48F2-B1FB-E5689C4B6F72"
Publisher="O=Resizetizer.Extensions.Sample"
Version="1.0.0.0" />
<Identity
Name="Resizetizer.Extensions.Sample"
Publisher="O=Resizetizer.Extensions.Sample"
Version="1.0.0.0" />

<Properties>
<DisplayName>Resizetizer.Extensions.Sample</DisplayName>
<PublisherDisplayName>Resizetizer.Extensions.Sample</PublisherDisplayName>
</Properties>
<Properties>
<DisplayName>Resizetizer.Extensions.Sample</DisplayName>
<PublisherDisplayName>Resizetizer.Extensions.Sample</PublisherDisplayName>
</Properties>

<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
</Dependencies>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
</Dependencies>

<Resources>
<Resource Language="x-generate"/>
</Resources>
<Resources>
<Resource Language="x-generate"/>
</Resources>

<Applications>
<Application Id="App"
Executable="$targetnametoken$.exe"
EntryPoint="$targetentrypoint$">
<uap:VisualElements
DisplayName="Resizetizer.Extensions.Sample"
Description="Resizetizer.Extensions.Sample">
<uap:SplashScreen />
</uap:VisualElements>
</Application>
</Applications>
<Applications>
<Application Id="App"
Executable="$targetnametoken$.exe"
EntryPoint="$targetentrypoint$">
<uap:VisualElements
DisplayName="Resizetizer.Extensions.Sample"
Description="Resizetizer.Extensions.Sample">
<uap:SplashScreen />
</uap:VisualElements>
</Application>
</Applications>

<Capabilities>
<rescap:Capability Name="runFullTrust" />
</Capabilities>
<Capabilities>
<rescap:Capability Name="runFullTrust" />
</Capabilities>
</Package>
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType Condition="'$(Configuration)'=='Release'">WinExe</OutputType>
<OutputType Condition="'$(Configuration)'=='Debug'">Exe</OutputType>
<TargetFramework>net7.0-windows</TargetFramework>
<TargetFramework>$(DotNetVersion)-windows</TargetFramework>
<UseWPF>true</UseWPF>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
Expand All @@ -27,7 +27,7 @@
<PackageReference Include="Microsoft.Extensions.Logging.Console" />
<PackageReference Include="SkiaSharp.Views.Uno.WinUI" />
<PackageReference Include="SkiaSharp.Skottie" />
<PackageReference Include="Uno.WinUI.RemoteControl" />
<PackageReference Include="Uno.WinUI.DevServer" Condition="'$(Configuration)'=='Debug'" />
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" />
</ItemGroup>
<ItemGroup>
Expand All @@ -38,6 +38,11 @@
</ItemGroup>
<Import Project="..\Resizetizer.Extensions.Sample.Base\base.props" />

<Target Name="ValidateOverrides" BeforeTargets="Restore;_CheckForUnsupportedTargetFramework" Condition="'$(OverrideTargetFramework)' != ''">
<Error
Text="OverrideTargetFramework set to '$(OverrideTargetFramework)' is invalid. Set OverrideTargetFramework to $([MSBuild]::Escape('$'))(DotNetVersion) or skip building this project (eg unload the project in Visual Studio)"
Condition="'$(OverrideTargetFramework)'!='$(DotNetVersion)'" />
</Target>

<Target Name="ValidateTransientLocalAssets" AfterTargets="Build" Condition="'$(TargetFramework)'!=''">
<PropertyGroup>
Expand All @@ -50,4 +55,4 @@
<Error Condition="!Exists('$(_ResizetizerAppIconPath)')" Text=".ico file wasn't created." />
<Error Condition="!Exists('$(_ResizetizerAppIconImagesPath)')" Text="App icon image file wasn't created." />
</Target>
</Project>
</Project>
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<Application x:Class="Resizetizer.Extensions.Sample.WPF.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Resizetizer.Extensions.Sample.WPF"
StartupUri="Wpf/MainWindow.xaml">
<Application.Resources>
<Application x:Class="Resizetizer.Extensions.Sample.WPF.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Resizetizer.Extensions.Sample.WPF">
<Application.Resources>

</Application.Resources>
</Application.Resources>
</Application>
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
using WpfApp = System.Windows.Application;
using Uno.UI.Runtime.Skia.Wpf;

namespace Resizetizer.Extensions.Sample.WPF;

public partial class App : WpfApp
{
public App()
{
var host = new WpfHost(Dispatcher, () => new AppHead());
host.Run();
}
}

This file was deleted.

Loading
Loading