Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Zenless Zone Zero Support #511

Merged
merged 30 commits into from
Jun 30, 2024
Merged

Adding Zenless Zone Zero Support #511

merged 30 commits into from
Jun 30, 2024

Conversation

neon-nyan
Copy link
Member

@neon-nyan neon-nyan commented Jun 28, 2024

Main Goal

As the title said, the PR brings support for the newest HoYo's title, Zenless Zone Zero.
This PR contains some runtime changes that's required in order to support the initial preload on the pre-release date.

image

What's Changed?

  • [New] Zenless Zone Zero Support
  • [Impl] Ignore the use of sophon download if delta patch is detected.
  • [Impl] Enable nullable on RegionClasses
  • [Impl] Move some GameSettings properties to SettingsBase.
  • [Impl] Bring InitializeSettings() into IGameSettings Interface.
  • [Fix] Potential NullReferenceException throw if some GamePreset and GameSettings values are null.
  • [New] Showing "Sophon mode" label under Installation Progress indicator if detected.

image

  • [Fix] CPU and Memory Usage overhead due to unnecessary loops on "Running Game Check" routine.

image

PR Status :

  • Overall Status : Done
  • Commits : Done
  • Synced to base (Collapse:main) : Yes
  • Build status : OK
  • Crashing : No
  • Bug found caused by PR : 0

Templates

Changelog Prefixes
  **[New]**
  **[Imp]**
  **[Fix]**
  **[Loc]**
  **[Doc]**

Copy link

github-actions bot commented Jun 28, 2024

Qodana for .NET

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Detected 99 dependencies

Third-party software list

This page lists the third-party software dependencies used in CollapseLauncher

Dependency Version Licenses
Clowd.Squirrel 2.11.1 MIT
CommunityToolkit.Common 8.2.2 MIT
CommunityToolkit.Mvvm 8.2.2 MIT
CommunityToolkit.WinUI.Animations 8.0.240109 MIT
CommunityToolkit.WinUI.Behaviors 8.0.240109 MIT
CommunityToolkit.WinUI.Controls.ImageCropper 8.1.240328-rc MIT
CommunityToolkit.WinUI.Controls.Primitives 8.0.240109 MIT
CommunityToolkit.WinUI.Controls.SettingsControls 8.0.240109 MIT
CommunityToolkit.WinUI.Controls.Sizers 8.0.240109 MIT
CommunityToolkit.WinUI.Converters 8.0.240109 MIT
CommunityToolkit.WinUI.Extensions 8.1.240328-rc MIT
CommunityToolkit.WinUI.Helpers 8.0.240109 MIT
CommunityToolkit.WinUI.Media 8.0.240109 MIT
CommunityToolkit.WinUI.Triggers 8.0.240109 MIT
GitInfo 3.3.5 MIT
Google.Protobuf.Tools 3.27.1 PROTOBUF
Google.Protobuf 3.27.2 BSD-3-Clause
H.GeneratedIcons.System.Drawing 2.0.131 MIT
H.NotifyIcon.WinUI 2.0.131 MIT
H.NotifyIcon 2.0.131 MIT
Hi3Helper.ZstdNet 1.6.2 BSD-3-Clause
HtmlAgilityPack 1.11.61 MIT
ImageEx 2.1.1 MIT
Markdig.Signed 0.37.0 BSD-2-Clause
Microsoft.CSharp 4.7.0 MIT
Microsoft.Graphics.Win2D 1.2.0 MS-ASP-NET-WEB-OPTIMIZATION
Microsoft.NET.ILLink.Tasks 8.0.5 MIT
Microsoft.NETCore.Platforms 8.0.0-preview.7.23375.6 MIT
Microsoft.NETCore.Targets 6.0.0-preview.4.21253.7 MIT
Microsoft.Win32.Registry 5.0.0 MIT
Microsoft.Win32.SystemEvents 8.0.0 MIT
Microsoft.Windows.SDK.BuildTools 10.0.26100.1 PROPRIETARY-LICENSE
Microsoft.WindowsAppSDK 1.5.240607001 MIT
MS-DXSDK-D3DX-9.29.952.3
Microsoft.Xaml.Behaviors.WinUI.Managed 2.0.9 MIT
PhotoSauce.MagicScaler 0.14.2 MIT
PhotoSauce.NativeCodecs.Libwebp 1.3.2-preview3 MIT
Roman-Numerals 2.0.0 MIT
SharpCompress 0.37.2 MIT
SharpHDiffPatch.Core 2.2.6 MIT
System.Collections.Concurrent 4.3.0 MS-NET-LIBRARY-2019-06
System.Collections 4.3.0 MS-NET-LIBRARY-2019-06
System.Diagnostics.Debug 4.3.0 MS-NET-LIBRARY-2019-06
System.Diagnostics.DiagnosticSource 4.3.0 MS-NET-LIBRARY-2019-06
System.Diagnostics.EventLog 8.0.0 MIT
System.Diagnostics.Tracing 4.3.0 MS-NET-LIBRARY-2019-06
System.Drawing.Common 8.0.6 MIT
System.Globalization.Calendars 4.3.0 MS-NET-LIBRARY-2019-06
System.Globalization.Extensions 4.3.0 MS-NET-LIBRARY-2019-06
System.Globalization 4.3.0 MS-NET-LIBRARY-2019-06
System.IO.FileSystem.Primitives 4.3.0 MS-NET-LIBRARY-2019-06
System.IO.FileSystem 4.3.0 MS-NET-LIBRARY-2019-06
System.IO.Hashing 8.0.0 MIT
System.IO 4.3.0 MS-NET-LIBRARY-2019-06
System.Linq 4.3.0 MS-NET-LIBRARY-2019-06
System.Net.Http 4.3.4 MS-NET-LIBRARY-2019-06
System.Net.Primitives 4.3.0 MS-NET-LIBRARY-2019-06
System.Reflection.Primitives 4.3.0 MS-NET-LIBRARY-2019-06
System.Reflection 4.3.0 MS-NET-LIBRARY-2019-06
System.Resources.ResourceManager 4.3.0 MS-NET-LIBRARY-2019-06
System.Runtime.Extensions 4.3.0 MS-NET-LIBRARY-2019-06
System.Runtime.Handles 4.3.0 MS-NET-LIBRARY-2019-06
System.Runtime.InteropServices 4.3.0 MS-NET-LIBRARY-2019-06
System.Runtime.Numerics 4.3.0 MS-NET-LIBRARY-2019-06
System.Runtime 4.3.1 MS-NET-LIBRARY-2019-06
System.Security.AccessControl 6.0.1 MIT
System.Security.Cryptography.Algorithms 4.3.0 MS-NET-LIBRARY-2019-06
System.Security.Cryptography.Cng 4.3.0 MS-NET-LIBRARY-2019-06
System.Security.Cryptography.Csp 4.3.0 MS-NET-LIBRARY-2019-06
System.Security.Cryptography.Encoding 4.3.0 MS-NET-LIBRARY-2019-06
System.Security.Cryptography.OpenSsl 4.3.0 MS-NET-LIBRARY-2019-06
System.Security.Cryptography.Primitives 4.3.0 MS-NET-LIBRARY-2019-06
System.Security.Cryptography.X509Certificates 4.3.0 MS-NET-LIBRARY-2019-06
System.Security.Principal.Windows 5.0.0 MIT
System.Text.Encoding.CodePages 8.0.0 MIT
System.Text.Encoding 4.3.0 MS-NET-LIBRARY-2019-06
System.Text.Encodings.Web 8.0.0 MIT
System.Text.Json 8.0.3 MIT
System.Text.RegularExpressions 4.3.1 MS-NET-LIBRARY-2019-06
System.Threading.Tasks.Extensions 4.5.4 MIT
System.Threading.Tasks 4.3.0 MS-NET-LIBRARY-2019-06
System.Threading 4.3.0 MS-NET-LIBRARY-2019-06
TaskScheduler 2.11.0 MIT
ThisAssembly.Constants 1.4.1 MIT
ZstdSharp.Port 0.8.1 MIT
runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.2 MS-NET-LIBRARY-2019-06
runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.2 MS-NET-LIBRARY-2019-06
runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.2 MS-NET-LIBRARY-2019-06
runtime.native.System.Net.Http 4.3.0 MS-NET-LIBRARY-2019-06
runtime.native.System.Security.Cryptography.Apple 4.3.0 MS-NET-LIBRARY-2019-06
runtime.native.System.Security.Cryptography.OpenSsl 4.3.2 MS-NET-LIBRARY-2019-06
runtime.native.System 4.3.0 MS-NET-LIBRARY-2019-06
runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.2 MS-NET-LIBRARY-2019-06
runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.2 MS-NET-LIBRARY-2019-06
runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple 4.3.0 MS-NET-LIBRARY-2019-06
runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.2 MS-NET-LIBRARY-2019-06
runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.2 MS-NET-LIBRARY-2019-06
runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.2 MS-NET-LIBRARY-2019-06
runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.2 MS-NET-LIBRARY-2019-06
runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.2 MS-NET-LIBRARY-2019-06
Contact Qodana team

Contact us at [email protected]

@neon-nyan neon-nyan marked this pull request as ready for review June 28, 2024 20:20
@neon-nyan neon-nyan requested a review from a team June 28, 2024 20:20
@neon-nyan neon-nyan self-assigned this Jun 28, 2024
@neon-nyan neon-nyan added Area: Preset Config Issue labeled for Preset/Region Configuration Game: Zenless Zone Zero Issue labeled for Zenless Zone Zero Area: Runtime Issue labeled for runtime, Hi3Helper.Core and other libraries used by Collapse Area: Launcher Issue labeled for Launcher update mechanism Area: UI/UX Issue labeled for User Interface/eXperience related issue Enhancement New feature or request labels Jun 28, 2024
@neon-nyan
Copy link
Member Author

Will fix the warnings later, I'm eepy right now

StartGameBtn.IsEnabled = true;
StartGameBtnText!.Text = Lang._HomePage.StartBtn;
StartGameBtnIcon.Glyph = StartGameBtnIconGlyph;
StartGameBtnAnimatedIconGrid.Opacity = 1;

Check warning

Code scanning / QDNET

Possible 'System.NullReferenceException' Warning

Possible 'System.NullReferenceException'
HoYoPlayGameInfoField? sophonLauncherGameInfoRoot = new HoYoPlayGameInfoField();
if (hypLauncherGameInfo != null)
{
ConvertGameInfoResources(ref sophonLauncherGameInfoRoot, hypLauncherGameInfo?.GameInfoData);

Check warning

Code scanning / QDNET

Conditional access qualifier expression is known to be null or not null Warning

Conditional access qualifier expression is known to be not null
@@ -177,7 +177,7 @@

GameVersion = _Entry.data.game.latest.version;

return _RepoList[GameVersion];
return _RepoList[GameVersion ?? throw new InvalidOperationException()];

Check warning

Code scanning / QDNET

Possible 'System.NullReferenceException' Warning

Possible 'System.NullReferenceException'
@neon-nyan neon-nyan merged commit 7f2c362 into main Jun 30, 2024
6 checks passed
@bagusnl bagusnl deleted the zzz-support branch August 2, 2024 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Launcher Issue labeled for Launcher update mechanism Area: Preset Config Issue labeled for Preset/Region Configuration Area: Runtime Issue labeled for runtime, Hi3Helper.Core and other libraries used by Collapse Area: UI/UX Issue labeled for User Interface/eXperience related issue Enhancement New feature or request Game: Zenless Zone Zero Issue labeled for Zenless Zone Zero
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant