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

更新到 5.5 版本 #5

Merged
merged 5 commits into from
Jan 2, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/dotnet-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ jobs:
- name: Restore
run: dotnet workload restore samples/SampleUnoApp/SampleUnoApp.csproj
- name: Build
run: dotnet build -c release -p:TargetFramework=net8.0 -r linux-x64 samples/SampleUnoApp/SampleUnoApp.csproj
run: dotnet build -c release -p:TargetFramework=net8.0-desktop -r linux-x64 samples/SampleUnoApp/SampleUnoApp.csproj
26 changes: 10 additions & 16 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
<Project>

<Import Project="$(MSBuildThisFileDirectory)build\Version.props" />

<PropertyGroup>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<ArtifactsPath>$(MSBuildThisFileDirectory)artifacts</ArtifactsPath>
<Nullable>enable</Nullable>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<UnoSingleProject>true</UnoSingleProject>

<!--
Adding NoWarn to remove build warnings
NU1507: Warning when there are multiple package sources when using CPM with no source mapping
NETSDK1201: Warning that specifying RID won't create self containing app
PRI257: Ignore default language (en) not being one of the included resources (eg en-us, en-uk)
-->
<NoWarn>$(NoWarn);NU1507;NETSDK1201;PRI257</NoWarn>
</PropertyGroup>

<PropertyGroup>
<ArtifactsPath>$(MSBuildThisFileDirectory)artifacts</ArtifactsPath>
<RepositoryRoot>$(MSBuildThisFileDirectory)</RepositoryRoot>
<ThisYear>$([System.DateTime]::Now.ToString(`yyyy`))</ThisYear>
</PropertyGroup>
Expand All @@ -33,13 +36,4 @@
<Copyright>Copyright © $(ThisYear) dotnet campus, All Rights Reserved.</Copyright>
<Description>dotnetCampus.UISpy.Uno is a tool for inspecting the runtime visual tree of a Skia platforms Uno app.</Description>
</PropertyGroup>

<!-- See https://aka.platform.uno/using-uno-sdk#implicit-packages for more information regarding the Implicit Packages version properties. -->
<PropertyGroup>
<UnoExtensionsVersion>4.1.24</UnoExtensionsVersion>
<UnoToolkitVersion>6.0.24</UnoToolkitVersion>
<UnoThemesVersion>5.0.13</UnoThemesVersion>
<UnoCSharpMarkupVersion>5.2.14</UnoCSharpMarkupVersion>
</PropertyGroup>

</Project>
12 changes: 8 additions & 4 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<Project>
<Project ToolsVersion="15.0">
<!--
To update the version of Uno, you should instead update the Sdk version in the global.json file.

See https://aka.platform.uno/using-uno-sdk for more information.
See https://aka.platform.uno/using-uno-sdk#implicit-packages for more information regarding the Implicit Packages.
-->
<ItemGroup>
<PackageVersion Include="dotnetCampus.SourceLocalizations" Version="0.1.0-alpha03" />
<PackageVersion Include="Uno.WinUI.DevServer" Version="5.2.161" />
</ItemGroup>
</Project>
</Project>
59 changes: 17 additions & 42 deletions dotnetCampus.UISpy.Uno.sln
Original file line number Diff line number Diff line change
@@ -1,66 +1,41 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{E287B170-B5A6-47D9-9BE0-DCB42E6D1B1B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{CA52C3FC-4FBF-4B72-A552-E952E96BE5E9}"
VisualStudioVersion = 17.2.32210.308
MinimumVisualStudioVersion = 15.0.26124.0
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{BADA71DC-7FFD-4EDC-9F28-FB74AEADC713}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
.gitignore = .gitignore
.vsconfig = .vsconfig
Directory.Build.props = Directory.Build.props
Directory.Build.targets = Directory.Build.targets
Directory.Packages.props = Directory.Packages.props
global.json = global.json
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GitHub Action", "GitHub Action", "{302190EB-8221-45F7-9EBC-3B5DA8009B21}"
ProjectSection(SolutionItems) = preProject
.github\workflows\dotnet-build.yml = .github\workflows\dotnet-build.yml
.github\workflows\nuget-tag-publish.yml = .github\workflows\nuget-tag-publish.yml
EndProjectSection
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotNetCampus.UISpy.Uno", "src\DotNetCampus.UISpy.Uno\DotNetCampus.UISpy.Uno.csproj", "{490531CB-509E-4DF3-BE09-25F99AE5C2D8}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Repository", "Repository", "{87949850-0771-4A06-86C9-4CB5180C1904}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
.gitignore = .gitignore
nuget.config = nuget.config
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Documents", "Documents", "{D8020D94-F934-4717-9257-5727D8B24EF4}"
ProjectSection(SolutionItems) = preProject
LICENSE = LICENSE
README.md = README.md
README_zh-cn.md = README_zh-cn.md
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SampleUnoApp", "samples\SampleUnoApp\SampleUnoApp.csproj", "{1A6A1914-C307-4753-9C3D-FE469C8AD99C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnetCampus.UISpy.Uno", "src\dotnetCampus.UISpy.Uno\dotnetCampus.UISpy.Uno.csproj", "{FBBA5625-EDF7-44CA-8502-3AE8BFF37DC7}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleUnoApp", "samples\SampleUnoApp\SampleUnoApp.csproj", "{D63656D1-9B21-4C3A-B7E1-96F34E588F29}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1A6A1914-C307-4753-9C3D-FE469C8AD99C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1A6A1914-C307-4753-9C3D-FE469C8AD99C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1A6A1914-C307-4753-9C3D-FE469C8AD99C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1A6A1914-C307-4753-9C3D-FE469C8AD99C}.Release|Any CPU.Build.0 = Release|Any CPU
{FBBA5625-EDF7-44CA-8502-3AE8BFF37DC7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FBBA5625-EDF7-44CA-8502-3AE8BFF37DC7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FBBA5625-EDF7-44CA-8502-3AE8BFF37DC7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FBBA5625-EDF7-44CA-8502-3AE8BFF37DC7}.Release|Any CPU.Build.0 = Release|Any CPU
{490531CB-509E-4DF3-BE09-25F99AE5C2D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{490531CB-509E-4DF3-BE09-25F99AE5C2D8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{490531CB-509E-4DF3-BE09-25F99AE5C2D8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{490531CB-509E-4DF3-BE09-25F99AE5C2D8}.Release|Any CPU.Build.0 = Release|Any CPU
{D63656D1-9B21-4C3A-B7E1-96F34E588F29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D63656D1-9B21-4C3A-B7E1-96F34E588F29}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D63656D1-9B21-4C3A-B7E1-96F34E588F29}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D63656D1-9B21-4C3A-B7E1-96F34E588F29}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{302190EB-8221-45F7-9EBC-3B5DA8009B21} = {CA52C3FC-4FBF-4B72-A552-E952E96BE5E9}
{87949850-0771-4A06-86C9-4CB5180C1904} = {CA52C3FC-4FBF-4B72-A552-E952E96BE5E9}
{D8020D94-F934-4717-9257-5727D8B24EF4} = {CA52C3FC-4FBF-4B72-A552-E952E96BE5E9}
{1A6A1914-C307-4753-9C3D-FE469C8AD99C} = {E287B170-B5A6-47D9-9BE0-DCB42E6D1B1B}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {38F95BC8-C59F-4B7A-9471-F36AC12C89CF}
SolutionGuid = {312FE2FD-086D-472E-BC3A-11CEB5DEFA24}
EndGlobalSection
EndGlobal
8 changes: 5 additions & 3 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
// To update the version of Uno please update the version of the Uno.Sdk here. See https://aka.platform.uno/upgrade-uno-packages for more information.
"msbuild-sdks":
{
"Uno.Sdk": "5.2.161"
"msbuild-sdks": {
"Uno.Sdk": "5.5.56"
},
"sdk":{
"allowPrerelease": false
}
}
22 changes: 16 additions & 6 deletions samples/SampleUnoApp/App.xaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
<Application x:Class="dotnetCampus.SampleUnoApp.App"
<Application x:Class="SampleUnoApp.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:utum="using:Uno.Toolkit.UI.Material">
xmlns:um="using:Uno.Material">

<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<!-- Load WinUI resources -->
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
<!-- Load Uno.UI.Toolkit resources -->
<ToolkitResources xmlns="using:Uno.Toolkit.UI" />
<um:MaterialTheme
ColorOverrideSource="ms-appx:///Styles/ColorPaletteOverride.xaml">
<!-- NOTE: You can override the default Roboto font by providing your font assets here. -->
<!-- <um:MaterialTheme.FontOverrideDictionary>
<ResourceDictionary>
<FontFamily x:Key="MaterialLightFontFamily">ms-appx:///Uno.Fonts.Roboto/Fonts/Roboto-Light.ttf#Roboto</FontFamily>
<FontFamily x:Key="MaterialMediumFontFamily">ms-appx:///Uno.Fonts.Roboto/Fonts/Roboto-Medium.ttf#Roboto</FontFamily>
<FontFamily x:Key="MaterialRegularFontFamily">ms-appx:///Uno.Fonts.Roboto/Fonts/Roboto-Regular.ttf#Roboto</FontFamily>
</ResourceDictionary>
</um:MaterialTheme.FontOverrideDictionary> -->
</um:MaterialTheme>
</ResourceDictionary.MergedDictionaries>

<!-- Add resources here -->

</ResourceDictionary>
</Application.Resources>

<!-- Add resources here -->

</Application>
20 changes: 5 additions & 15 deletions samples/SampleUnoApp/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
using dotnetCampus.SampleUnoApp.Localizations;
using dotnetCampus.SampleUnoApp.Startup;

using System;
using Microsoft.Extensions.Logging;
using Uno.Resizetizer;

namespace dotnetCampus.SampleUnoApp;
namespace SampleUnoApp;

public partial class App : Application
{
Expand All @@ -13,24 +12,16 @@ public partial class App : Application
/// </summary>
public App()
{
this.SetupApp();
this.InitializeComponent();
}

protected Window? MainWindow { get; private set; }

protected override void OnLaunched(LaunchActivatedEventArgs args)
{
MainWindow = new Window
{
AppWindow =
{
Title = Lang.Current.ApplicationName,
}
};
this.AfterLaunched();
MainWindow = new Window();
#if DEBUG
MainWindow.EnableHotReload();
MainWindow.UseStudio();
#endif


Expand Down Expand Up @@ -58,7 +49,6 @@ protected override void OnLaunched(LaunchActivatedEventArgs args)
MainWindow.SetWindowIcon();
// Ensure the current window is active
MainWindow.Activate();
this.AfterMainWindowShown();
}

/// <summary>
Expand Down
3 changes: 1 addition & 2 deletions samples/SampleUnoApp/GlobalUsings.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
global using System.Collections.Immutable;

global using Microsoft.Extensions.DependencyInjection;
global using Microsoft.Extensions.Logging;

global using ApplicationExecutionState = Windows.ApplicationModel.Activation.ApplicationExecutionState;
[assembly: Uno.Extensions.Reactive.Config.BindableGenerationTool(3)]
6 changes: 0 additions & 6 deletions samples/SampleUnoApp/Localizations/Lang.cs

This file was deleted.

8 changes: 0 additions & 8 deletions samples/SampleUnoApp/Localizations/LangBindingSource.cs

This file was deleted.

2 changes: 0 additions & 2 deletions samples/SampleUnoApp/Localizations/en.toml

This file was deleted.

2 changes: 0 additions & 2 deletions samples/SampleUnoApp/Localizations/zh-hans.toml

This file was deleted.

35 changes: 16 additions & 19 deletions samples/SampleUnoApp/MainPage.xaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
<Page x:Class="dotnetCampus.SampleUnoApp.MainPage"
<Page x:Class="SampleUnoApp.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:SampleUnoApp"
xmlns:utu="using:Uno.Toolkit.UI"
xmlns:l="using:dotnetCampus.SampleUnoApp.Localizations"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">

<Page.Resources>
<l:LangBindingSource x:Key="LangBindingSource" />
</Page.Resources>

<StackPanel x:Name="StackPanel" utu:SafeArea.Insets="VisibleBounds"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<TextBlock AutomationProperties.AutomationId="HelloTextBlock"
Text="{x:Bind Lang.MainPage.Hello}"
HorizontalAlignment="Center" />
<Button Content="Get focus" />
<Button x:Name="ShowUnoSpyWindowButton" Content="Start ShowUnoSpyWindow" Click="Button_OnClick"/>
</StackPanel>

xmlns:um="using:Uno.Material"
Background="{ThemeResource BackgroundBrush}">
<ScrollViewer>
<Grid>
<StackPanel x:Name="StackPanel"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<TextBlock AutomationProperties.AutomationId="HelloTextBlock"
Text="Hello Uno Platform!"
HorizontalAlignment="Center" />
<Button Content="Get focus" />
<Button x:Name="ShowUnoSpyWindowButton" Content="Start ShowUnoSpyWindow" Click="Button_OnClick"/>
</StackPanel>
</Grid>
</ScrollViewer>
</Page>
10 changes: 3 additions & 7 deletions samples/SampleUnoApp/MainPage.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
using dotnetCampus.UISpy.Uno;
using DotNetCampus.UISpy.Uno;

namespace dotnetCampus.SampleUnoApp;
namespace SampleUnoApp;

public sealed partial class MainPage : Page
{
public MainPage()
{
InitializeComponent();

this.AttachDevTools();
this.InitializeComponent();
}

public dotnetCampus.SampleUnoApp.Localizations.Localizations.ILocalized_Root Lang => dotnetCampus.SampleUnoApp.Localizations.Lang.Current;

public void Button_OnClick(object sender, RoutedEventArgs args)
{
this.ShowUnoSpyWindow();
Expand Down
20 changes: 4 additions & 16 deletions samples/SampleUnoApp/Package.appxmanifest
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>

<?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">

<Identity
Name="SampleUnoApp"
Publisher="O=lvyi"
Version="1.0.0.0" />

<Properties>
<DisplayName>SampleUnoApp</DisplayName>
<PublisherDisplayName>SampleUnoApp</PublisherDisplayName>
</Properties>
<Identity />
<Properties />

<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
Expand All @@ -29,11 +21,7 @@
<Application Id="App"
Executable="$targetnametoken$.exe"
EntryPoint="$targetentrypoint$">
<uap:VisualElements
DisplayName="SampleUnoApp"
Description="SampleUnoApp">
<uap:SplashScreen />
</uap:VisualElements>
<uap:VisualElements />
</Application>
</Applications>

Expand Down
4 changes: 1 addition & 3 deletions samples/SampleUnoApp/Platforms/Desktop/Program.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
using Uno.UI.Runtime.Skia;

namespace dotnetCampus.SampleUnoApp;
namespace SampleUnoApp;

public class Program
{
[STAThread]
public static void Main(string[] args)
{
#if (!useDependencyInjection && useLoggingFallback)
App.InitializeLogging();

#endif
var host = SkiaHostBuilder.Create()
.App(() => new App())
.UseX11()
Expand Down
6 changes: 0 additions & 6 deletions samples/SampleUnoApp/Platforms/MacCatalyst/Entitlements.plist

This file was deleted.

Loading
Loading