Skip to content

Conversation

@neon-nyan
Copy link
Member

@neon-nyan neon-nyan commented May 8, 2025

Main Goal

As per May 5th 2025 (on Genshin Impact 5.6 update), HoYo just removed the entire Zip packages from the launcher APIs. causing a major issue throughout Third-party Launcher Community (Collapse is no exception). This PR also fixed some essential features which has stopped working due its dependency on Zip's ScatteredFiles references. Now, all those features are moving its dependency entirely to Sophon as its game files references.

What's changed?

  • [Fix - Genshin Impact] Infinite Loop/Getting Stuck while Updating Game to 5.6.0
  • [Fix - Genshin Impact] Crash on File Cleanup feature due to missing Zip's pkg_version ScatteredFiles reference.
  • [Fix - Genshin Impact] Crash on Game Repair feature due to missing Zip's pkg_version ScatteredFiles reference.
  • [Fix] Possible crash when user defines version field in config.ini with 2-numbers or less format.
  • [Fix] #736 GameIniVersion ignores mismatched value
  • [Fix] #737 Multi-instance doesn't work

PR Status :

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

@neon-nyan neon-nyan requested a review from Copilot May 8, 2025 19:09
@neon-nyan neon-nyan self-assigned this May 8, 2025
@neon-nyan neon-nyan added Bug Something isn't working Game: Genshin Impact Issue labeled for Genshin Impact Area: Mirror/API Server Issue labeled for Mirror/API Server issue releated Area: Launcher Issue labeled for Launcher update mechanism Priority: High labels May 8, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR provides an emergency hotfix to update launcher functionality after the removal of Zip packages from the launcher APIs, moving dependencies for various features entirely to Sophon as a game file reference. Key changes include updating download links and version numbers in the README, modifying repair and manifest-fetching logic to support Sophon assets, and refactoring language and patch handling in the installation components.

Reviewed Changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.

Show a summary per file
File Description
README.md Updated download links and build versions to reflect the new release.
Hi3Helper.* Updated subproject commits for Sophon and EncTool dependencies.
Hi3Helper.Core/.../GameDataStructure.cs Enabled nullable context around new properties.
Hi3Helper.Core/.../ClassesContext.cs Extended JSON source-generation options with a new ignore condition.
CollapseLauncher.csproj Bumped version from 1.83.0 to 1.83.1.
Repair.cs, GenshinRepair.cs Modified repair handling to utilize Sophon for asset downloads.
Fetch.cs Refactored manifest fetching and asset elimination logic to support Sophon and audio file processing.
Check.cs Adjusted hash comparison conditions for file validation.
GenshinInstall.PkgVersion.cs Added support for generating a fake pkg_version from Sophon manifest data.
InstallManagerBase.cs, InstallManagerBase.SophonPatch.cs, InstallManagerBase.PkgVersion.cs Refactored language string methods and enhanced pkg_version download and patch manifest processing.
Comments suppressed due to low confidence (2)

CollapseLauncher/Classes/InstallManagement/Base/InstallManagerBase.PkgVersion.cs:187

  • [nitpick] Consider rephrasing the error message for clarity, for example: 'The audio language index file was expected at {path} but was not found.'
throw new FileNotFoundException("Game does have audio lang index file but does not exist! Expecting location: {_gameAudioLangListPathStatic}");

CollapseLauncher/Classes/RepairManagement/Genshin/Fetch.cs:550

  • The condition for setting remoteUrl was changed from checking for non-patch assets to checking when isPatch is true; please confirm that this inversion is intentional.
if (!string.IsNullOrEmpty(secondaryParentURL) && manifestEntry.isPatch)

@github-actions
Copy link

github-actions bot commented May 8, 2025

Qodana for .NET

33 new problems were found

Inspection name Severity Problems
Auto-property accessor is never used (non-private accessibility) 🔶 Warning 8
Possibly mistaken use of a 'CancellationToken' 🔶 Warning 7
Variable can be declared as non-nullable 🔶 Warning 6
Expression is always 'true' or 'false' according to nullable reference types' annotations 🔶 Warning 2
Conditional access qualifier expression is known to be null or not null 🔶 Warning 2
Unused local variable 🔶 Warning 2
Possible 'null' assignment to non-nullable entity 🔶 Warning 1
Duplicated statements 🔶 Warning 1
Non-accessed positional property (non-private accessibility) 🔶 Warning 1
Redundant nullable warning suppression expression 🔶 Warning 1
Redundant switch expression arms 🔶 Warning 1
Redundant using directive 🔶 Warning 1

☁️ View the detailed Qodana report

Detected 61 dependencies

Third-party software list

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

Dependency Version Licenses
CommunityToolkit.Common 8.4.0 MIT
CommunityToolkit.Mvvm 8.4.0 MIT
CommunityToolkit.WinUI.Animations 8.2.250402 MIT
CommunityToolkit.WinUI.Behaviors 8.2.250402 MIT
CommunityToolkit.WinUI.Controls.Primitives 8.2.250402 MIT
CommunityToolkit.WinUI.Controls.Sizers 8.2.250402 MIT
CommunityToolkit.WinUI.Converters 8.2.250402 MIT
CommunityToolkit.WinUI.Extensions 8.2.250402 MIT
CommunityToolkit.WinUI.Helpers 8.2.250402 MIT
CommunityToolkit.WinUI.Media 8.2.250402 MIT
CommunityToolkit.WinUI.Triggers 8.2.250402 MIT
Costura.Fody 6.0.0 MIT
DependencyPropertyGenerator 1.5.0 MIT
DotNet.ReproducibleBuilds 1.2.25 MIT
EventGenerator.Generator 0.13.1 MIT
Fody 6.9.2 MIT
GitInfo 3.5.0 MIT
Google.Protobuf.Tools 3.30.0 PROTOBUF
Google.Protobuf 3.30.0 BSD-3-Clause
Hi3Helper.ZstdNet 1.6.4 BSD-3-Clause
HtmlAgilityPack 1.12.1 MIT
Markdig.Signed 0.41.1 BSD-2-Clause
Microsoft.CSharp 4.7.0 MIT
Microsoft.Extensions.DependencyInjection.Abstractions 9.0.3 MIT
Microsoft.Extensions.DependencyInjection 9.0.3 MIT
Microsoft.Extensions.Logging.Abstractions 9.0.3 MIT
Microsoft.Extensions.Logging 9.0.3 MIT
Microsoft.Extensions.Options 9.0.3 MIT
Microsoft.Extensions.Primitives 9.0.3 MIT
Microsoft.NET.ILLink.Tasks 9.0.4 MIT
Microsoft.NETCore.Targets 6.0.0-preview.4.21253.7 MIT
Microsoft.Web.WebView2 1.0.3240.44 BSD-3-Clause
BSD-MYLEX
Microsoft.Win32.SystemEvents 9.0.3 MIT
Microsoft.Windows.CsWin32 0.3.183 Apache-2.0
Microsoft.Windows.CsWinRT 2.2.0 MIT
Microsoft.Windows.SDK.BuildTools 10.0.26100.3916 PROPRIETARY-LICENSE
Microsoft.Windows.SDK.Win32Docs 0.1.42-alpha PROPRIETARY-LICENSE
Microsoft.Windows.SDK.Win32Metadata 61.0.15-preview MIT
Microsoft.Windows.WDK.Win32Metadata 0.12.8-experimental MIT
Microsoft.WindowsAppSDK 1.8.250410001-experimental1 MIT
MS-DXSDK-D3DX-9.29.952.3
Microsoft.Xaml.Behaviors.WinUI.Managed 3.0.0 MIT
NuGet.Versioning 6.12.1 Apache-2.0
PhotoSauce.MagicScaler 0.15.0 MIT
PhotoSauce.NativeCodecs.Libwebp 1.4.0-preview1 MIT
Roman-Numerals 2.0.1 MIT
Sentry 5.6.0 MIT
SharpCompress 0.39.0 MIT
SharpHDiffPatch.Core 2.3.2 MIT
System.Buffers 4.6.0 MIT
System.Drawing.Common 9.0.3 MIT
System.IO.Hashing 9.0.3 MIT
System.IO.Hashing 9.0.4 MIT
System.Security.AccessControl 6.0.1 MIT
System.Security.Cryptography.ProtectedData 9.0.3 MIT
System.Text.Encoding.CodePages 9.0.3 MIT
System.Text.Json 9.0.3 MIT
System.Threading.Tasks.Extensions 4.5.4 MIT
TaskScheduler 2.12.1 MIT
ThisAssembly.Constants 2.0.6 MIT
Velopack 0.0.1053 MIT
ZstdSharp.Port 0.8.5 MIT
Contact Qodana team

Contact us at qodana-support@jetbrains.com

Copy link
Member

@bagusnl bagusnl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All is good, just a bit off-ed by the early global pragma but I think we can discuss that
But overall the code looks fine, pretty sure @copilot can fix the typos so its all fine

Good work!

@bagusnl
Copy link
Member

bagusnl commented May 9, 2025

Regarding FOSSA failing check:
image

@sonarqubecloud
Copy link

sonarqubecloud bot commented May 9, 2025

@neon-nyan neon-nyan merged commit c46c9ec into preview May 9, 2025
9 of 10 checks passed
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: Mirror/API Server Issue labeled for Mirror/API Server issue releated Bug Something isn't working Game: Genshin Impact Issue labeled for Genshin Impact Priority: High

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants