Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6cfd47cb17 | ||
|
|
26d7690092 | ||
|
|
c2134298b5 | ||
|
|
746fed8cdb | ||
|
|
31eae8b056 | ||
|
|
ae867373dd | ||
|
|
e6fac670f7 | ||
|
|
cc82301e92 | ||
|
|
545610d927 | ||
|
|
db4ea77939 | ||
|
|
1c413817fa | ||
|
|
ca94efb132 | ||
|
|
5809dc7d59 | ||
|
|
c9af4408e0 | ||
|
|
66af5379cb | ||
|
|
97394b81e9 | ||
|
|
225dd3d748 | ||
|
|
be313984c7 | ||
|
|
bbe7bf2c22 | ||
|
|
840711740e | ||
|
|
f792622653 | ||
|
|
f8a5938375 | ||
|
|
5b8a84b4e1 | ||
|
|
f2a2650523 | ||
|
|
43a3f3c0dc | ||
|
|
68c7b324af | ||
|
|
251ab23db8 | ||
|
|
7121e416fc | ||
|
|
4fd0dbf784 | ||
|
|
107623b26a | ||
|
|
35af87946d | ||
|
|
083b214b97 | ||
|
|
9ac178d375 | ||
|
|
3d76038301 | ||
|
|
704cd5116c | ||
|
|
b46cb4e10e | ||
|
|
f680738f12 | ||
|
|
faaaeb592d | ||
|
|
259fe3e592 | ||
|
|
e50945332f | ||
|
|
17a9ec53cc | ||
|
|
a043373430 | ||
|
|
5f5607b6c2 | ||
|
|
9198b18e4f | ||
|
|
a0c5117f5e | ||
|
|
628a845fa6 | ||
|
|
082b5b72b1 | ||
|
|
f25a4f49a8 | ||
|
|
47c06f2b9a | ||
|
|
2a450c237d | ||
|
|
21bd1d2b32 | ||
|
|
092c59b5b2 | ||
|
|
25a99127f5 | ||
|
|
216869ab56 | ||
|
|
b5c3842ea7 | ||
|
|
20ea077f4c | ||
|
|
41ea7f6e58 | ||
|
|
0f9235e1f0 | ||
|
|
7adadfb6e8 | ||
|
|
69c7a3fcef | ||
|
|
ab4d12df52 | ||
|
|
efb7578ff9 | ||
|
|
5cf35a37ac | ||
|
|
8df7ab3b9c | ||
|
|
643ff4a41d | ||
|
|
11d20f36f3 | ||
|
|
28f1198a9c | ||
|
|
71e8777414 | ||
|
|
c80f57153e | ||
|
|
d30bcdb374 | ||
|
|
679e75ea54 | ||
|
|
f936401a2e | ||
|
|
71d7ee8cff | ||
|
|
364a0f5c23 | ||
|
|
4a200f1ae4 | ||
|
|
d228201a4e | ||
|
|
606e203df5 | ||
|
|
c4e5c5e8a6 | ||
|
|
b3a387f0a6 | ||
|
|
2d56a44117 | ||
|
|
aa625e5f44 | ||
|
|
ea92cccf59 | ||
|
|
15ab81f6e4 | ||
|
|
98ff99257b | ||
|
|
2e647b49bf | ||
|
|
5a1a04e988 | ||
|
|
5ba959d69c | ||
|
|
fd7f8b3897 | ||
|
|
7444559b84 | ||
|
|
a4c3317c10 | ||
|
|
bb8a8cd498 | ||
|
|
a498bb69f5 | ||
|
|
735ed43fa2 | ||
|
|
ab44d9028f | ||
|
|
bf940b46f3 | ||
|
|
a6e5911b32 | ||
|
|
5e5c08d507 | ||
|
|
058091e904 | ||
|
|
6e23a4bf07 | ||
|
|
084f1b3765 | ||
|
|
6e87610611 | ||
|
|
f74fe9abea | ||
|
|
41ad3c1831 | ||
|
|
c80806d5cb | ||
|
|
ce357c39f7 | ||
|
|
c50ffab7ed | ||
|
|
f6afb0bbb3 | ||
|
|
f1d62b958c | ||
|
|
1b1bc81f91 | ||
|
|
436df007a9 | ||
|
|
c67b84ea7a | ||
|
|
ef2cc93f57 | ||
|
|
0fa8efbfff | ||
|
|
45c0987a72 | ||
|
|
0dd9184b24 | ||
|
|
1cd6540e2d | ||
|
|
2dfd72b34b | ||
|
|
d391e3b266 | ||
|
|
316d514b9b | ||
|
|
0923e5ad3e | ||
|
|
4a49340f7a | ||
|
|
190e87bee0 | ||
|
|
5214aafc34 | ||
|
|
2998125b70 | ||
|
|
2f58d8cdd2 | ||
|
|
7d9a8535e0 | ||
|
|
8301ec7fdb | ||
|
|
c6831c764b | ||
|
|
c2d6b384ee | ||
|
|
946e12e15a | ||
|
|
14ddd2cd6e | ||
|
|
90a13306b9 | ||
|
|
bd9632f4f6 | ||
|
|
565185378f |
@@ -10,12 +10,12 @@
|
||||
[submodule "references/Steam4NET"]
|
||||
path = references/Steam4NET
|
||||
url = https://github.com/SteamTools-Team/Steam4NET.git
|
||||
[submodule "references/WinAuth"]
|
||||
path = references/WinAuth
|
||||
url = https://github.com/SteamTools-Team/WinAuth.git
|
||||
[submodule "references/Depressurizer"]
|
||||
path = references/Depressurizer
|
||||
url = https://github.com/SteamTools-Team/Depressurizer.git
|
||||
[submodule "references/AvaloniaGif"]
|
||||
path = references/AvaloniaGif
|
||||
url = https://github.com/SteamTools-Team/AvaloniaGif
|
||||
[submodule "references/WinAuth"]
|
||||
path = references/WinAuth
|
||||
url = https://github.com/SteamTools-Team/WinAuth
|
||||
|
||||
@@ -140,6 +140,7 @@ Read what we [milestones](https://github.com/SteamTools-Team/SteamTools/mileston
|
||||
* [NPOI](https://github.com/nissl-lab/npoi)
|
||||
* [Swashbuckle.AspNetCore](https://github.com/domaindrivendev/Swashbuckle.AspNetCore)
|
||||
* [AspNet.Security.OpenId.Providers](https://github.com/aspnet-contrib/AspNet.Security.OpenId.Providers)
|
||||
* [AspNet.Security.OAuth.Providers](https://github.com/aspnet-contrib/AspNet.Security.OAuth.Providers)
|
||||
* [CefNet](https://github.com/CefNet/CefNet)
|
||||
* [CefSharp](https://github.com/cefsharp/CefSharp)
|
||||
* [React](https://github.com/facebook/react)
|
||||
|
||||
@@ -152,6 +152,7 @@
|
||||
* [NPOI](https://github.com/nissl-lab/npoi)
|
||||
* [Swashbuckle.AspNetCore](https://github.com/domaindrivendev/Swashbuckle.AspNetCore)
|
||||
* [AspNet.Security.OpenId.Providers](https://github.com/aspnet-contrib/AspNet.Security.OpenId.Providers)
|
||||
* [AspNet.Security.OAuth.Providers](https://github.com/aspnet-contrib/AspNet.Security.OAuth.Providers)
|
||||
* [CefNet](https://github.com/CefNet/CefNet)
|
||||
* [CefSharp](https://github.com/cefsharp/CefSharp)
|
||||
* [React](https://github.com/facebook/react)
|
||||
|
||||
@@ -1,35 +1,38 @@
|
||||
1. 新增 手动更新检查
|
||||
2. 改进 修改账号切换操作交互
|
||||
3. 修复 修改账号切换 UI 错位
|
||||
4. 修复 Steam 快速登录时无法查看本地令牌
|
||||
5. 改进 多开程序时将会显示主窗口
|
||||
6. 改进 hosts 文件属性为只读且不可修改属性时显示的错误文本
|
||||
7. 改进 Steam 快速登录现在会显示已登录的用户账号可免输入账号密码一键登录
|
||||
8. 改进 增加错误日志纪录文件数量与大小限制
|
||||
9. 改进 库存游戏列表加载方式
|
||||
10. 改进 社区加速速度与使用中出现的错误
|
||||
11. 改进 删除账号时弹窗是否删除用户数据
|
||||
12. 改进 检测进程是否存在的逻辑,避免杀软误报
|
||||
13. 修复 编辑文本文件,当文件路径如果有空格时传递的路径不正确
|
||||
14. 修复 Steam 登录时头像没有正常显示
|
||||
15. 新增 Github 网站、Git 加速
|
||||
16. 改进 Toast 仅在当前激活窗口弹出
|
||||
17. 修复 未启动 Steam 时加载库存游戏 Bug
|
||||
18. 修复 一些引发闪退的异常,增强稳定性
|
||||
1. 改进 端口被占用检测进程名
|
||||
2. 修复 部分 Toast 没有正确显示
|
||||
3. 新增 账号注销功能
|
||||
4. 改进 hosts 文件写入无权操作时显示的错误文本
|
||||
5. 新增 快速登录后可绑定手机号
|
||||
6. 新增 解绑快速登录账号
|
||||
7. 新增 隐藏库存游戏
|
||||
8. 新增 游戏功能-无边框窗口化
|
||||
9. 新增 关于-更新日志
|
||||
10. 新增 令牌加密设置,现在新增令牌默认将不启用本机加密
|
||||
11. 修复 非正常退出程序时导致残留进程且无法启动程序
|
||||
12. 改进 不再写入 C:\Users\用户名\AppData\Local 目录
|
||||
13. 修复 文本框中某些符号可能无法正确输入
|
||||
14. 改进 令牌排序上移下移
|
||||
15. 新增 令牌导入导出
|
||||
16. 新增 游戏时长挂机功能
|
||||
17. 新增 Microsoft 账号快速登录与绑定
|
||||
18. 新增 社区加速 hCaptcha 验证码 / EPIC 验证码 / artstation / v2ex
|
||||
19. 修复 社区加速 discord 更新下载
|
||||
|
||||
| File | Checksum (SHA256) |
|
||||
| ---- | ---- |
|
||||
| Steam++_win_x86_v2.2.0.7z | SHA256 |
|
||||
| Steam++_win_x86_v2.2.0.exe | SHA256 |
|
||||
| Steam++_win_arm64_v2.2.0.7z | SHA256 |
|
||||
| Steam++_win_arm64_v2.2.0.exe | SHA256 |
|
||||
| Steam++_linux_x64_v2.2.0.7z | SHA256 |
|
||||
| Steam++_linux_x64_v2.2.0.deb | SHA256 |
|
||||
| Steam++_macos_x64_v2.2.0.dmg | SHA256 |
|
||||
| Steam++_macos_arm64_v2.2.0.dmg | SHA256 |
|
||||
| Steam++_android_v2.2.0.apk | SHA256 |
|
||||
| Steam++_android_arm64_v2.2.0.apk | SHA256 |
|
||||
| Steam++_android_arm_v2.2.0.apk | SHA256 |
|
||||
| Steam++_win_x86_v2.3.0.7z | SHA256 |
|
||||
| Steam++_win_x86_v2.3.0.exe | SHA256 |
|
||||
| Steam++_win_x86_v2.3.0.msix | SHA256 |
|
||||
| Steam++_win_arm64_v2.3.0.7z | SHA256 |
|
||||
| Steam++_win_arm64_v2.3.0.exe | SHA256 |
|
||||
| Steam++_win_arm64_v2.3.0.msix | SHA256 |
|
||||
| Steam++_linux_x64_v2.3.0.7z | SHA256 |
|
||||
| Steam++_linux_x64_v2.3.0.deb | SHA256 |
|
||||
| Steam++_macos_x64_v2.3.0.dmg | SHA256 |
|
||||
| Steam++_macos_arm64_v2.3.0.dmg | SHA256 |
|
||||
| Steam++_android_v2.3.0.apk | SHA256 |
|
||||
| Steam++_android_arm64_v2.3.0.apk | SHA256 |
|
||||
| Steam++_android_arm_v2.3.0.apk | SHA256 |
|
||||
|
||||
***
|
||||
|
||||
|
||||
|
After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.8 KiB |
@@ -1,4 +1,4 @@
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace System.Application.Services
|
||||
{
|
||||
|
||||
@@ -33,7 +33,46 @@ namespace System.Application.Services
|
||||
/// <returns></returns>
|
||||
ValueTask<string?> D(byte[]? value, string? secondaryPassword = null);
|
||||
|
||||
/// <inheritdoc cref="D(byte[]?, string?)"/>
|
||||
ValueTask<(string? content, DResultCode resultCode)> D2(byte[]? value, string? secondaryPassword = null);
|
||||
|
||||
/// <inheritdoc cref="D(byte[]?, string?)"/>
|
||||
ValueTask<byte[]?> DB(byte[]? value, string? secondaryPassword = null);
|
||||
|
||||
/// <inheritdoc cref="D(byte[]?, string?)"/>
|
||||
ValueTask<(byte[]? content, DResultCode resultCode)> DB2(byte[]? value, string? secondaryPassword = null);
|
||||
|
||||
public enum DResultCode
|
||||
{
|
||||
/// <summary>
|
||||
/// 成功
|
||||
/// </summary>
|
||||
Success = 200,
|
||||
|
||||
/// <summary>
|
||||
/// 嵌入 Aes 失败
|
||||
/// </summary>
|
||||
EmbeddedAesFail = 901,
|
||||
|
||||
/// <summary>
|
||||
/// 仅本机失败
|
||||
/// </summary>
|
||||
LocalFail,
|
||||
|
||||
/// <summary>
|
||||
/// 二级密码失败
|
||||
/// </summary>
|
||||
SecondaryPasswordFail,
|
||||
|
||||
/// <summary>
|
||||
/// 密文值不正确
|
||||
/// </summary>
|
||||
IncorrectValueFail,
|
||||
|
||||
/// <summary>
|
||||
/// 转换字符串失败
|
||||
/// </summary>
|
||||
UTF8GetStringFail,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ using System.Linq;
|
||||
using System.Security;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static System.Application.Services.ISecurityService;
|
||||
|
||||
namespace System.Application.Services.Implementation
|
||||
{
|
||||
@@ -76,23 +77,35 @@ namespace System.Application.Services.Implementation
|
||||
|
||||
public async ValueTask<string?> D(byte[]? value, string? secondaryPassword)
|
||||
{
|
||||
var value2 = await DB(value, secondaryPassword);
|
||||
if (value2 == null || !value2.Any()) return null;
|
||||
(var content, var _) = await D2(value, secondaryPassword);
|
||||
return content;
|
||||
}
|
||||
|
||||
public async ValueTask<(string? content, DResultCode resultCode)> D2(byte[]? value, string? secondaryPassword)
|
||||
{
|
||||
(var content, var resultCode) = await DB2(value, secondaryPassword);
|
||||
if (resultCode != DResultCode.Success || content == null || !content.Any()) return (null, resultCode);
|
||||
try
|
||||
{
|
||||
return Encoding.UTF8.GetString(value2);
|
||||
var content_ = Encoding.UTF8.GetString(content);
|
||||
return (content_, DResultCode.Success);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return null;
|
||||
return (null, DResultCode.UTF8GetStringFail);
|
||||
}
|
||||
}
|
||||
|
||||
public async ValueTask<byte[]?> DB(byte[]? value, string? secondaryPassword)
|
||||
{
|
||||
if (value == null) return value;
|
||||
if (value.Length == 0) return value;
|
||||
if (value.Length <= sizeof(int)) return null;
|
||||
(var content, var _) = await DB2(value, secondaryPassword);
|
||||
return content;
|
||||
}
|
||||
|
||||
public async ValueTask<(byte[]? content, DResultCode resultCode)> DB2(byte[]? value, string? secondaryPassword)
|
||||
{
|
||||
if (value == null || value.Length == 0) return (value, DResultCode.Success);
|
||||
if (value.Length <= sizeof(int)) return (null, DResultCode.IncorrectValueFail);
|
||||
|
||||
var d_type = (EncryptionMode)BitConverter.ToInt32(value, 0);
|
||||
switch (d_type)
|
||||
@@ -100,27 +113,37 @@ namespace System.Application.Services.Implementation
|
||||
case EncryptionMode.EmbeddedAes:
|
||||
var value_1 = UnConcat(value);
|
||||
var value_1_r = ea.DB(value_1);
|
||||
return value_1_r;
|
||||
return (value_1_r, value_1_r == null ?
|
||||
DResultCode.EmbeddedAesFail : DResultCode.Success);
|
||||
case EncryptionMode.EmbeddedAesWithLocal:
|
||||
var value_2 = UnConcat(value);
|
||||
var value_2_local = await local.DB(value_2);
|
||||
if (value_2_local == null) return (null, DResultCode.LocalFail);
|
||||
var value_2_r = ea.DB(value_2_local);
|
||||
return value_2_r;
|
||||
return (value_2_r, value_2_r == null ?
|
||||
DResultCode.EmbeddedAesFail : DResultCode.Success);
|
||||
case EncryptionMode.EmbeddedAesWithSecondaryPassword:
|
||||
if (string.IsNullOrWhiteSpace(secondaryPassword)) return null;
|
||||
if (string.IsNullOrWhiteSpace(secondaryPassword))
|
||||
return (null, DResultCode.SecondaryPasswordFail);
|
||||
var value_3 = UnConcat(value);
|
||||
var value_3_sp = sp.DB(value_3, secondaryPassword);
|
||||
if (value_3_sp == null) return (null, DResultCode.SecondaryPasswordFail);
|
||||
var value_3_r = ea.DB(value_3_sp);
|
||||
return value_3_r;
|
||||
return (value_3_r, value_3_r == null ?
|
||||
DResultCode.EmbeddedAesFail : DResultCode.Success);
|
||||
case EncryptionMode.EmbeddedAesWithSecondaryPasswordWithLocal:
|
||||
if (string.IsNullOrWhiteSpace(secondaryPassword)) return null;
|
||||
if (string.IsNullOrWhiteSpace(secondaryPassword))
|
||||
return (null, DResultCode.SecondaryPasswordFail);
|
||||
var value_4 = UnConcat(value);
|
||||
var value_4_local = await local.DB(value_4);
|
||||
if (value_4_local == null) return (null, DResultCode.LocalFail);
|
||||
var value_4_sp = sp.DB(value_4_local, secondaryPassword);
|
||||
if (value_4_sp == null) return (null, DResultCode.SecondaryPasswordFail);
|
||||
var value_4_r = ea.DB(value_4_sp);
|
||||
return value_4_r;
|
||||
return (value_4_r, value_4_r == null ?
|
||||
DResultCode.EmbeddedAesFail : DResultCode.Success);
|
||||
default:
|
||||
return null;
|
||||
return (null, DResultCode.IncorrectValueFail);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading.Tasks;
|
||||
using Xamarin.Essentials;
|
||||
|
||||
namespace System.Security
|
||||
@@ -30,5 +30,11 @@ namespace System.Security
|
||||
var result = SecureStorage.Remove(key);
|
||||
return Task.FromResult(result);
|
||||
}
|
||||
|
||||
async Task<bool> IStorage.ContainsKeyAsync(string key)
|
||||
{
|
||||
var result = await SecureStorage.GetAsync(key);
|
||||
return result != null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Application.Repositories;
|
||||
using System.Application.Repositories;
|
||||
using System.Application.Services;
|
||||
using System.Security.Cryptography;
|
||||
using System.Threading.Tasks;
|
||||
@@ -57,5 +57,12 @@ namespace System.Security
|
||||
var result = await DeleteAsync(key);
|
||||
return result > 0;
|
||||
}
|
||||
|
||||
async Task<bool> IStorage.ContainsKeyAsync(string key)
|
||||
{
|
||||
key = GetKey(key);
|
||||
var item = await FirstOrDefaultAsync(x => x.Id == key);
|
||||
return item != null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using System.ApplicationModel;
|
||||
|
||||
namespace System.ApplicationModel
|
||||
{
|
||||
public static class DesktopBridgeHelper
|
||||
{
|
||||
public static bool IsDesktopBridge { internal get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
namespace System
|
||||
{
|
||||
partial class DI
|
||||
{
|
||||
public static bool IsDesktopBridge => DesktopBridgeHelper.IsDesktopBridge;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netstandard2.1;netcoreapp3.1</TargetFrameworks>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#if !NOT_DI
|
||||
#if !NOT_DI
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
#endif
|
||||
using System.Linq;
|
||||
@@ -12,7 +12,7 @@ namespace System
|
||||
/// <summary>
|
||||
/// 依赖注入服务组(DependencyInjection)
|
||||
/// </summary>
|
||||
public static class DI
|
||||
public static partial class DI
|
||||
{
|
||||
#if !NOT_DI
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
using System.Diagnostics;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace System
|
||||
{
|
||||
public static class ProcessExtensions
|
||||
{
|
||||
public static ProcessModule? TryGetMainModule(this Process process)
|
||||
{
|
||||
try
|
||||
{
|
||||
return process.MainModule;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
namespace System.Extensions
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace System
|
||||
{
|
||||
public static partial class StringExtensions
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// https://github.com/aspnet/AspNetIdentity/blob/master/src/Microsoft.AspNet.Identity.Core/AsyncHelper.cs
|
||||
// https://github.com/aspnet/AspNetIdentity/blob/master/src/Microsoft.AspNet.Identity.Core/AsyncHelper.cs
|
||||
using System.Globalization;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
@@ -8,7 +8,7 @@ namespace System
|
||||
{
|
||||
public static class TaskExtensions
|
||||
{
|
||||
static readonly TaskFactory _myTaskFactory = new TaskFactory(CancellationToken.None,
|
||||
static readonly TaskFactory _myTaskFactory = new(CancellationToken.None,
|
||||
TaskCreationOptions.None, TaskContinuationOptions.None, TaskScheduler.Default);
|
||||
|
||||
public static TResult RunSync<TResult>(this Func<Task<TResult>> func)
|
||||
|
||||
@@ -56,5 +56,15 @@ namespace System
|
||||
public const string EXE = ".exe";
|
||||
|
||||
public const string _7Z = ".7z";
|
||||
|
||||
public const string APPX = ".appx";
|
||||
|
||||
public const string MSIX = ".msix";
|
||||
|
||||
public const string APPX_Bundle = ".appxbundle";
|
||||
|
||||
public const string MSIX_Bundle = ".msixbundle";
|
||||
|
||||
public const string AppInstaller = ".appinstaller";
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace System
|
||||
namespace System
|
||||
{
|
||||
/// <summary>
|
||||
/// MIME 类型
|
||||
@@ -62,5 +62,15 @@
|
||||
public const string MP4 = "video/mp4";
|
||||
|
||||
public const string APNG = "image/apng";
|
||||
|
||||
public const string APPX = "application/appx";
|
||||
|
||||
public const string MSIX = "application/msix";
|
||||
|
||||
public const string APPX_Bundle = "application/appxbundle";
|
||||
|
||||
public const string MSIX_Bundle = "application/msixbundle";
|
||||
|
||||
public const string AppInstaller = "application/appinstaller";
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ using System.Runtime.CompilerServices;
|
||||
using static System.Properties.ThisAssembly;
|
||||
|
||||
[assembly: SuppressIldasm]
|
||||
[assembly: AssemblyTitle(AssemblyTrademark)]
|
||||
[assembly: AssemblyTrademark(AssemblyTrademark)]
|
||||
[assembly: AssemblyDescription(AssemblyDescription)]
|
||||
[assembly: AssemblyProduct(AssemblyProduct)]
|
||||
|
||||
@@ -2,7 +2,7 @@ namespace System.Properties
|
||||
{
|
||||
static partial class ThisAssembly
|
||||
{
|
||||
public const string Version = "2.2.0";
|
||||
public const string Version = "2.3.0";
|
||||
|
||||
public const string InfoVersion = Version /*+ "-beta"*/;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using System.Text;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace System.Security
|
||||
{
|
||||
/// <summary>
|
||||
/// 为键/值对提供简单的安全存储
|
||||
/// 为键/值对提供简单的安全存储(值类型泛型与非泛型重载方法不兼容)
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>每个平台使用平台提供的本机API来安全存储数据:</para>
|
||||
@@ -128,6 +128,8 @@ namespace System.Security
|
||||
}
|
||||
}
|
||||
|
||||
Task<bool> ContainsKeyAsync(string key);
|
||||
|
||||
static IStorage Instance => DI.Get<IStorage>();
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Win32;
|
||||
@@ -198,6 +198,12 @@ namespace System.Application
|
||||
return controller.NotFound();
|
||||
}
|
||||
|
||||
public static IActionResult GetEnv(ControllerBase controller, IWebHostEnvironment environment)
|
||||
{
|
||||
var content = $"<h1>{environment.EnvironmentName}</h1>";
|
||||
return controller.Content(content, MediaTypeNames.HTML);
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Path2.InitFileSystem(Func{string}, Func{string})"/>
|
||||
public static void InitFileSystem(IWebHostEnvironment environment)
|
||||
{
|
||||
|
||||
@@ -32,12 +32,12 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.5" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="5.0.5" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.5" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.6" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="5.0.6" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.6" />
|
||||
<!--<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="5.0.2" />-->
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.5" />
|
||||
<PackageReference Include="NLog" Version="4.7.9" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.6" />
|
||||
<PackageReference Include="NLog" Version="4.7.10" />
|
||||
<PackageReference Include="NLog.Web.AspNetCore" Version="4.12.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.Application.Repositories;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
@@ -49,5 +49,11 @@ namespace System.Security
|
||||
var result = await DeleteAsync(key);
|
||||
return result > 0;
|
||||
}
|
||||
|
||||
async Task<bool> IStorage.ContainsKeyAsync(string key)
|
||||
{
|
||||
var result = await Get(key).AnyAsync();
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -44,6 +44,7 @@
|
||||
- 目标框架使用 .NET Framework 3.5 并通过 App.config 配置允许在 4.X 中运行 实现在 Windows 上兼容所有的运行库环境
|
||||
- Launch **启动项**
|
||||
- ST.Client.Desktop.Avalonia.App **桌面客户端**
|
||||
- ST.Client.Desktop.Avalonia.App.Bridge* **Desktop Bridge**
|
||||
- ST.Client.Desktop.Avalonia.Demo.App **桌面客户端(UI演示)**
|
||||
- ST.Client.Mobile.Droid.App **Android 客户端**
|
||||
- ST.Client.Mobile.iOS.App **iOS 客户端**
|
||||
|
||||
@@ -73,6 +73,7 @@ namespace System
|
||||
|
||||
if (pSoftDeleted.IsAssignableFrom(type))
|
||||
{
|
||||
// https://docs.microsoft.com/zh-cn/ef/core/querying/filters
|
||||
modelBuilder.Entity(type, p => p.HasIndex(nameof(ISoftDeleted.SoftDeleted)));
|
||||
modelBuilder.Entity(type).HasQueryFilter(SoftDeletedQueryFilter(type));
|
||||
softDeleted.Add(type);
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.5" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="5.0.5" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.6" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="5.0.6" />
|
||||
<PackageReference Include="Z.EntityFramework.Plus.EFCore" Version="5.1.30" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Application.Columns;
|
||||
using System.Application.Columns;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace System
|
||||
@@ -78,14 +78,14 @@ namespace System
|
||||
/// <returns></returns>
|
||||
public static FormattableString SoftDeleteFromTableNameWhereIdEqual(string tableName, object id)
|
||||
{
|
||||
var sql = UpdateFrom + tableName + " set " + nameof(ISoftDeleted.SoftDeleted) + " = 1" + WhereIdEqual_0;
|
||||
var sql = Update + tableName + " set " + nameof(ISoftDeleted.SoftDeleted) + " = 1" + WhereIdEqual_0;
|
||||
return FormattableStringFactory.Create(sql, id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// "update from "
|
||||
/// "update "
|
||||
/// </summary>
|
||||
public const string UpdateFrom = "update from ";
|
||||
public const string Update = "update ";
|
||||
|
||||
/// <summary>
|
||||
/// " where Id in ("
|
||||
|
||||
|
After Width: | Height: | Size: 250 B |
|
After Width: | Height: | Size: 288 B |
|
After Width: | Height: | Size: 396 B |
|
After Width: | Height: | Size: 529 B |
|
After Width: | Height: | Size: 909 B |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 92 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 96 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 7.8 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 752 B |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 752 B |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 517 B |
|
After Width: | Height: | Size: 921 B |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 6.1 KiB |
|
After Width: | Height: | Size: 8.3 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 36 KiB |
@@ -0,0 +1,63 @@
|
||||
<?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="net.steampp.app"
|
||||
Publisher="CN=长沙次元超越科技有限公司"
|
||||
Version="2.3.0.0" />
|
||||
|
||||
<Properties>
|
||||
<DisplayName>Steam++</DisplayName>
|
||||
<PublisherDisplayName>长沙次元超越科技有限公司</PublisherDisplayName>
|
||||
<Logo>Images\StoreLogo.png</Logo>
|
||||
</Properties>
|
||||
|
||||
<Dependencies>
|
||||
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
|
||||
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.14393.0" MaxVersionTested="10.0.14393.0" />
|
||||
</Dependencies>
|
||||
|
||||
<Resources>
|
||||
<Resource Language="x-generate"/>
|
||||
</Resources>
|
||||
|
||||
<Applications>
|
||||
<Application Id="App"
|
||||
Executable="$targetnametoken$.exe"
|
||||
EntryPoint="$targetentrypoint$">
|
||||
<uap:VisualElements
|
||||
DisplayName="Steam++"
|
||||
Description="「Steam++」是一个包含多种Steam工具功能的工具箱。"
|
||||
BackgroundColor="transparent"
|
||||
Square150x150Logo="Images\Square150x150Logo.png"
|
||||
Square44x44Logo="Images\Square44x44Logo.png">
|
||||
<uap:DefaultTile Wide310x150Logo="Images\Wide310x150Logo.png" Square71x71Logo="Images\SmallTile.png" Square310x310Logo="Images\LargeTile.png" ShortName="Steam++">
|
||||
<uap:ShowNameOnTiles>
|
||||
<uap:ShowOn Tile="square150x150Logo"/>
|
||||
<uap:ShowOn Tile="wide310x150Logo"/>
|
||||
<uap:ShowOn Tile="square310x310Logo"/>
|
||||
</uap:ShowNameOnTiles>
|
||||
</uap:DefaultTile >
|
||||
<uap:SplashScreen Image="Images\SplashScreen.png" />
|
||||
<uap:InitialRotationPreference>
|
||||
<uap:Rotation Preference="landscape"/>
|
||||
</uap:InitialRotationPreference>
|
||||
<uap:LockScreen BadgeLogo="Images\BadgeLogo.png" Notification="badgeAndTileText"/>
|
||||
</uap:VisualElements>
|
||||
<Extensions>
|
||||
<desktop:Extension xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10" Category="windows.fullTrustProcess" Executable="ST.Client.Desktop.Avalonia.App\Steam++.exe" />
|
||||
</Extensions>
|
||||
</Application>
|
||||
</Applications>
|
||||
|
||||
<Capabilities>
|
||||
<Capability Name="internetClient" />
|
||||
<rescap:Capability Name="runFullTrust" />
|
||||
<rescap:Capability Name="allowElevation" />
|
||||
</Capabilities>
|
||||
</Package>
|
||||
@@ -0,0 +1,192 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition="'$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '15.0'">
|
||||
<VisualStudioVersion>15.0</VisualStudioVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|x86">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x86</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x86">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x86</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x86</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x86</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|ARM">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x86</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|ARM">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x86</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|ARM64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x86</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|ARM64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x86</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|AnyCPU">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x86</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|AnyCPU">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x86</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<WapProjPath Condition="'$(WapProjPath)'==''">$(MSBuildExtensionsPath)\Microsoft\DesktopBridge\</WapProjPath>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.props" />
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>1f659618-71e2-4aaf-9d86-62700fd4cf02</ProjectGuid>
|
||||
<TargetPlatformVersion>10.0.19041.0</TargetPlatformVersion>
|
||||
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
|
||||
<DefaultLanguage>zh-CN</DefaultLanguage>
|
||||
<AppxPackageSigningEnabled>True</AppxPackageSigningEnabled>
|
||||
<PackageCertificateThumbprint>B6D2933B81EEDE587801E0C3E0D570DFD3DEFA70</PackageCertificateThumbprint>
|
||||
<EntryPointProjectUniqueName>..\ST.Client.Desktop.Avalonia.App.Bridge\ST.Client.Desktop.Avalonia.App.Bridge.csproj</EntryPointProjectUniqueName>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<AppxManifest Include="Package.appxmanifest">
|
||||
<SubType>Designer</SubType>
|
||||
</AppxManifest>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Images\BadgeLogo.scale-100.png" />
|
||||
<Content Include="Images\BadgeLogo.scale-125.png" />
|
||||
<Content Include="Images\BadgeLogo.scale-150.png" />
|
||||
<Content Include="Images\BadgeLogo.scale-200.png" />
|
||||
<Content Include="Images\BadgeLogo.scale-400.png" />
|
||||
<Content Include="Images\LargeTile.scale-100.png" />
|
||||
<Content Include="Images\LargeTile.scale-125.png" />
|
||||
<Content Include="Images\LargeTile.scale-150.png" />
|
||||
<Content Include="Images\LargeTile.scale-200.png" />
|
||||
<Content Include="Images\LargeTile.scale-400.png" />
|
||||
<Content Include="Images\SmallTile.scale-100.png" />
|
||||
<Content Include="Images\SmallTile.scale-125.png" />
|
||||
<Content Include="Images\SmallTile.scale-150.png" />
|
||||
<Content Include="Images\SmallTile.scale-200.png" />
|
||||
<Content Include="Images\SmallTile.scale-400.png" />
|
||||
<Content Include="Images\SplashScreen.scale-100.png" />
|
||||
<Content Include="Images\SplashScreen.scale-125.png" />
|
||||
<Content Include="Images\SplashScreen.scale-150.png" />
|
||||
<Content Include="Images\SplashScreen.scale-200.png" />
|
||||
<Content Include="Images\SplashScreen.scale-400.png" />
|
||||
<Content Include="Images\Square150x150Logo.scale-100.png" />
|
||||
<Content Include="Images\Square150x150Logo.scale-125.png" />
|
||||
<Content Include="Images\Square150x150Logo.scale-150.png" />
|
||||
<Content Include="Images\Square150x150Logo.scale-200.png" />
|
||||
<Content Include="Images\Square150x150Logo.scale-400.png" />
|
||||
<Content Include="Images\Square44x44Logo.altform-lightunplated_targetsize-16.png" />
|
||||
<Content Include="Images\Square44x44Logo.altform-lightunplated_targetsize-24.png" />
|
||||
<Content Include="Images\Square44x44Logo.altform-lightunplated_targetsize-256.png" />
|
||||
<Content Include="Images\Square44x44Logo.altform-lightunplated_targetsize-32.png" />
|
||||
<Content Include="Images\Square44x44Logo.altform-lightunplated_targetsize-48.png" />
|
||||
<Content Include="Images\Square44x44Logo.altform-unplated_targetsize-16.png" />
|
||||
<Content Include="Images\Square44x44Logo.altform-unplated_targetsize-256.png" />
|
||||
<Content Include="Images\Square44x44Logo.altform-unplated_targetsize-32.png" />
|
||||
<Content Include="Images\Square44x44Logo.altform-unplated_targetsize-48.png" />
|
||||
<Content Include="Images\Square44x44Logo.scale-100.png" />
|
||||
<Content Include="Images\Square44x44Logo.scale-125.png" />
|
||||
<Content Include="Images\Square44x44Logo.scale-150.png" />
|
||||
<Content Include="Images\Square44x44Logo.scale-200.png" />
|
||||
<Content Include="Images\Square44x44Logo.scale-400.png" />
|
||||
<Content Include="Images\Square44x44Logo.targetsize-16.png" />
|
||||
<Content Include="Images\Square44x44Logo.targetsize-24.png" />
|
||||
<Content Include="Images\Square44x44Logo.targetsize-24_altform-unplated.png" />
|
||||
<Content Include="Images\Square44x44Logo.targetsize-256.png" />
|
||||
<Content Include="Images\Square44x44Logo.targetsize-32.png" />
|
||||
<Content Include="Images\Square44x44Logo.targetsize-48.png" />
|
||||
<Content Include="Images\StoreLogo.scale-100.png" />
|
||||
<Content Include="Images\StoreLogo.scale-125.png" />
|
||||
<Content Include="Images\StoreLogo.scale-150.png" />
|
||||
<Content Include="Images\StoreLogo.scale-200.png" />
|
||||
<Content Include="Images\StoreLogo.scale-400.png" />
|
||||
<Content Include="Images\Wide310x150Logo.scale-100.png" />
|
||||
<Content Include="Images\Wide310x150Logo.scale-125.png" />
|
||||
<Content Include="Images\Wide310x150Logo.scale-150.png" />
|
||||
<Content Include="Images\Wide310x150Logo.scale-200.png" />
|
||||
<Content Include="Images\Wide310x150Logo.scale-400.png" />
|
||||
<None Include="Package_TemporaryKey.pfx" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.targets" />
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.19041.8" PrivateAssets="all" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ST.Client.Desktop.Avalonia.App.Bridge\ST.Client.Desktop.Avalonia.App.Bridge.csproj">
|
||||
<SkipGetTargetFrameworkProperties>True</SkipGetTargetFrameworkProperties>
|
||||
<PublishProfile>Properties\PublishProfiles\win10-x86.aot.pubxml</PublishProfile>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="..\..\..\CEF\win-x86\locales\zh-CN.pak">
|
||||
<Link>ST.Client.Desktop.Avalonia.App.Bridge\CEF\win-x86\locales\zh-CN.pak</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="..\..\..\CEF\win-x86\swiftshader\libEGL.dll">
|
||||
<Link>ST.Client.Desktop.Avalonia.App.Bridge\CEF\win-x86\swiftshader\libEGL.dll</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="..\..\..\CEF\win-x86\swiftshader\libGLESv2.dll">
|
||||
<Link>ST.Client.Desktop.Avalonia.App.Bridge\CEF\win-x86\swiftshader\libGLESv2.dll</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="..\..\..\CEF\win-x86\chrome_100_percent.pak">
|
||||
<Link>ST.Client.Desktop.Avalonia.App.Bridge\CEF\win-x86\chrome_100_percent.pak</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="..\..\..\CEF\win-x86\chrome_200_percent.pak">
|
||||
<Link>ST.Client.Desktop.Avalonia.App.Bridge\CEF\win-x86\chrome_200_percent.pak</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="..\..\..\CEF\win-x86\chrome_elf.dll">
|
||||
<Link>ST.Client.Desktop.Avalonia.App.Bridge\CEF\win-x86\chrome_elf.dll</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="..\..\..\CEF\win-x86\d3dcompiler_47.dll">
|
||||
<Link>ST.Client.Desktop.Avalonia.App.Bridge\CEF\win-x86\d3dcompiler_47.dll</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="..\..\..\CEF\win-x86\icudtl.dat">
|
||||
<Link>ST.Client.Desktop.Avalonia.App.Bridge\CEF\win-x86\icudtl.dat</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="..\..\..\CEF\win-x86\libcef.dll">
|
||||
<Link>ST.Client.Desktop.Avalonia.App.Bridge\CEF\win-x86\libcef.dll</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="..\..\..\CEF\win-x86\libEGL.dll">
|
||||
<Link>ST.Client.Desktop.Avalonia.App.Bridge\CEF\win-x86\libEGL.dll</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="..\..\..\CEF\win-x86\libGLESv2.dll">
|
||||
<Link>ST.Client.Desktop.Avalonia.App.Bridge\CEF\win-x86\libGLESv2.dll</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="..\..\..\CEF\win-x86\resources.pak">
|
||||
<Link>ST.Client.Desktop.Avalonia.App.Bridge\CEF\win-x86\resources.pak</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="..\..\..\CEF\win-x86\snapshot_blob.bin">
|
||||
<Link>ST.Client.Desktop.Avalonia.App.Bridge\CEF\win-x86\snapshot_blob.bin</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="..\..\..\CEF\win-x86\v8_context_snapshot.bin">
|
||||
<Link>ST.Client.Desktop.Avalonia.App.Bridge\CEF\win-x86\v8_context_snapshot.bin</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,27 @@
|
||||
using System.ApplicationModel;
|
||||
using Windows.ApplicationModel;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace System.Application
|
||||
{
|
||||
static class DesktopBridgeHelper2
|
||||
{
|
||||
internal static bool Init()
|
||||
{
|
||||
if (DI.Platform != Platform.Windows) return false;
|
||||
var osVer = Environment.OSVersion.Version;
|
||||
if (osVer.Major != 10 || osVer.Build < 17763) return false;
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(Package.Current.Id.Name)) return false;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
DesktopBridgeHelper.IsDesktopBridge = true;
|
||||
FileSystemDesktopBridge.InitFileSystem();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using Windows.Storage;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace System.Application
|
||||
{
|
||||
static class FileSystemDesktopBridge
|
||||
{
|
||||
internal static void InitFileSystem()
|
||||
{
|
||||
// https://github.com/xamarin/Essentials/blob/1.6.1/Xamarin.Essentials/FileSystem/FileSystem.uwp.cs#L12
|
||||
// https://docs.microsoft.com/zh-cn/windows/msix/desktop/desktop-to-uwp-behind-the-scenes
|
||||
// 不允许在 C:\Program Files\WindowsApps\package_name 下写入。
|
||||
// C:\Users\{user}\AppData\Local\Packages\net.steampp.app_gvn1zxq6vcwjj\LocalState
|
||||
// C:\Users\{user}\AppData\Local\Packages\net.steampp.app_gvn1zxq6vcwjj\LocalCache
|
||||
IOPath.InitFileSystem(() => ApplicationData.Current.LocalFolder.Path, () => ApplicationData.Current.LocalCacheFolder.Path);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<DefineConstants>PUBLISH;WINDOWS;WINDOWS_DESKTOP_BRIDGE;$(DefineConstants)</DefineConstants>
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>AnyCPU</Platform>
|
||||
<PlatformTarget>ARM64</PlatformTarget>
|
||||
<PublishDir>bin\Release\Publish\win10-arm64</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<!-- 注意:RuntimeIdentifier win-x86 会导致亚克力效果会丢失 -->
|
||||
<RuntimeIdentifier>win10-arm64</RuntimeIdentifier>
|
||||
<PublishReadyToRun>true</PublishReadyToRun>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<DefineConstants>PUBLISH;WINDOWS;WINDOWS_DESKTOP_BRIDGE;$(DefineConstants)</DefineConstants>
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x86</Platform>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<PublishDir>bin\Release\Publish\win10-x86</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<!-- 注意:RuntimeIdentifier win-x86 会导致亚克力效果会丢失 -->
|
||||
<RuntimeIdentifier>win10-x86</RuntimeIdentifier>
|
||||
<PublishReadyToRun>true</PublishReadyToRun>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,105 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<SignAssembly>false</SignAssembly>
|
||||
<!--(SignAssembly)对此程序集进行签名会导致编译失败(CompileAvaloniaXamlTask)-->
|
||||
<RootNamespace>System.Application.UI</RootNamespace>
|
||||
<AssemblyName>Steam++</AssemblyName>
|
||||
<DefineConstants>WINDOWS;WINDOWS_DESKTOP_BRIDGE;$(DefineConstants)</DefineConstants>
|
||||
<ApplicationIcon>..\ST.Client.Desktop.Avalonia\Application\UI\Assets\Icon.ico</ApplicationIcon>
|
||||
<ApplicationManifest>..\ST.Client.Desktop.Avalonia.App\Properties\app.manifest</ApplicationManifest>
|
||||
<Platforms>AnyCPU;x86</Platforms>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<RuntimeIdentifier>win10-x86</RuntimeIdentifier>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||
<SelfContained>true</SelfContained>
|
||||
<PublishSingleFile>false</PublishSingleFile>
|
||||
<!--目前裁剪存在问题,禁用-->
|
||||
<PublishTrimmed>false</PublishTrimmed>
|
||||
<TrimMode>link</TrimMode>
|
||||
<TrimmerRemoveSymbols>true</TrimmerRemoveSymbols>
|
||||
<!--剪裁框架库功能 https://docs.microsoft.com/zh-cn/dotnet/core/deploying/trimming-options#trimming-framework-library-features -->
|
||||
<DebuggerSupport>false</DebuggerSupport>
|
||||
<EnableUnsafeBinaryFormatterSerialization>false</EnableUnsafeBinaryFormatterSerialization>
|
||||
<EnableUnsafeUTF7Encoding>false</EnableUnsafeUTF7Encoding>
|
||||
<SuppressTrimAnalysisWarnings>false</SuppressTrimAnalysisWarnings>
|
||||
<EventSourceSupport>false</EventSourceSupport>
|
||||
<HttpActivityPropagationSupport>false</HttpActivityPropagationSupport>
|
||||
<UseSystemResourceKeys>true</UseSystemResourceKeys>
|
||||
<DebugType>none</DebugType>
|
||||
<DebugSymbols>false</DebugSymbols>
|
||||
<PublishReadyToRun>true</PublishReadyToRun>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="..\Startup2.cs" />
|
||||
<Compile Include="..\Common.CoreLib\Properties\AssemblyInfo.cs">
|
||||
<Link>Properties\AssemblyInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Common.CoreLib\Properties\AssemblyInfo.Version.cs">
|
||||
<Link>Properties\AssemblyInfo.Version.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\ST.Client.Desktop.Avalonia.App\*.cs" />
|
||||
<Compile Update="..\ST.Client.Desktop.Avalonia.App\App.axaml.cs">
|
||||
<Link>App.axaml.cs</Link>
|
||||
<DependentUpon>%(Filename)</DependentUpon>
|
||||
</Compile>
|
||||
<AvaloniaResource Include="..\ST.Client.Desktop.Avalonia.App\App.axaml">
|
||||
<Link>App.axaml</Link>
|
||||
<SubType>Designer</SubType>
|
||||
</AvaloniaResource>
|
||||
<Compile Include="..\ST.Client.Desktop.Avalonia.App\Views\MainWindow.axaml.cs">
|
||||
<Link>Views\MainWindow.axaml.cs</Link>
|
||||
<DependentUpon>%(Filename)</DependentUpon>
|
||||
</Compile>
|
||||
<AvaloniaResource Include="..\ST.Client.Desktop.Avalonia.App\Views\MainWindow.axaml">
|
||||
<Link>Views\MainWindow.axaml</Link>
|
||||
<SubType>Designer</SubType>
|
||||
</AvaloniaResource>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ST.Client.Desktop.Avalonia\ST.Client.Desktop.Avalonia.csproj" />
|
||||
<ProjectReference Include="..\ST.Client.Desktop\ST.Client.Desktop.csproj" />
|
||||
<ProjectReference Include="..\Common.CoreLib\Common.CoreLib.csproj" />
|
||||
<ProjectReference Include="..\ST.Client.Desktop.Windows\ST.Client.Desktop.Windows.csproj" />
|
||||
<ProjectReference Include="..\ST.Client.Desktop.Console.App.Bridge\ST.Client.Desktop.Console.App.Bridge.csproj" />
|
||||
<Reference Include="Microsoft.Windows.SDK.NET">
|
||||
<HintPath>..\..\references\Microsoft.Windows.SDK.NET.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="**\*.xaml.cs">
|
||||
<DependentUpon>%(Filename)</DependentUpon>
|
||||
</Compile>
|
||||
<AvaloniaResource Include="**\*.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</AvaloniaResource>
|
||||
<AvaloniaResource Include="Assets\**" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="Exists('$(MSBuildProjectDirectory)\..\..\aes-key.pfx')">
|
||||
<EmbeddedResource Include="..\..\aes-key.pfx" Link="Resources\3A613E8D" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(Configuration)'=='Debug' And Exists('$(MSBuildProjectDirectory)\..\..\app-id-debug.pfx')">
|
||||
<EmbeddedResource Include="..\..\app-id-debug.pfx" Link="Resources\0093BF84" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(Configuration)'=='Debug' And Exists('$(MSBuildProjectDirectory)\..\..\rsa-public-key-debug.pfx')">
|
||||
<EmbeddedResource Include="..\..\rsa-public-key-debug.pfx" Link="Resources\6D72ED26" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(Configuration)'=='Release' And Exists('$(MSBuildProjectDirectory)\..\..\app-id-release.pfx')">
|
||||
<EmbeddedResource Include="..\..\app-id-release.pfx" Link="Resources\F1D827AB" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(Configuration)'=='Release' And Exists('$(MSBuildProjectDirectory)\..\..\rsa-public-key-release.pfx')">
|
||||
<EmbeddedResource Include="..\..\rsa-public-key-release.pfx" Link="Resources\E88CA4F9" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -31,14 +31,13 @@ using System.Application.Services.Implementation;
|
||||
using APIConst = System.Application.Services.CloudService.Constants;
|
||||
|
||||
[assembly: Guid("82cda250-48a2-48ad-ab03-5cda873ef80c")]
|
||||
[assembly: AssemblyTitle(ThisAssembly.AssemblyTrademark)]
|
||||
namespace System.Application.UI
|
||||
{
|
||||
public partial class App : AvaloniaApplication, IDisposableHolder, IDesktopAppService, IDesktopAvaloniaAppService
|
||||
{
|
||||
public static App Instance => Current is App app ? app : throw new Exception("Impossible");
|
||||
|
||||
public static DirectoryInfo RootDirectory => new(AppContext.BaseDirectory);
|
||||
//public static DirectoryInfo RootDirectory => new(AppContext.BaseDirectory);
|
||||
|
||||
AppTheme mTheme = AppTheme.Dark;
|
||||
public AppTheme Theme
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.IO.Pipes;
|
||||
@@ -35,17 +36,41 @@ namespace System.Application.UI
|
||||
}
|
||||
}
|
||||
|
||||
static bool GetIsFirst()
|
||||
static IEnumerable<Process> GetCurrentAllProcess()
|
||||
{
|
||||
var current = Process.GetCurrentProcess();
|
||||
var currentMainModule = current.TryGetMainModule();
|
||||
var query = from p in Process.GetProcessesByName(current.ProcessName)
|
||||
let pMainModule = p.TryGetMainModule()
|
||||
where p.Id != current.Id &&
|
||||
p.ProcessName == current.ProcessName &&
|
||||
(current.MainModule == null ||
|
||||
(p.MainModule != null &&
|
||||
p.MainModule.FileName == current.MainModule.FileName &&
|
||||
p.MainModule.ModuleName == current.MainModule.ModuleName))
|
||||
(currentMainModule == null ||
|
||||
(pMainModule != null &&
|
||||
pMainModule.FileName == currentMainModule.FileName &&
|
||||
pMainModule.ModuleName == currentMainModule.ModuleName))
|
||||
select p;
|
||||
return query;
|
||||
}
|
||||
|
||||
public static bool TryKillCurrentAllProcess()
|
||||
{
|
||||
foreach (var p in GetCurrentAllProcess())
|
||||
{
|
||||
try
|
||||
{
|
||||
p.Kill(true);
|
||||
p.WaitForExit(500);
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
return GetIsFirst();
|
||||
}
|
||||
|
||||
static bool GetIsFirst()
|
||||
{
|
||||
var query = GetCurrentAllProcess();
|
||||
var r = query.Any();
|
||||
return !r;
|
||||
}
|
||||
@@ -97,19 +122,20 @@ namespace System.Application.UI
|
||||
/// 给主进程发送消息
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
public static void SendMessage(string value)
|
||||
public static bool SendMessage(string value)
|
||||
{
|
||||
var name = GetPipeName();
|
||||
try
|
||||
{
|
||||
using var pipeClient = new NamedPipeClientStream(".", name, PipeDirection.Out, PipeOptions.None, TokenImpersonationLevel.Impersonation);
|
||||
pipeClient.Connect();
|
||||
pipeClient.Connect(1000);
|
||||
using StreamWriter sw = new StreamWriter(pipeClient);
|
||||
sw.WriteLine(value);
|
||||
return true;
|
||||
}
|
||||
catch (IOException)
|
||||
catch
|
||||
{
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Avalonia.Controls.ApplicationLifetimes;
|
||||
using Avalonia.Threading;
|
||||
using System.Application.Services;
|
||||
using System.CommandLine;
|
||||
using System.CommandLine.Invocation;
|
||||
@@ -38,12 +39,29 @@ namespace System.Application.UI
|
||||
#endif
|
||||
if (IsMainProcess)
|
||||
{
|
||||
appInstance = new ApplicationInstance();
|
||||
var isInitAppInstanceReset = false;
|
||||
initAppInstance: appInstance = new ApplicationInstance();
|
||||
if (!appInstance.IsFirst)
|
||||
{
|
||||
//Console.WriteLine("ApplicationInstance.SendMessage(string.Empty);");
|
||||
ApplicationInstance.SendMessage(string.Empty);
|
||||
return;
|
||||
if (ApplicationInstance.SendMessage(string.Empty))
|
||||
{
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!isInitAppInstanceReset &&
|
||||
ApplicationInstance.TryKillCurrentAllProcess())
|
||||
{
|
||||
isInitAppInstanceReset = true;
|
||||
appInstance.Dispose();
|
||||
goto initAppInstance;
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
appInstance.MessageReceived += value =>
|
||||
{
|
||||
@@ -120,14 +138,32 @@ namespace System.Application.UI
|
||||
// -clt app -id 632360
|
||||
var unlock_achievement = new Command("app", "打开成就解锁窗口");
|
||||
unlock_achievement.AddOption(new Option<int>("-id", "指定一个Steam游戏Id"));
|
||||
unlock_achievement.AddOption(new Option<bool>("-silence", "静默启动(不弹窗口)"));
|
||||
unlock_achievement.AddOption(new Option<bool>("-silence", "挂运行服务,不加载窗口,内存占用更小"));
|
||||
unlock_achievement.Handler = CommandHandler.Create((int id, bool silence) =>
|
||||
{
|
||||
if (id <= 0) return;
|
||||
initStartup(DILevel.GUI | DILevel.Steam | DILevel.HttpClientFactory);
|
||||
IWindowService.Instance.InitUnlockAchievement(id);
|
||||
IsMinimize = silence;
|
||||
initUIApp();
|
||||
try
|
||||
{
|
||||
if (id <= 0) return;
|
||||
if (!silence)
|
||||
{
|
||||
initStartup(DILevel.GUI | DILevel.Steam | DILevel.HttpClientFactory);
|
||||
IWindowService.Instance.InitUnlockAchievement(id);
|
||||
initUIApp();
|
||||
}
|
||||
else
|
||||
{
|
||||
initStartup(DILevel.Steam);
|
||||
SteamConnectService.Current.Initialize(id);
|
||||
var day = 86400000;
|
||||
while (true)
|
||||
Threading.Thread.Sleep(day);
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(nameof(unlock_achievement), ex, "Start");
|
||||
}
|
||||
});
|
||||
rootCommand.AddCommand(unlock_achievement);
|
||||
|
||||
|
||||