From 8a580b4a9a9c6c0f80c7c12e07d9725465e59052 Mon Sep 17 00:00:00 2001 From: "transifex-integration[bot]" <43880903+transifex-integration[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 05:22:12 +0000 Subject: [PATCH 01/15] [skip ci] Sync translation Translate en_US.json in zh_CN 100% reviewed source file: 'en_US.json' on 'zh_CN'. --- Hi3Helper.Core/Lang/zh_CN.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Hi3Helper.Core/Lang/zh_CN.json b/Hi3Helper.Core/Lang/zh_CN.json index 23f1f9bf1..ea15f146e 100644 --- a/Hi3Helper.Core/Lang/zh_CN.json +++ b/Hi3Helper.Core/Lang/zh_CN.json @@ -422,6 +422,8 @@ "Debug": "附加设置", "Debug_Console": "显示控制台", "Debug_IncludeGameLogs": "保存游戏日志到 Collapse(可能含有敏感数据)", + "Debug_SendRemoteCrashData": "向开发者发送匿名崩溃报告", + "Debug_SendRemoteCrashData_EnvVarDisablement": "由于环境变量“DISABLE_SENTRY”被设为 true,该设置已被禁用。", "Debug_MultipleInstance": "允许开启多个 Collapse", "ChangeRegionWarning_Toggle": "显示区服更改警告", From 689155a526293d49fc0ac6ead4c530e5c8a45080 Mon Sep 17 00:00:00 2001 From: "transifex-integration[bot]" <43880903+transifex-integration[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 11:00:37 +0000 Subject: [PATCH 02/15] [skip ci] Sync translation Translate en_US.json in id_ID 100% reviewed source file: 'en_US.json' on 'id_ID'. --- Hi3Helper.Core/Lang/id_ID.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Hi3Helper.Core/Lang/id_ID.json b/Hi3Helper.Core/Lang/id_ID.json index 57f1e26c0..189527761 100644 --- a/Hi3Helper.Core/Lang/id_ID.json +++ b/Hi3Helper.Core/Lang/id_ID.json @@ -422,6 +422,8 @@ "Debug": "Pengaturan Tambahan", "Debug_Console": "Perlihatkan Konsol", "Debug_IncludeGameLogs": "Simpan catatan game ke Collapse (kemungkinan berisi data sensitif)", + "Debug_SendRemoteCrashData": "Memperbolehkan laporan crash dikirimkan kepada developer secara anonymous", + "Debug_SendRemoteCrashData_EnvVarDisablement": "Pengaturan ini dimatikan dikarenakan variable environment 'DISABLE_SENTRY' diset ke true.", "Debug_MultipleInstance": "Perbolehkan Multiple Instance", "ChangeRegionWarning_Toggle": "Tampilkan Peringatan Penggantian Region", From 4cba8a9f54935046198310c4f80f34cd14475f38 Mon Sep 17 00:00:00 2001 From: Bagus Nur Listiyono Date: Tue, 19 Nov 2024 01:35:17 +0700 Subject: [PATCH 03/15] [skip ci] Add Sentry infos in AOT publish profile --- .../Publish-PreviewReleaseAOT.pubxml | 14 ++++++++++++++ .../Publish-StableReleaseAOT.pubxml | 14 ++++++++++++++ appveyor.yml | 6 +++--- 3 files changed, 31 insertions(+), 3 deletions(-) diff --git a/CollapseLauncher/Properties/PublishProfiles/Publish-PreviewReleaseAOT.pubxml b/CollapseLauncher/Properties/PublishProfiles/Publish-PreviewReleaseAOT.pubxml index 87c55dd7c..d9cf25ee6 100644 --- a/CollapseLauncher/Properties/PublishProfiles/Publish-PreviewReleaseAOT.pubxml +++ b/CollapseLauncher/Properties/PublishProfiles/Publish-PreviewReleaseAOT.pubxml @@ -59,5 +59,19 @@ https://go.microsoft.com/fwlink/?LinkID=208121. true + + + collapse + collapse-launcher + + true + + true + + --local + + false + + true \ No newline at end of file diff --git a/CollapseLauncher/Properties/PublishProfiles/Publish-StableReleaseAOT.pubxml b/CollapseLauncher/Properties/PublishProfiles/Publish-StableReleaseAOT.pubxml index 2abaaec29..dfa3cf3fd 100644 --- a/CollapseLauncher/Properties/PublishProfiles/Publish-StableReleaseAOT.pubxml +++ b/CollapseLauncher/Properties/PublishProfiles/Publish-StableReleaseAOT.pubxml @@ -59,5 +59,19 @@ https://go.microsoft.com/fwlink/?LinkID=208121. true + + + collapse + collapse-launcher + + true + + true + + --local + + false + + true \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml index 6e2cb641f..ab822a65c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -28,7 +28,7 @@ for: - cmd: >- echo Init submodules - git submodule update --init --force --depth=1 --recursive + git submodule update --init --force --depth=20 --recursive echo. @@ -161,7 +161,7 @@ for: - cmd: >- echo Init submodules - git submodule update --init --force --depth=1 --recursive + git submodule update --init --force --depth=20 --recursive echo. @@ -291,7 +291,7 @@ for: - cmd: >- echo Init submodules - git submodule update --init --force --depth=1 --recursive + git submodule update --init --force --depth=20 --recursive echo. From eb3a62c1ac08bf71cdb2697dd9ea1a2a9e1561ff Mon Sep 17 00:00:00 2001 From: Bagus Nur Listiyono Date: Tue, 19 Nov 2024 01:37:57 +0700 Subject: [PATCH 04/15] Add missing TCE/OCE handler in ExceptionHandlerAsync --- Hi3Helper.Core/Classes/SentryHelper/SentryHelper.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Hi3Helper.Core/Classes/SentryHelper/SentryHelper.cs b/Hi3Helper.Core/Classes/SentryHelper/SentryHelper.cs index 5a547b127..7d35e49ae 100644 --- a/Hi3Helper.Core/Classes/SentryHelper/SentryHelper.cs +++ b/Hi3Helper.Core/Classes/SentryHelper/SentryHelper.cs @@ -239,6 +239,13 @@ public static void ExceptionHandler(Exception ex, ExceptionType exT = ExceptionT public static async Task ExceptionHandlerAsync(Exception ex, ExceptionType exT = ExceptionType.Handled) { if (!IsEnabled) return; + if (ex is AggregateException && ex.InnerException != null) ex = ex.InnerException; + if (ex is TaskCanceledException or OperationCanceledException) + { + Logger.LogWriteLine($"Caught TCE/OCE exception from: {ex.Source}. Exception will not be uploaded!\r\n{ex}", + LogType.Sentry); + return; + } ExceptionHandler(ex, exT); await SentrySdk.FlushAsync(TimeSpan.FromSeconds(10)); From 2a5c375027c2d717c2d3993a62ac8da125a97761 Mon Sep 17 00:00:00 2001 From: Bagus Nur Listiyono Date: Tue, 19 Nov 2024 02:56:01 +0700 Subject: [PATCH 05/15] [skip ci] Update Code Signing, Privacy and Third party notices --- PRIVACY.md | 11 ++- README.md | 2 +- THIRD_PARTY_NOTICES.md | 165 +++++++++++++++++++---------------------- 3 files changed, 87 insertions(+), 91 deletions(-) diff --git a/PRIVACY.md b/PRIVACY.md index ebb903e1c..7f49e6e2b 100644 --- a/PRIVACY.md +++ b/PRIVACY.md @@ -1,6 +1,6 @@ # Privacy Policy for Collapse Launcher -_Last Updated: November 16th, 2024_ +_Last Updated: November 19th, 2024_ Thank you for using Collapse Launcher! This Privacy Policy outlines the information practices of Collapse Launcher and how any third-party services utilized may collect, use, and disclose data. @@ -42,6 +42,13 @@ While Collapse itself does not collect the information outlined above, we utiliz https://sentry.io/privacy/ - Opt-out: You can disable this feature by going to the application settings or setting system environment variable "DISABLE_SENTRY" to true. +#### Service Provider: Turso +- Purpose: Storing User Synchronization Data in user provided database account. +- Information collected: IP address, Geo-location data. +- Privacy policies: + https://turso.tech/privacy-policy +- Opt-out: Disabled by default, you can enable this feature by making an account in the website and providing your own database account to the app. Collapse developer has no access to the data stored in the database. + ## 3. Cookies @@ -57,6 +64,6 @@ Collapse Launcher reserves the right to update or modify this Privacy Policy at ## 6. Contact -Should you have any questions, concerns, or requests regarding this Privacy Policy, please contact us at collapse+bagusnl@protonmail.com. +Should you have any questions, concerns, or requests regarding this Privacy Policy, please contact us at bagusnl+collapse@protonmail.com. By using Collapse Launcher, you agree to the terms outlined in this Privacy Policy. diff --git a/README.md b/README.md index 109dd59ef..85d59a196 100644 --- a/README.md +++ b/README.md @@ -249,7 +249,7 @@ To view all releases, [**click here**](https://github.com/neon-nyan/CollapseLaun # Code Signing Policy > Free code signing provided by [SignPath.io], certificate by [SignPath Foundation] -- This program will not transfer any information to other networked systems. +- This program will only transfer user data to user configured database server. Exception data will be sent to [Sentry.io] for error tracking purposes (user are able to disable the behavior in App Settings). - Read our full [**Privacy Policy**](PRIVACY.md) - Also read our [**Third Party Notices**](THIRD_PARTY_NOTICES.md) for license used by third party libraries that we use. diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md index 108d7f4ab..cb9a85b4a 100644 --- a/THIRD_PARTY_NOTICES.md +++ b/THIRD_PARTY_NOTICES.md @@ -31,92 +31,81 @@ This project uses third-party libraries, each governed by their respective licen ## Third-party software list -This page lists the third-party software dependencies used in CollapseLauncher. Autogenerated by Qodana at Oct, 26th 2024. +This page lists the third-party software dependencies used in CollapseLauncher. Autogenerated by Qodana at Nov, 19th 2024. -| Dependency | Version | Licenses | -|------------------------------------------------------------------------------------------------------------------------------------|---------------------|--------------------------------------------------------------------------------------------------------| -| [CommunityToolkit.Common](https://github.com/CommunityToolkit/dotnet) | 8.2.1 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [CommunityToolkit.Common](https://github.com/CommunityToolkit/dotnet) | 8.3.2 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [CommunityToolkit.Mvvm](https://github.com/CommunityToolkit/dotnet) | 8.3.2 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [CommunityToolkit.WinUI.Animations](https://github.com/CommunityToolkit/Windows) | 8.1.240916 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [CommunityToolkit.WinUI.Controls.Primitives](https://github.com/CommunityToolkit/Windows) | 8.1.240916 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [CommunityToolkit.WinUI.Controls.Sizers](https://github.com/CommunityToolkit/Windows) | 8.1.240916 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [CommunityToolkit.WinUI.Converters](https://github.com/CommunityToolkit/Windows) | 8.1.240916 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [CommunityToolkit.WinUI.Extensions](https://github.com/CommunityToolkit/Windows) | 8.1.240916 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [CommunityToolkit.WinUI.Helpers](https://github.com/CommunityToolkit/Windows) | 8.1.240916 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [CommunityToolkit.WinUI.Media](https://github.com/CommunityToolkit/Windows) | 8.1.240916 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [CommunityToolkit.WinUI.Triggers](https://github.com/CommunityToolkit/Windows) | 8.1.240916 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [Costura.Fody](https://github.com/Fody/Costura) | 5.8.0-alpha0098 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [DotNet.ReproducibleBuilds](https://www.nuget.org/packages/DotNet.ReproducibleBuilds) | 1.2.25 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [EventGenerator.Generator](https://www.nuget.org/packages/EventGenerator.Generator) | 0.13.1 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [Fody](https://github.com/Fody/Fody) | 6.8.2 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [GitInfo](https://clarius.org/GitInfo) | 3.3.5 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [Google.Protobuf.Tools](https://github.com/protocolbuffers/protobuf) | 3.28.3 | PROTOBUF | -| [Google.Protobuf](https://github.com/protocolbuffers/protobuf) | 3.28.3 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) | -| [Hi3Helper.ZstdNet](https://github.com/CollapseLauncher/Hi3Helper.ZstdNet) | 1.6.3 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) | -| [HtmlAgilityPack](http://html-agility-pack.net/) | 1.11.70 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [Markdig.Signed](https://github.com/lunet-io/markdig) | 0.38.0 | [BSD-2-Clause](http://www.opensource.org/licenses/BSD-2-Clause) | -| [Microsoft.CSharp](https://github.com/dotnet/corefx) | 4.7.0 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [Microsoft.Extensions.Logging.Abstractions](https://asp.net/) | 2.2.0 | [Apache-2.0](http://www.apache.org/licenses/) | -| [Microsoft.Graphics.Win2D](http://go.microsoft.com/fwlink/?LinkID=519078) | 1.3.0 | [MS-ASP-NET-WEB-OPTIMIZATION](https://www.microsoft.com/web/webpi/eula/weboptimization_1_eula_enu.htm) | -| [Microsoft.NETCore.Platforms](https://dot.net/) | 1.1.0 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [Microsoft.NETFramework.ReferenceAssemblies.net462](https://github.com/Microsoft/dotnet/tree/master/releases/reference-assemblies) | 1.0.3 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [Microsoft.NETFramework.ReferenceAssemblies](https://github.com/Microsoft/dotnet/tree/master/releases/reference-assemblies) | 1.0.3 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [Microsoft.Web.WebView2](https://aka.ms/webview) | 1.0.2895-prerelease | [MIT](http://opensource.org/licenses/mit-license.php) | -| [Microsoft.Win32.Primitives](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [Microsoft.Windows.CsWin32](https://github.com/Microsoft/CsWin32) | 0.3.106 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [Microsoft.Windows.CsWinRT](https://github.com/microsoft/cswinrt) | 2.1.6 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [Microsoft.Windows.SDK.BuildTools](https://aka.ms/WinSDKProjectURL) | 10.0.26100.1742 | PROPRIETARY-LICENSE | -| [Microsoft.Windows.SDK.Win32Docs](https://github.com/microsoft/win32metadata) | 0.1.42-alpha | PROPRIETARY-LICENSE | -| [Microsoft.Windows.SDK.Win32Metadata](https://github.com/microsoft/win32metadata) | 60.0.34-preview | [MIT](http://opensource.org/licenses/mit-license.php) | -| [Microsoft.Windows.WDK.Win32Metadata](https://github.com/microsoft/wdkmetadata) | 0.11.4-experimental | [MIT](http://opensource.org/licenses/mit-license.php) | -| [Microsoft.WindowsAppSDK](https://github.com/microsoft/windowsappsdk) | 1.6.240923002 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [Microsoft.Xaml.Behaviors.WinUI.Managed](http://go.microsoft.com/fwlink/?LinkID=651678) | 2.0.9 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [MinVer](https://github.com/adamralph/minver) | 6.0.0 | [Apache-2.0](http://www.apache.org/licenses/) | -| [NETStandard.Library](https://dot.net/) | 1.6.1 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [Newtonsoft.Json](https://www.newtonsoft.com/json) | 13.0.1 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [NuGet.Versioning](https://aka.ms/nugetprj) | 6.10.1 | [Apache-2.0](http://www.apache.org/licenses/) | -| [PhotoSauce.MagicScaler](https://photosauce.net/) | 0.14.2 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [Roman-Numerals](https://github.com/picrap/RomanNumerals) | 2.0.1 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [SharpCompress](https://github.com/adamhathcock/sharpcompress) | 0.38.0 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [SharpHDiffPatch.Core](https://github.com/CollapseLauncher/SharpHDiffPatch.Core) | 2.2.8 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [System.AppContext](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [System.IO.Compression.ZipFile](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [System.IO.Compression](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [System.IO.FileSystem.Primitives](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [System.IO.FileSystem](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [System.IO](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [System.Linq.Expressions](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [System.Linq](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [System.Net.Http](https://dot.net/) | 4.3.4 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [System.Net.Primitives](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [System.Net.Sockets](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [System.ObjectModel](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [System.Reflection.Extensions](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [System.Reflection.Primitives](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [System.Reflection](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [System.Resources.ResourceManager](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [System.Runtime.Extensions](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [System.Runtime.Handles](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [System.Runtime.InteropServices.RuntimeInformation](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [System.Runtime.InteropServices](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [System.Runtime.Numerics](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [System.Runtime](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [System.Security.AccessControl](https://dot.net/) | 6.0.1 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [System.Security.Cryptography.Algorithms](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [System.Security.Cryptography.Encoding](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [System.Security.Cryptography.Primitives](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [System.Security.Cryptography.X509Certificates](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [System.Text.Encoding.Extensions](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [System.Text.Encoding](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [System.Text.RegularExpressions](https://dot.net/) | 4.3.1 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [System.Threading.Tasks.Extensions](https://dot.net/) | 4.5.4 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [System.Threading.Tasks](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [System.Threading.Timer](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [System.Threading](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [System.Xml.ReaderWriter](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [System.Xml.XDocument](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [TaskScheduler](https://github.com/dahall/taskscheduler) | 2.11.0 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [ThisAssembly.Constants](https://clarius.org/ThisAssembly) | 1.4.1 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [Velopack](https://github.com/velopack/velopack) | 0.0.626 | [MIT](http://opensource.org/licenses/mit-license.php) | -| [ZstdSharp.Port](https://github.com/oleg-st/ZstdSharp) | 0.8.1 | [MIT](http://opensource.org/licenses/mit-license.php) | \ No newline at end of file +| Dependency | Version | Licenses | +|----------------------------------------------------------------------------------------------------------------------------------------|-------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [CommunityToolkit.Common](https://github.com/CommunityToolkit/dotnet) | 8.4.0-preview1 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [CommunityToolkit.Mvvm](https://github.com/CommunityToolkit/dotnet) | 8.4.0-preview1 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [CommunityToolkit.WinUI.Animations](https://github.com/CommunityToolkit/Windows) | 8.1.240916 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [CommunityToolkit.WinUI.Behaviors](https://www.nuget.org/packages/CommunityToolkit.WinUI.Behaviors) | 8.1.240916 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [CommunityToolkit.WinUI.Controls.Primitives](https://github.com/CommunityToolkit/Windows) | 8.1.240916 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [CommunityToolkit.WinUI.Controls.Sizers](https://github.com/CommunityToolkit/Windows) | 8.1.240916 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [CommunityToolkit.WinUI.Converters](https://github.com/CommunityToolkit/Windows) | 8.1.240916 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [CommunityToolkit.WinUI.Extensions](https://github.com/CommunityToolkit/Windows) | 8.1.240916 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [CommunityToolkit.WinUI.Helpers](https://github.com/CommunityToolkit/Windows) | 8.1.240916 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [CommunityToolkit.WinUI.Media](https://github.com/CommunityToolkit/Windows) | 8.1.240916 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [CommunityToolkit.WinUI.Triggers](https://github.com/CommunityToolkit/Windows) | 8.1.240916 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [Costura.Fody](https://github.com/Fody/Costura) | 5.8.0-alpha0098 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [DotNet.ReproducibleBuilds](https://www.nuget.org/packages/DotNet.ReproducibleBuilds) | 1.2.25 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [EventGenerator.Generator](https://www.nuget.org/packages/EventGenerator.Generator) | 0.13.1 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [Fody](https://github.com/Fody/Fody) | 6.8.2 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [GitInfo](https://clarius.org/GitInfo) | 3.5.0 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [Google.Protobuf.Tools](https://github.com/protocolbuffers/protobuf) | 3.28.3 | PROTOBUF | +| [Google.Protobuf](https://github.com/protocolbuffers/protobuf) | 3.28.3 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) | +| [Hi3Helper.ZstdNet](https://github.com/CollapseLauncher/Hi3Helper.ZstdNet) | 1.6.3 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) | +| [HtmlAgilityPack](http://html-agility-pack.net/) | 1.11.71 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [Markdig.Signed](https://github.com/lunet-io/markdig) | 0.38.0 | [BSD-2-Clause](http://www.opensource.org/licenses/BSD-2-Clause) | +| [Microsoft.CSharp](https://github.com/dotnet/corefx) | 4.7.0 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [Microsoft.Extensions.DependencyInjection.Abstractions](https://dot.net/) | 9.0.0 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [Microsoft.Extensions.Logging.Abstractions](https://dot.net/) | 9.0.0 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [Microsoft.Graphics.Win2D](http://go.microsoft.com/fwlink/?LinkID=519078) | 1.3.0 | [MS-ASP-NET-WEB-OPTIMIZATION](https://www.microsoft.com/web/webpi/eula/weboptimization_1_eula_enu.htm) | +| [Microsoft.NET.ILLink.Tasks](https://dot.net/) | 9.0.0 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [Microsoft.NETCore.Platforms](https://dot.net/) | 1.1.0 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [Microsoft.NETCore.Targets](https://www.nuget.org/packages/Microsoft.NETCore.Targets) | 6.0.0-preview.4.21253.7 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [Microsoft.NETFramework.ReferenceAssemblies.net462](https://github.com/Microsoft/dotnet/tree/master/releases/reference-assemblies) | 1.0.3 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [Microsoft.NETFramework.ReferenceAssemblies](https://github.com/Microsoft/dotnet/tree/master/releases/reference-assemblies) | 1.0.3 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [Microsoft.Web.WebView2](https://aka.ms/webview) | 1.0.2895-prerelease | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause)
BSD-MYLEX | +| [Microsoft.Win32.Primitives](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [Microsoft.Win32.SystemEvents](https://dot.net/) | 9.0.0 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [Microsoft.Windows.CsWin32](https://github.com/Microsoft/CsWin32) | 0.3.106 | [Apache-2.0](http://www.apache.org/licenses/) | +| [Microsoft.Windows.CsWinRT](https://github.com/microsoft/cswinrt) | 2.2.0 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [Microsoft.Windows.SDK.BuildTools](https://aka.ms/WinSDKProjectURL) | 10.0.26100.1742 | PROPRIETARY-LICENSE | +| [Microsoft.Windows.SDK.Win32Docs](https://github.com/microsoft/win32metadata) | 0.1.42-alpha | PROPRIETARY-LICENSE | +| [Microsoft.Windows.SDK.Win32Metadata](https://github.com/microsoft/win32metadata) | 60.0.34-preview | [MIT](http://opensource.org/licenses/mit-license.php) | +| [Microsoft.Windows.WDK.Win32Metadata](https://github.com/microsoft/wdkmetadata) | 0.11.4-experimental | [MIT](http://opensource.org/licenses/mit-license.php) | +| [Microsoft.WindowsAppSDK](https://github.com/microsoft/windowsappsdk) | 1.6.240923002 | [MIT](http://opensource.org/licenses/mit-license.php)
[MS-DXSDK-D3DX-9.29.952.3](https://www.nuget.org/packages/Microsoft.DXSDK.D3DX/9.29.952.3/License) | +| [Microsoft.Xaml.Behaviors.WinUI.Managed](http://go.microsoft.com/fwlink/?LinkID=651678) | 2.0.9 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [MinVer](https://github.com/adamralph/minver) | 6.0.0 | [Apache-2.0](http://www.apache.org/licenses/) | +| [NETStandard.Library](https://dot.net/) | 1.6.1 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [NuGet.Versioning](https://aka.ms/nugetprj) | 6.11.1 | [Apache-2.0](http://www.apache.org/licenses/) | +| [PhotoSauce.MagicScaler](https://photosauce.net/) | 0.14.2 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [PhotoSauce.NativeCodecs.Libwebp](https://photosauce.net/) | 1.3.2-preview3 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [Roman-Numerals](https://github.com/picrap/RomanNumerals) | 2.0.1 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [Sentry](https://sentry.io/) | 4.13.0 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [SharpCompress](https://github.com/adamhathcock/sharpcompress) | 0.38.0 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [SharpHDiffPatch.Core](https://github.com/CollapseLauncher/SharpHDiffPatch.Core) | 2.2.8 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [System.AppContext](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [System.Collections.Concurrent](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [System.Collections](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [System.Console](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [System.Diagnostics.Debug](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [System.Diagnostics.Tools](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [System.Diagnostics.Tracing](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [System.Drawing.Common](https://github.com/dotnet/winforms) | 9.0.0 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [System.Globalization.Calendars](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [System.Globalization](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [System.IO.Compression.ZipFile](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [System.IO.Compression](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [System.IO.FileSystem.Primitives](https://dot.net/) | 4.3.0 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [System.IO.Hashing](https://dot.net/) | 9.0.0 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [System.Security.AccessControl](https://dot.net/) | 6.0.1 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [System.Security.Cryptography.ProtectedData](https://dot.net/) | 9.0.0 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [System.Text.Encoding.CodePages](https://dot.net/) | 9.0.0 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [System.Text.Json](https://dot.net/) | 9.0.0 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [System.Threading.Tasks.Extensions](https://dot.net/) | 4.5.4 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [TaskScheduler](https://github.com/dahall/taskscheduler) | 2.11.0 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [ThisAssembly.Constants](https://clarius.org/ThisAssembly) | 2.0.6 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [Velopack](https://github.com/velopack/velopack) | 0.0.869 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [ZstdSharp.Port](https://github.com/oleg-st/ZstdSharp) | 0.8.1 | [MIT](http://opensource.org/licenses/mit-license.php) | +| [runtime.win-x64.Microsoft.DotNet.ILCompiler](https://dot.net/) | 9.0.0 | [MIT](http://opensource.org/licenses/mit-license.php) | \ No newline at end of file From 2bb13d950cf440c2fdbd7d820a50d29ce9fea5ff Mon Sep 17 00:00:00 2001 From: Bagus Nur Listiyono Date: Tue, 19 Nov 2024 08:06:34 +0700 Subject: [PATCH 06/15] Add missing DLL/Dependency error message for Database Handler This way, user will be asked to download and install the missing VCRedist #607 --- .../Classes/Helper/Database/DBHandler.cs | 6 +++ .../XAMLs/MainApp/Pages/SettingsPage.xaml.cs | 44 ++++++++++++++++--- Hi3Helper.Core/Lang/Locale/LangMisc.cs | 8 ++-- Hi3Helper.Core/Lang/en_US.json | 5 ++- 4 files changed, 54 insertions(+), 9 deletions(-) diff --git a/CollapseLauncher/Classes/Helper/Database/DBHandler.cs b/CollapseLauncher/Classes/Helper/Database/DBHandler.cs index 0ece4c24e..dbee3ad10 100644 --- a/CollapseLauncher/Classes/Helper/Database/DBHandler.cs +++ b/CollapseLauncher/Classes/Helper/Database/DBHandler.cs @@ -160,6 +160,12 @@ public static async Task Init(bool redirectThrow = false, bool bypassEnableFlag } else LogWriteLine("[DbHandler::Init] Reinitializing database system..."); } + catch (DllNotFoundException e) + { + LogWriteLine("[DbHandler::Init] Error when connecting to database system! Probably missing Visual C/C++ redist!\r\n" + e, + LogType.Error, true); + if (redirectThrow) throw; + } // No need to handle all these error catcher with sentry // The error should be handled in the method caller instead catch (LibsqlException e) when (e.Message.Contains("`api error: `{\"error\":\"Unauthorized: `The JWT is invalid`\"}``", diff --git a/CollapseLauncher/XAMLs/MainApp/Pages/SettingsPage.xaml.cs b/CollapseLauncher/XAMLs/MainApp/Pages/SettingsPage.xaml.cs index e20d1953b..8a13084fe 100644 --- a/CollapseLauncher/XAMLs/MainApp/Pages/SettingsPage.xaml.cs +++ b/CollapseLauncher/XAMLs/MainApp/Pages/SettingsPage.xaml.cs @@ -1,6 +1,7 @@ #if !DISABLEDISCORD using CollapseLauncher.DiscordPresence; #endif + using CollapseLauncher.CustomControls; using CollapseLauncher.Dialogs; using CollapseLauncher.Extension; using CollapseLauncher.Helper; @@ -1493,18 +1494,20 @@ private async void ValidateAndSaveDbButton_Click(object sender, RoutedEventArgs { // Show checking bar status ShowChecking(); - + // Set the value from prop DbHandler.Uri = _dbUrl; DbHandler.Token = _dbToken; DbHandler.UserId = _dbUserId; - + var r = Random.Shared.Next(100); // Generate random int for data verification await DbHandler.Init(true, true); // Initialize database await DbHandler.StoreKeyValue("TestKey", r.ToString(), true); // Store random number in TestKey - if (Convert.ToInt32(await DbHandler.QueryKey("TestKey", true)) != r) // Query key and check if value is correct - throw new InvalidDataException("Data validation failed!"); // Throw if value does not match (then catch), unlikely but maybe for really unstable db server + if (Convert.ToInt32(await DbHandler.QueryKey("TestKey", true)) != + r) // Query key and check if value is correct + throw + new InvalidDataException("Data validation failed!"); // Throw if value does not match (then catch), unlikely but maybe for really unstable db server // Show success bar status ShowSuccess(); @@ -1516,9 +1519,40 @@ await SpawnDialog( null, null, ContentDialogButton.Close, - CustomControls.ContentDialogTheme.Success + ContentDialogTheme.Success ); // Show success dialog } + catch (DllNotFoundException ex) + { + // No need to revert the value if fail, user is asked to restart the app + ShowFailed(ex); + var res = await SpawnDialog( + Lang._Misc.MissingVcRedist, + Lang._Misc.MissingVcRedistSubtitle, + sender as UIElement, + Lang._Misc.Close, + Lang._Misc.Yes, + null, + ContentDialogButton.Primary, + ContentDialogTheme.Error); + if (res == ContentDialogResult.Primary) + { + await Task.Run(() => + { + var uri = + "https://github.com/abbodi1406/vcredist/releases/latest/download/VisualCppRedist_AIO_x86_x64.exe"; + ProcessStartInfo psi = new ProcessStartInfo + { + FileName = "explorer.exe", + Arguments = uri, + UseShellExecute = true, + Verb = "runas" + }; + Process.Start(psi); + }); + } + else { await SentryHelper.ExceptionHandlerAsync(ex); } + } catch (Exception ex) { // Revert value if fail diff --git a/Hi3Helper.Core/Lang/Locale/LangMisc.cs b/Hi3Helper.Core/Lang/Locale/LangMisc.cs index 4b030fb5d..1f888b1f6 100644 --- a/Hi3Helper.Core/Lang/Locale/LangMisc.cs +++ b/Hi3Helper.Core/Lang/Locale/LangMisc.cs @@ -134,9 +134,11 @@ public sealed partial class LangMisc public string ImageCropperTitle { get; set; } = LangFallback?._Misc.ImageCropperTitle; - public string IsBytesMoreThanBytes { get; set; } = LangFallback?._Misc.IsBytesMoreThanBytes; - public string IsBytesUnlimited { get; set; } = LangFallback?._Misc.IsBytesUnlimited; - public string IsBytesNotANumber { get; set; } = LangFallback?._Misc.IsBytesNotANumber; + public string IsBytesMoreThanBytes { get; set; } = LangFallback?._Misc.IsBytesMoreThanBytes; + public string IsBytesUnlimited { get; set; } = LangFallback?._Misc.IsBytesUnlimited; + public string IsBytesNotANumber { get; set; } = LangFallback?._Misc.IsBytesNotANumber; + public string MissingVcRedist { get; set; } = LangFallback?._Misc.MissingVcRedist; + public string MissingVcRedistSubtitle { get; set; } = LangFallback?._Misc.MissingVcRedistSubtitle; } } #endregion diff --git a/Hi3Helper.Core/Lang/en_US.json b/Hi3Helper.Core/Lang/en_US.json index 06dccbcce..911737a4d 100644 --- a/Hi3Helper.Core/Lang/en_US.json +++ b/Hi3Helper.Core/Lang/en_US.json @@ -790,7 +790,10 @@ "IsBytesMoreThanBytes": "= {0} bytes (-/+ {1})", "IsBytesUnlimited": "= Unlimited", - "IsBytesNotANumber": "= NaN" + "IsBytesNotANumber": "= NaN", + + "MissingVcRedist": "Missing Visual C/C++ Redistributable", + "MissingVcRedistSubtitle": "You need to install the Visual C/C++ Redistributable to run this function. Do you want to download it now?\r\nNote: This will open a browser window and download a file from abbodi1406 GitHub repository. Please run the installer after downloading it then restart Collapse and try again.\r\nIf you have already installed it but the error remains, please send a issue ticket to us." }, "_BackgroundNotification": { From 2f14781f3d16e5386a8fbd040cd79f5e7c6bb93d Mon Sep 17 00:00:00 2001 From: "transifex-integration[bot]" <43880903+transifex-integration[bot]@users.noreply.github.com> Date: Tue, 19 Nov 2024 15:25:22 +0000 Subject: [PATCH 07/15] [skip ci] Sync translation Translate en_US.json in es_419 100% reviewed source file: 'en_US.json' on 'es_419'. --- Hi3Helper.Core/Lang/es_419.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Hi3Helper.Core/Lang/es_419.json b/Hi3Helper.Core/Lang/es_419.json index 611cf250a..34b781251 100644 --- a/Hi3Helper.Core/Lang/es_419.json +++ b/Hi3Helper.Core/Lang/es_419.json @@ -790,7 +790,10 @@ "IsBytesMoreThanBytes": "= {0} bytes (-/+ {1})", "IsBytesUnlimited": "= Sin Límite", - "IsBytesNotANumber": "= NaN" + "IsBytesNotANumber": "= NaN", + + "MissingVcRedist": "Falta el Visual C/C++ Redistributable", + "MissingVcRedistSubtitle": "Necesita instalar Visual C/C++ Redistributable para ejecutar esta función. ¿Quieres descargarlo ahora?\r\nNota: Se abrirá el navegador y se descargará un archivo del repositorio GitHub de abbodi1406. Por favor, ejecuta el instalador después de descargarlo y luego reinicia Collapse e inténtalo de nuevo.\r\nSi ya fue instalado pero el error persiste, por favor envianos un ticket informando del problema." }, "_BackgroundNotification": { From 6517ba795a0c08994de9224b9df0a36aad795182 Mon Sep 17 00:00:00 2001 From: Bagus Nur Listiyono Date: Tue, 19 Nov 2024 22:41:55 +0700 Subject: [PATCH 08/15] Change VCRedist download link --- CollapseLauncher/XAMLs/MainApp/Pages/SettingsPage.xaml.cs | 4 +--- Hi3Helper.Core/Lang/en_US.json | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/CollapseLauncher/XAMLs/MainApp/Pages/SettingsPage.xaml.cs b/CollapseLauncher/XAMLs/MainApp/Pages/SettingsPage.xaml.cs index 8a13084fe..84b9cf149 100644 --- a/CollapseLauncher/XAMLs/MainApp/Pages/SettingsPage.xaml.cs +++ b/CollapseLauncher/XAMLs/MainApp/Pages/SettingsPage.xaml.cs @@ -1539,12 +1539,10 @@ await SpawnDialog( { await Task.Run(() => { - var uri = - "https://github.com/abbodi1406/vcredist/releases/latest/download/VisualCppRedist_AIO_x86_x64.exe"; ProcessStartInfo psi = new ProcessStartInfo { FileName = "explorer.exe", - Arguments = uri, + Arguments = "https://aka.ms/vs/17/release/vc_redist.x64.exe", UseShellExecute = true, Verb = "runas" }; diff --git a/Hi3Helper.Core/Lang/en_US.json b/Hi3Helper.Core/Lang/en_US.json index 911737a4d..4c9acd01c 100644 --- a/Hi3Helper.Core/Lang/en_US.json +++ b/Hi3Helper.Core/Lang/en_US.json @@ -793,7 +793,7 @@ "IsBytesNotANumber": "= NaN", "MissingVcRedist": "Missing Visual C/C++ Redistributable", - "MissingVcRedistSubtitle": "You need to install the Visual C/C++ Redistributable to run this function. Do you want to download it now?\r\nNote: This will open a browser window and download a file from abbodi1406 GitHub repository. Please run the installer after downloading it then restart Collapse and try again.\r\nIf you have already installed it but the error remains, please send a issue ticket to us." + "MissingVcRedistSubtitle": "You need to install the Visual C/C++ Redistributable to run this function. Do you want to download it now?\r\nNote: This will open a browser window and download a file from Microsoft. Please run the installer after downloading it then restart Collapse and try again.\r\nIf you have already installed it but the error remains, please send a issue ticket to us." }, "_BackgroundNotification": { From 00b746d86d57c69453d6bdfe178da59dbcca99a1 Mon Sep 17 00:00:00 2001 From: "transifex-integration[bot]" <43880903+transifex-integration[bot]@users.noreply.github.com> Date: Tue, 19 Nov 2024 16:47:25 +0000 Subject: [PATCH 09/15] [skip ci] Sync translation Translate en_US.json in zh_CN 100% reviewed source file: 'en_US.json' on 'zh_CN'. --- Hi3Helper.Core/Lang/zh_CN.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Hi3Helper.Core/Lang/zh_CN.json b/Hi3Helper.Core/Lang/zh_CN.json index ea15f146e..b881e2d7f 100644 --- a/Hi3Helper.Core/Lang/zh_CN.json +++ b/Hi3Helper.Core/Lang/zh_CN.json @@ -790,7 +790,10 @@ "IsBytesMoreThanBytes": "= {0} 字节 (-/+ {1})", "IsBytesUnlimited": "= 无限制", - "IsBytesNotANumber": "= NaN" + "IsBytesNotANumber": "= NaN", + + "MissingVcRedist": "缺少 Visual C/C++ 可再发行程序包", + "MissingVcRedistSubtitle": "您需要安装 Visual C/C++ 可再发行程序包才能运行此功能。您现在要下载吗?\n注意:这将打开一个浏览器窗口,并从微软下载一个文件。请下载后运行安装程序,然后重新启动 Collapse 并重试。\n如果您已经安装过了但仍然报错,请在 GitHub 上给我们提交一个 issue。" }, "_BackgroundNotification": { From 423bdf754ef0e8abbe7294d03eea89d4a7d041c1 Mon Sep 17 00:00:00 2001 From: "transifex-integration[bot]" <43880903+transifex-integration[bot]@users.noreply.github.com> Date: Wed, 20 Nov 2024 01:58:59 +0000 Subject: [PATCH 10/15] [skip ci] Sync translation Translate en_US.json in es_419 100% reviewed source file: 'en_US.json' on 'es_419'. --- Hi3Helper.Core/Lang/es_419.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Hi3Helper.Core/Lang/es_419.json b/Hi3Helper.Core/Lang/es_419.json index 34b781251..f584f247c 100644 --- a/Hi3Helper.Core/Lang/es_419.json +++ b/Hi3Helper.Core/Lang/es_419.json @@ -793,7 +793,7 @@ "IsBytesNotANumber": "= NaN", "MissingVcRedist": "Falta el Visual C/C++ Redistributable", - "MissingVcRedistSubtitle": "Necesita instalar Visual C/C++ Redistributable para ejecutar esta función. ¿Quieres descargarlo ahora?\r\nNota: Se abrirá el navegador y se descargará un archivo del repositorio GitHub de abbodi1406. Por favor, ejecuta el instalador después de descargarlo y luego reinicia Collapse e inténtalo de nuevo.\r\nSi ya fue instalado pero el error persiste, por favor envianos un ticket informando del problema." + "MissingVcRedistSubtitle": "Necesitas instalar Visual C/C++ Redistributable para ejecutar esta función. ¿Quieres descargarlo ahora?\r\nNota: Se abrirá el navegador y se descargará un archivo desde Microsoft. Por favor, ejecuta el instalador después de descargarlo y luego reinicia Collapse e inténtalo de nuevo.\r\nSi ya fue instalado pero el error persiste, por favor envianos un ticket informando del problema." }, "_BackgroundNotification": { From b43f8f6897eb424e8c33925afe5b3a73ed747951 Mon Sep 17 00:00:00 2001 From: Bagus Nur Listiyono Date: Wed, 20 Nov 2024 10:11:52 +0700 Subject: [PATCH 11/15] [GI Repair] Prevent assigning null remoteNamePersistent --- .../Classes/RepairManagement/Genshin/Check.cs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/CollapseLauncher/Classes/RepairManagement/Genshin/Check.cs b/CollapseLauncher/Classes/RepairManagement/Genshin/Check.cs index a8d263e32..f880e53ac 100644 --- a/CollapseLauncher/Classes/RepairManagement/Genshin/Check.cs +++ b/CollapseLauncher/Classes/RepairManagement/Genshin/Check.cs @@ -155,9 +155,10 @@ private async ValueTask CheckAssetAllType(PkgVersionProperties asset, List AssetEntry.Add( new AssetProperty( - Path.GetFileName(UsePersistent ? asset.remoteNamePersistent : asset.remoteName), + Path.GetFileName(repairFile), RepairAssetType.Generic, - Path.GetDirectoryName(UsePersistent ? asset.remoteNamePersistent : asset.remoteName), + Path.GetDirectoryName(repairFile), asset.fileSize, null, HexTool.HexToBytesUnsafe(asset.md5) @@ -209,8 +214,7 @@ private async ValueTask CheckAssetAllType(PkgVersionProperties asset, List Date: Wed, 20 Nov 2024 13:08:24 +0000 Subject: [PATCH 12/15] [skip ci] Sync translation Translate en_US.json in ja_JP 100% reviewed source file: 'en_US.json' on 'ja_JP'. --- Hi3Helper.Core/Lang/ja_JP.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Hi3Helper.Core/Lang/ja_JP.json b/Hi3Helper.Core/Lang/ja_JP.json index e64d24ad4..fef202fd3 100644 --- a/Hi3Helper.Core/Lang/ja_JP.json +++ b/Hi3Helper.Core/Lang/ja_JP.json @@ -422,6 +422,8 @@ "Debug": "その他の設定", "Debug_Console": "コンソールを表示", "Debug_IncludeGameLogs": "コンソールログにゲームのログも保存(アカウント情報も含まれる可能性有り)", + "Debug_SendRemoteCrashData": "匿名で開発者にクラッシュレポートを送る", + "Debug_SendRemoteCrashData_EnvVarDisablement": "環境変数'DISABLE_SENTRY'の値がtrueであるため、この設定は無効になっています。", "Debug_MultipleInstance": "Collapseの多重起動を許可する", "ChangeRegionWarning_Toggle": "ゲームの変更時に確認ダイアログを表示", @@ -788,7 +790,10 @@ "IsBytesMoreThanBytes": "= {0} バイト (-/+ {1})", "IsBytesUnlimited": "= 無制限", - "IsBytesNotANumber": "= 不正な数値" + "IsBytesNotANumber": "= 不正な数値", + + "MissingVcRedist": "Visual C/C++ 再頒布可能パッケージが見つかりません", + "MissingVcRedistSubtitle": "この関数を実行するには、Visual C/C++ 再頒布可能パッケージをインストールする必要があります。今すぐダウンロードしますか?\r\n注:ブラウザを起動してMicrosoftからパッケージをダウンロードします。ダウンロード後にインストーラーを実行し、Collapseを再起動してから再度お試しください。\nインストール済みなのにエラーが解決しない場合は、Githubでissueを送信してください。" }, "_BackgroundNotification": { From 293719eb28476b0956c81514c321f996d04cc3fe Mon Sep 17 00:00:00 2001 From: Bagus Nur Listiyono Date: Thu, 21 Nov 2024 00:05:44 +0700 Subject: [PATCH 13/15] [PlaytimeDB] Indicate that Sync button is syncing or done after user click MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Yes, I use artificial delay, deal with it 😎 --- CollapseLauncher/XAMLs/MainApp/Pages/HomePage.xaml | 2 ++ .../XAMLs/MainApp/Pages/HomePage.xaml.cs | 12 +++++++++++- Hi3Helper.Core/Lang/Locale/LangHomePage.cs | 1 + Hi3Helper.Core/Lang/en_US.json | 1 + 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CollapseLauncher/XAMLs/MainApp/Pages/HomePage.xaml b/CollapseLauncher/XAMLs/MainApp/Pages/HomePage.xaml index d6e36415c..3d527b7e1 100644 --- a/CollapseLauncher/XAMLs/MainApp/Pages/HomePage.xaml +++ b/CollapseLauncher/XAMLs/MainApp/Pages/HomePage.xaml @@ -2468,12 +2468,14 @@ Date: Thu, 21 Nov 2024 00:40:43 +0700 Subject: [PATCH 14/15] [PlaytimeDB] Let user know if there is an error on manual sync op --- .../GameManagement/GamePlaytime/Playtime.cs | 5 ++-- .../RegistryClass/CollapsePlaytime.cs | 7 ++++- .../Classes/Interfaces/IGamePlaytime.cs | 3 +- .../XAMLs/MainApp/Pages/HomePage.xaml.cs | 30 +++++++++++++------ 4 files changed, 32 insertions(+), 13 deletions(-) diff --git a/CollapseLauncher/Classes/GameManagement/GamePlaytime/Playtime.cs b/CollapseLauncher/Classes/GameManagement/GamePlaytime/Playtime.cs index 3e5038c25..8ba85da0b 100644 --- a/CollapseLauncher/Classes/GameManagement/GamePlaytime/Playtime.cs +++ b/CollapseLauncher/Classes/GameManagement/GamePlaytime/Playtime.cs @@ -7,6 +7,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.IO; +using System.Threading.Tasks; using System.Timers; using static Hi3Helper.Logger; using static CollapseLauncher.Dialogs.SimpleDialogs; @@ -49,9 +50,9 @@ public Playtime(IGameVersionCheck gameVersionManager, IGameSettings gameSettings } #nullable disable - public async void CheckDb() + public async Task CheckDb(bool redirectThrow = false) { - var needUpdate = await _playtime.DbSync(); + var needUpdate = await _playtime.DbSync(redirectThrow); if (needUpdate is not { IsUpdated: true, PlaytimeData: not null }) return; _playtime = needUpdate.PlaytimeData; diff --git a/CollapseLauncher/Classes/GameManagement/GamePlaytime/RegistryClass/CollapsePlaytime.cs b/CollapseLauncher/Classes/GameManagement/GamePlaytime/RegistryClass/CollapsePlaytime.cs index 68809ba50..4e4228f4e 100644 --- a/CollapseLauncher/Classes/GameManagement/GamePlaytime/RegistryClass/CollapsePlaytime.cs +++ b/CollapseLauncher/Classes/GameManagement/GamePlaytime/RegistryClass/CollapsePlaytime.cs @@ -289,7 +289,7 @@ public void AddMinute() /// Sync from/to DB at init /// /// true if require refresh, false if dont. - public async ValueTask<(bool IsUpdated, CollapsePlaytime? PlaytimeData)> DbSync() + public async ValueTask<(bool IsUpdated, CollapsePlaytime? PlaytimeData)> DbSync(bool redirectThrow = false) { LogWriteLine("[CollapsePlaytime::DbSync] Starting sync operation...", LogType.Default, true); try @@ -354,6 +354,11 @@ public void AddMinute() await SentryHelper.ExceptionHandlerAsync(ex, SentryHelper.ExceptionType.UnhandledOther); LogWriteLine($"[CollapsePlaytime::DbSync] Failed when trying to do sync operation\r\n{ex}", LogType.Error, true); + if (redirectThrow) + { + throw; + } + return (false, null); } } diff --git a/CollapseLauncher/Classes/Interfaces/IGamePlaytime.cs b/CollapseLauncher/Classes/Interfaces/IGamePlaytime.cs index b7bdcf236..8da09b0a0 100644 --- a/CollapseLauncher/Classes/Interfaces/IGamePlaytime.cs +++ b/CollapseLauncher/Classes/Interfaces/IGamePlaytime.cs @@ -1,6 +1,7 @@ using CollapseLauncher.GamePlaytime; using System; using System.Diagnostics; +using System.Threading.Tasks; namespace CollapseLauncher.Interfaces { @@ -12,6 +13,6 @@ internal interface IGamePlaytime : IDisposable void Reset(); void Update(TimeSpan timeSpan, bool forceUpdateDb = false); void StartSession(Process proc, DateTime? begin = null); - void CheckDb(); + Task CheckDb(bool redirectThrow = false); } } diff --git a/CollapseLauncher/XAMLs/MainApp/Pages/HomePage.xaml.cs b/CollapseLauncher/XAMLs/MainApp/Pages/HomePage.xaml.cs index 2b9ab9d75..6a36c6db8 100644 --- a/CollapseLauncher/XAMLs/MainApp/Pages/HomePage.xaml.cs +++ b/CollapseLauncher/XAMLs/MainApp/Pages/HomePage.xaml.cs @@ -2416,17 +2416,29 @@ private async void ResetPlaytimeButton_Click(object sender, RoutedEventArgs e) private async void SyncDbPlaytimeButton_Click(object sender, RoutedEventArgs e) { - SyncDbPlaytimeBtnGlyph.Glyph = "\uf110"; // Loading - SyncDbPlaytimeBtnText.Text = Lang._HomePage.GamePlaytime_Idle_SyncDbSyncing; - CurrentGameProperty._GamePlaytime.CheckDb(); - await Task.Delay(500); + try + { + SyncDbPlaytimeBtnGlyph.Glyph = "\uf110"; // Loading + SyncDbPlaytimeBtnText.Text = Lang._HomePage.GamePlaytime_Idle_SyncDbSyncing; + await CurrentGameProperty._GamePlaytime.CheckDb(true); + + await Task.Delay(500); - SyncDbPlaytimeBtnGlyph.Glyph = "\uf00c"; // Completed (check) - SyncDbPlaytimeBtnText.Text = Lang._Misc.Completed + "!"; - await Task.Delay(1000); + SyncDbPlaytimeBtnGlyph.Glyph = "\uf00c"; // Completed (check) + SyncDbPlaytimeBtnText.Text = Lang._Misc.Completed + "!"; + await Task.Delay(1000); - SyncDbPlaytimeBtnGlyph.Glyph = "\uf021"; // Default - SyncDbPlaytimeBtnText.Text = Lang._HomePage.GamePlaytime_Idle_SyncDb; + SyncDbPlaytimeBtnGlyph.Glyph = "\uf021"; // Default + SyncDbPlaytimeBtnText.Text = Lang._HomePage.GamePlaytime_Idle_SyncDb; + } + catch (Exception ex) + { + LogWriteLine($"Failed when trying to sync playtime to database!\r\n{ex}", LogType.Error, true); + ErrorSender.SendException(ex); + + SyncDbPlaytimeBtnGlyph.Glyph = "\uf021"; // Default + SyncDbPlaytimeBtnText.Text = Lang._HomePage.GamePlaytime_Idle_SyncDb; + } } private void NumberValidationTextBox(TextBox sender, TextBoxBeforeTextChangingEventArgs args) From 441d991672345c0b816fa2654b1f59b9b831cbf9 Mon Sep 17 00:00:00 2001 From: Bagus Nur Listiyono Date: Thu, 21 Nov 2024 00:40:57 +0700 Subject: [PATCH 15/15] Update Dependencies --- CollapseLauncher/CollapseLauncher.csproj | 22 +- CollapseLauncher/packages.lock.json | 190 ++++++++---------- H.NotifyIcon | 2 +- ...Toolkit.WinUI.Controls.ImageCropper.csproj | 10 +- .../ImageCropper/packages.lock.json | 63 +++--- ...kit.WinUI.Controls.SettingsControls.csproj | 8 +- .../SettingsControls/packages.lock.json | 57 +++--- .../Classes/SentryHelper/SentryHelper.cs | 2 - ImageEx | 2 +- 9 files changed, 162 insertions(+), 194 deletions(-) diff --git a/CollapseLauncher/CollapseLauncher.csproj b/CollapseLauncher/CollapseLauncher.csproj index 03a917daa..480e29fa6 100644 --- a/CollapseLauncher/CollapseLauncher.csproj +++ b/CollapseLauncher/CollapseLauncher.csproj @@ -150,16 +150,16 @@ - + - - - - - - - - + + + + + + + +