From 303873fca4eae6ae0e7dd2e8b618f56a3a5d5d79 Mon Sep 17 00:00:00 2001 From: Aigio Liu Date: Sat, 16 Oct 2021 19:52:22 +0800 Subject: [PATCH] Windows PublishSingleFile --- SteamToolsV2+.sln | 31 --------------- .../api-ms-win-core-winrt-l1-1-0.dll | Bin 0 -> 19704 bytes .../Repositories.sqlite-net-pcl.csproj | 3 +- .../Properties/PublishProfiles/win-x64.pubxml | 10 +++-- .../ST.Client.Avalonia.App.csproj | 6 +++ .../UI/Views/Windows/FluentWindow.cs | 15 +++++--- ...atformServiceImpl.WindowTopRightButtons.cs | 2 +- .../Services/IPlatformService.MacOS.cs | 5 ++- .../Services/IPlatformService.Windows.cs | 36 +++++++++++++----- src/ST.Client/Services/IPlatformService.cs | 30 ++++++++++++--- .../UI/ViewModels/Base/IPageViewModel.cs | 12 ++++++ .../UI/ViewModels/Base/IWindowViewModel.cs | 15 ++++++++ .../UI/ViewModels/General/PageViewModel.cs | 2 +- .../UI/ViewModels/General/WindowViewModel.cs | 4 +- 14 files changed, 109 insertions(+), 62 deletions(-) create mode 100644 references/runtime.win7-x64.Microsoft.NETCore.Windows.ApiSets/api-ms-win-core-winrt-l1-1-0.dll create mode 100644 src/ST.Client/UI/ViewModels/Base/IPageViewModel.cs create mode 100644 src/ST.Client/UI/ViewModels/Base/IWindowViewModel.cs diff --git a/SteamToolsV2+.sln b/SteamToolsV2+.sln index f37c63e32..d433ca257 100644 --- a/SteamToolsV2+.sln +++ b/SteamToolsV2+.sln @@ -91,8 +91,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ArchiSteamFarm.Library", "r EndProject Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "ST.Client.Avalonia.App.Bridge.Package", "src\ST.Client.Desktop.Avalonia.App.Bridge.Package\ST.Client.Avalonia.App.Bridge.Package.wapproj", "{1F659618-71E2-4AAF-9D86-62700FD4CF02}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SQLite-net-std", "references\sqlite-net\nuget\SQLite-net-std\SQLite-net-std.csproj", "{B1F221F6-E19B-45D8-959D-A9CDA471C2D4}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Steam++", "src\ST.Client.Desktop.Avalonia.App.Bridge\Steam++.csproj", "{2A66B796-7BC2-4BE0-A920-1A457BBCCC67}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ST.Tools.DesktopBridgeLink", "src\ST.Tools.DesktopBridgeLink\ST.Tools.DesktopBridgeLink.csproj", "{137690DF-A3CB-4817-ACB8-9EAF3A52B5B5}" @@ -1013,34 +1011,6 @@ Global {1F659618-71E2-4AAF-9D86-62700FD4CF02}.Release|x86.ActiveCfg = Release|x86 {1F659618-71E2-4AAF-9D86-62700FD4CF02}.Release|x86.Build.0 = Release|x86 {1F659618-71E2-4AAF-9D86-62700FD4CF02}.Release|x86.Deploy.0 = Release|x86 - {B1F221F6-E19B-45D8-959D-A9CDA471C2D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B1F221F6-E19B-45D8-959D-A9CDA471C2D4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B1F221F6-E19B-45D8-959D-A9CDA471C2D4}.Debug|ARM.ActiveCfg = Debug|Any CPU - {B1F221F6-E19B-45D8-959D-A9CDA471C2D4}.Debug|ARM.Build.0 = Debug|Any CPU - {B1F221F6-E19B-45D8-959D-A9CDA471C2D4}.Debug|ARM64.ActiveCfg = Debug|Any CPU - {B1F221F6-E19B-45D8-959D-A9CDA471C2D4}.Debug|ARM64.Build.0 = Debug|Any CPU - {B1F221F6-E19B-45D8-959D-A9CDA471C2D4}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {B1F221F6-E19B-45D8-959D-A9CDA471C2D4}.Debug|iPhone.Build.0 = Debug|Any CPU - {B1F221F6-E19B-45D8-959D-A9CDA471C2D4}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {B1F221F6-E19B-45D8-959D-A9CDA471C2D4}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {B1F221F6-E19B-45D8-959D-A9CDA471C2D4}.Debug|x64.ActiveCfg = Debug|Any CPU - {B1F221F6-E19B-45D8-959D-A9CDA471C2D4}.Debug|x64.Build.0 = Debug|Any CPU - {B1F221F6-E19B-45D8-959D-A9CDA471C2D4}.Debug|x86.ActiveCfg = Debug|Any CPU - {B1F221F6-E19B-45D8-959D-A9CDA471C2D4}.Debug|x86.Build.0 = Debug|Any CPU - {B1F221F6-E19B-45D8-959D-A9CDA471C2D4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B1F221F6-E19B-45D8-959D-A9CDA471C2D4}.Release|Any CPU.Build.0 = Release|Any CPU - {B1F221F6-E19B-45D8-959D-A9CDA471C2D4}.Release|ARM.ActiveCfg = Release|Any CPU - {B1F221F6-E19B-45D8-959D-A9CDA471C2D4}.Release|ARM.Build.0 = Release|Any CPU - {B1F221F6-E19B-45D8-959D-A9CDA471C2D4}.Release|ARM64.ActiveCfg = Release|Any CPU - {B1F221F6-E19B-45D8-959D-A9CDA471C2D4}.Release|ARM64.Build.0 = Release|Any CPU - {B1F221F6-E19B-45D8-959D-A9CDA471C2D4}.Release|iPhone.ActiveCfg = Release|Any CPU - {B1F221F6-E19B-45D8-959D-A9CDA471C2D4}.Release|iPhone.Build.0 = Release|Any CPU - {B1F221F6-E19B-45D8-959D-A9CDA471C2D4}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {B1F221F6-E19B-45D8-959D-A9CDA471C2D4}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {B1F221F6-E19B-45D8-959D-A9CDA471C2D4}.Release|x64.ActiveCfg = Release|Any CPU - {B1F221F6-E19B-45D8-959D-A9CDA471C2D4}.Release|x64.Build.0 = Release|Any CPU - {B1F221F6-E19B-45D8-959D-A9CDA471C2D4}.Release|x86.ActiveCfg = Release|Any CPU - {B1F221F6-E19B-45D8-959D-A9CDA471C2D4}.Release|x86.Build.0 = Release|Any CPU {2A66B796-7BC2-4BE0-A920-1A457BBCCC67}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2A66B796-7BC2-4BE0-A920-1A457BBCCC67}.Debug|Any CPU.Build.0 = Debug|Any CPU {2A66B796-7BC2-4BE0-A920-1A457BBCCC67}.Debug|ARM.ActiveCfg = Debug|Any CPU @@ -1272,7 +1242,6 @@ Global {9A8D2254-9B2B-4B92-8498-43A73BB9A410} = {E448F863-4C9D-47A4-BC4A-4A1381B54DA4} {F4D8CD7B-6DF4-445C-AFA9-44466A552922} = {673FF8CD-9E85-4FA1-ABFC-D1149675E138} {1F659618-71E2-4AAF-9D86-62700FD4CF02} = {1B889C56-157A-4493-85F2-76366282B002} - {B1F221F6-E19B-45D8-959D-A9CDA471C2D4} = {673FF8CD-9E85-4FA1-ABFC-D1149675E138} {2A66B796-7BC2-4BE0-A920-1A457BBCCC67} = {1B889C56-157A-4493-85F2-76366282B002} {137690DF-A3CB-4817-ACB8-9EAF3A52B5B5} = {E448F863-4C9D-47A4-BC4A-4A1381B54DA4} {42154590-445B-41CF-AAEB-AACD1B65FA2C} = {673FF8CD-9E85-4FA1-ABFC-D1149675E138} diff --git a/references/runtime.win7-x64.Microsoft.NETCore.Windows.ApiSets/api-ms-win-core-winrt-l1-1-0.dll b/references/runtime.win7-x64.Microsoft.NETCore.Windows.ApiSets/api-ms-win-core-winrt-l1-1-0.dll new file mode 100644 index 0000000000000000000000000000000000000000..039e3b2d4ab98cefca0e81fda2d88faa49a259d9 GIT binary patch literal 19704 zcmeHv2UJr_xBp29Ep&o_^xiaZLPrGYMFeRAQiKpfkrD`@TOcATN>QnzQWUY%?1G?( z2#Nw05JkEuq9CAvsJuxKaX0tka99S_D6zpPKLqvyW#iyrtf!S z`rST&;7{xGGljOM5ag4@0I4|dbX<5g21!Y7z#z=Dfxf@n0_h85OF)p9GT8@D!9x%`jW?iz-i8U>ms|#b3(Dkh zG6B@l-vPV}y&a8FOD=5Hmc1L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q;zx8=x;f zr8Ur8(jAEd=h}-gKJ?9N0UBnZbz|V~_bOb-GZ#wyL^6HxQP;QWo zR<>eT*D5>dwaEsKIb2qCR=(Fs3#?S@+^r7p?FnlpANBMaNwr|T`-F_$U*ToTm^o#V zqOzJvgV_V+Z}pyhPTR!brlZ6w9nNv>hZmp_TDN=Z9(M1$iPx7cL7NDAIIDJ;j}j%vHc7v$a} z8ww&s)lX(MBp$#2Bz{(fS?p@<7EjBkCsPfW^;HgSHcu8L9%ill=CxPlwpQ;BLHQu| zGdo9>GI~bujmciAN&om@dEzM-FDt@{>Ev5_TkBWhLgfT4>)SzC%}22KKF}B6!GCru zI1hyV!n0Wlgi#Tyu+Spn0fN6ceuHViKO>zeaCpX!8bgJk}Y-^ zy=MQ_EL$8?rVe_o()a)NZQBZVo4NFJajV{rkCu{(Q@3;0)W+=zn=ylC3io5O*fY1! zF>f1EtaB&UOx$G=S;-{NrNO*;6L(lD`*_eEQlDUOgv9k-UP`CsMJ<`UJoRic?|kD< h*;LUV(wZM1T!&eIyV2ylLiUhE{+r}fy59^z{{?iJ)Z737 literal 0 HcmV?d00001 diff --git a/src/Repositories.sqlite-net-pcl/Repositories.sqlite-net-pcl.csproj b/src/Repositories.sqlite-net-pcl/Repositories.sqlite-net-pcl.csproj index e3fe8f9ae..11860c1ab 100644 --- a/src/Repositories.sqlite-net-pcl/Repositories.sqlite-net-pcl.csproj +++ b/src/Repositories.sqlite-net-pcl/Repositories.sqlite-net-pcl.csproj @@ -19,12 +19,11 @@ - - + \ No newline at end of file diff --git a/src/ST.Client.Desktop.Avalonia.App/Properties/PublishProfiles/win-x64.pubxml b/src/ST.Client.Desktop.Avalonia.App/Properties/PublishProfiles/win-x64.pubxml index 875f7c1b5..b7f17d9f1 100644 --- a/src/ST.Client.Desktop.Avalonia.App/Properties/PublishProfiles/win-x64.pubxml +++ b/src/ST.Client.Desktop.Avalonia.App/Properties/PublishProfiles/win-x64.pubxml @@ -4,7 +4,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. --> - PUBLISH;WINDOWS; + PUBLISH;PUBLISH_WIN7;WINDOWS; Release bin\Release\Publish\win-x64 FileSystem @@ -12,8 +12,12 @@ https://go.microsoft.com/fwlink/?LinkID=208121. Any CPU net6.0 true - false - + + + + + + true true diff --git a/src/ST.Client.Desktop.Avalonia.App/ST.Client.Avalonia.App.csproj b/src/ST.Client.Desktop.Avalonia.App/ST.Client.Avalonia.App.csproj index e6493f211..0f429fa67 100644 --- a/src/ST.Client.Desktop.Avalonia.App/ST.Client.Avalonia.App.csproj +++ b/src/ST.Client.Desktop.Avalonia.App/ST.Client.Avalonia.App.csproj @@ -94,6 +94,12 @@ + + + PreserveNewest + + + diff --git a/src/ST.Client.Desktop.Avalonia/Application/UI/Views/Windows/FluentWindow.cs b/src/ST.Client.Desktop.Avalonia/Application/UI/Views/Windows/FluentWindow.cs index 17c15be76..b27023c24 100644 --- a/src/ST.Client.Desktop.Avalonia/Application/UI/Views/Windows/FluentWindow.cs +++ b/src/ST.Client.Desktop.Avalonia/Application/UI/Views/Windows/FluentWindow.cs @@ -50,15 +50,18 @@ namespace Avalonia.Controls if (!ViewModelBase.IsInDesignMode) { - if (OperatingSystem2.IsWindows7) + if (OperatingSystem2.IsWindows) { + if (OperatingSystem2.IsWindows7) + { #pragma warning disable CA1416 // 验证平台兼容性 - IPlatformService.Instance.FixAvaloniaFluentWindowStyleOnWin7(PlatformImpl.Handle.Handle); + IPlatformService.Instance.FixAvaloniaFluentWindowStyleOnWin7(PlatformImpl.Handle.Handle); #pragma warning restore CA1416 // 验证平台兼容性 - } - else if (OperatingSystem2.IsWindows10AtLeast) - { - AvaloniaLocator.Current.GetService().ForceNativeTitleBarToTheme(this, "Dark"); + } + else if (OperatingSystem2.IsWindows10AtLeast) + { + AvaloniaLocator.Current.GetService().ForceNativeTitleBarToTheme(this, "Dark"); + } } } } diff --git a/src/ST.Client.Desktop.Windows/Services/Implementation/WindowsPlatformServiceImpl.WindowTopRightButtons.cs b/src/ST.Client.Desktop.Windows/Services/Implementation/WindowsPlatformServiceImpl.WindowTopRightButtons.cs index a31f6b33e..4b1654023 100644 --- a/src/ST.Client.Desktop.Windows/Services/Implementation/WindowsPlatformServiceImpl.WindowTopRightButtons.cs +++ b/src/ST.Client.Desktop.Windows/Services/Implementation/WindowsPlatformServiceImpl.WindowTopRightButtons.cs @@ -16,7 +16,7 @@ namespace System.Application.Services.Implementation public const int SC_MAXIMIZE = 0xF030; //public const int CS_DROPSHADOW = 0x20000; - public void FixFluentWindowStyleOnWin7(IntPtr hWnd) + public void FixAvaloniaFluentWindowStyleOnWin7(IntPtr hWnd) { if (!OperatingSystem2.IsWindows7) return; var value = GetWindowLong(hWnd, GWL_STYLE); diff --git a/src/ST.Client/Services/IPlatformService.MacOS.cs b/src/ST.Client/Services/IPlatformService.MacOS.cs index 7235dc041..fbdb7afd1 100644 --- a/src/ST.Client/Services/IPlatformService.MacOS.cs +++ b/src/ST.Client/Services/IPlatformService.MacOS.cs @@ -12,6 +12,9 @@ namespace System.Application.Services partial interface IPlatformService { [SupportedOSPlatform("MacOS")] - string[] GetMacNetworkSetup() => throw new PlatformNotSupportedException(); + string[] GetMacNetworkSetup() + { + return Array.Empty(); + } } } diff --git a/src/ST.Client/Services/IPlatformService.Windows.cs b/src/ST.Client/Services/IPlatformService.Windows.cs index 4bc138754..692213b3d 100644 --- a/src/ST.Client/Services/IPlatformService.Windows.cs +++ b/src/ST.Client/Services/IPlatformService.Windows.cs @@ -13,10 +13,16 @@ namespace System.Application.Services /// 打开桌面图标设置 /// [SupportedOSPlatform("Windows")] - void OpenDesktopIconsSettings() => throw new PlatformNotSupportedException(); + void OpenDesktopIconsSettings() + { + + } [SupportedOSPlatform("Windows")] - void OpenGameControllers() => throw new PlatformNotSupportedException(); + void OpenGameControllers() + { + + } /// /// 已正常权限启动进程 @@ -24,7 +30,10 @@ namespace System.Application.Services /// /// [SupportedOSPlatform("Windows")] - Process StartAsInvoker(string fileName) => throw new PlatformNotSupportedException(); + Process StartAsInvoker(string fileName) + { + return Process.Start(fileName); + } /// /// 获取占用端口的进程 @@ -33,34 +42,43 @@ namespace System.Application.Services /// /// [SupportedOSPlatform("Windows")] - Process? GetProcessByPortOccupy(ushort port, bool isTCPorUDP = true) => throw new PlatformNotSupportedException(); + Process? GetProcessByPortOccupy(ushort port, bool isTCPorUDP = true) + { + return null; + } /// /// 从管理员权限进程中降权到普通权限启动进程 /// /// [SupportedOSPlatform("Windows")] - void UnelevatedProcessStart(string cmdArgs) => throw new PlatformNotSupportedException(); + void UnelevatedProcessStart(string cmdArgs) + { + + } [SupportedOSPlatform("Windows")] - void FixAvaloniaFluentWindowStyleOnWin7(IntPtr hWnd) => throw new PlatformNotSupportedException(); + void FixAvaloniaFluentWindowStyleOnWin7(IntPtr hWnd) + { + + } /// /// 获取当前 Windows 系统产品名称,例如 Windows 10 Pro /// [SupportedOSPlatform("Windows")] - string WindowsProductName => throw new PlatformNotSupportedException(); + string WindowsProductName => string.Empty; /// /// 获取当前 Windows 系统第四位版本号 /// [SupportedOSPlatform("Windows")] - int WindowsVersionRevision => throw new PlatformNotSupportedException(); + int WindowsVersionRevision => default; /// /// 获取当前 Windows 10/11 系统显示版本,例如 21H1 /// [SupportedOSPlatform("Windows")] - string WindowsReleaseIdOrDisplayVersion => throw new PlatformNotSupportedException(); + string WindowsReleaseIdOrDisplayVersion => string.Empty; } } diff --git a/src/ST.Client/Services/IPlatformService.cs b/src/ST.Client/Services/IPlatformService.cs index 87887e944..baf030576 100644 --- a/src/ST.Client/Services/IPlatformService.cs +++ b/src/ST.Client/Services/IPlatformService.cs @@ -30,7 +30,10 @@ namespace System.Application.Services async void RunShell(string script, bool admin = false) => await RunShellAsync(script, admin); /// - ValueTask RunShellAsync(string script, bool admin = false) => throw new PlatformNotSupportedException(); + ValueTask RunShellAsync(string script, bool admin = false) + { + return new(); + } /// /// 使用文本阅读器打开文件 @@ -182,32 +185,47 @@ namespace System.Application.Services /// 使用资源管理器打开文件夹路径 /// /// - void OpenFolderByDirectoryPath(DirectoryInfo info) => throw new PlatformNotSupportedException(); + void OpenFolderByDirectoryPath(DirectoryInfo info) + { + + } /// /// 使用资源管理器选中文件路径 /// /// - void OpenFolderSelectFilePath(FileInfo info) => throw new PlatformNotSupportedException(); + void OpenFolderSelectFilePath(FileInfo info) + { + + } /// /// 设置系统关闭时任务 /// - void SetSystemSessionEnding(Action action) => throw new PlatformNotSupportedException(); + void SetSystemSessionEnding(Action action) + { + + } /// /// 获取文本阅读器提供商程序文件路径或文件名(如果提供程序已注册环境变量) /// /// /// - string? GetFileName(TextReaderProvider provider) => throw new PlatformNotSupportedException(); + string? GetFileName(TextReaderProvider provider) + { + return null; + } /// /// 设置开机自启动 /// /// 开启、关闭 /// - void SetBootAutoStart(bool isAutoStart, string name) => throw new PlatformNotSupportedException(); + void SetBootAutoStart(bool isAutoStart, string name) + { + + } #region Steam diff --git a/src/ST.Client/UI/ViewModels/Base/IPageViewModel.cs b/src/ST.Client/UI/ViewModels/Base/IPageViewModel.cs new file mode 100644 index 000000000..f3b3be480 --- /dev/null +++ b/src/ST.Client/UI/ViewModels/Base/IPageViewModel.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Text; + +// ReSharper disable once CheckNamespace +namespace System.Application.UI.ViewModels +{ + public interface IPageViewModel : IViewModelBase + { + string Title { get; set; } + } +} diff --git a/src/ST.Client/UI/ViewModels/Base/IWindowViewModel.cs b/src/ST.Client/UI/ViewModels/Base/IWindowViewModel.cs new file mode 100644 index 000000000..af9fc8e43 --- /dev/null +++ b/src/ST.Client/UI/ViewModels/Base/IWindowViewModel.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +// ReSharper disable once CheckNamespace +namespace System.Application.UI.ViewModels +{ + public interface IWindowViewModel : IPageViewModel + { + /// + /// 是否支持窗口大小与位置 + /// + public static bool IsSupportedSizePosition { protected get; set; } = true; + } +} diff --git a/src/ST.Client/UI/ViewModels/General/PageViewModel.cs b/src/ST.Client/UI/ViewModels/General/PageViewModel.cs index fc63d6a09..8896c1372 100644 --- a/src/ST.Client/UI/ViewModels/General/PageViewModel.cs +++ b/src/ST.Client/UI/ViewModels/General/PageViewModel.cs @@ -9,7 +9,7 @@ using System.Text; // ReSharper disable once CheckNamespace namespace System.Application.UI.ViewModels { - public class PageViewModel : ViewModelBase + public class PageViewModel : ViewModelBase, IPageViewModel { protected string title = string.Empty; [IgnoreDataMember] diff --git a/src/ST.Client/UI/ViewModels/General/WindowViewModel.cs b/src/ST.Client/UI/ViewModels/General/WindowViewModel.cs index 4f221fe99..8b3973df2 100644 --- a/src/ST.Client/UI/ViewModels/General/WindowViewModel.cs +++ b/src/ST.Client/UI/ViewModels/General/WindowViewModel.cs @@ -10,9 +10,9 @@ using System.Text; // ReSharper disable once CheckNamespace namespace System.Application.UI.ViewModels { - public class WindowViewModel : PageViewModel + public class WindowViewModel : PageViewModel, IWindowViewModel { - public static bool IsSupportedSizePosition { get; set; } = true; + public static bool IsSupportedSizePosition => IWindowViewModel.IsSupportedSizePosition; protected SizePosition? _SizePosition; public SizePosition SizePosition