Skip to content

Commit 1690f2e

Browse files
authored
Preview - 1.83.9 (Codename: Luna) (#796)
![UpdateIsAvailable-Campaign](https://github.com/user-attachments/assets/5c5df62c-8570-4018-b6e7-66d5decf8278) ### Hi there, it's neon-nyan here~ It's been almost 3 weeks since the last preview update. To commemorate the upcoming Genshin Impact 6.0 (aka: Luna I) update, we have decided to use a new codename for this release as: "**Luna**" With this release, we are bringing a long-awaited feature, the Plugin System. This will catapult the development of Collapse to become not only an exclusively third-party launcher for HoYoverse/miHoYo titles, but also others in the future. Without further ado, let's get into details regarding this update! # What's New? ## [Plugin System for Other Non-miHoYo Titles Support](#752), by @neon-nyan 3 Months, 9000+ of lines changes later, we have finally finished the first iteration of Plugin System implementation. For now, only basic functionalities implemented into this plugin system as per the [v0.1-update1 API Standard](https://github.com/CollapseLauncher/Hi3Helper.Plugin.Core/tree/98ac5f08e48661f50f34b6d2bb2571fb9bd26730), including: - Game Installation - Game Update/Preload > Note: Other features like Game Repair, Game Caches and Game Settings are going to be implemented in the future. We are planning to make our own in-house plugins which will bring support to two games are expected to be finished once the Luna release releases to Stable: - **Heaven Burns Red** Developed and Maintained by: Collapse Project Team (@neon-nyan) Status: Completed - **Wuthering Waves** Developed and Maintained by: Collapse Project Team (@Cryotechnic) Status: Under Development This implementation took more time due to a NativeAOT implementation of the system. We are trying to make the plugin to not only works inside of our code, but also usable for any code/launchers implementation out there (if they want to). We are making the compiled plugin footprint as small as possible by removing any dependencies with .NET Reflections, stripping out .NET Runtime and implementing COM-Like interfaces to bridge the communication with plugins and the launcher, making the plugin compiled as a native library instead of a .NET standard library. With this, we are achieving 6-7 MB for the plugin library. The plugin can be managed by using the Plugin Manager menu under the App Settings. Here's how it works: [2025-09-14 21-51-48.webm](https://github.com/user-attachments/assets/0e972c82-c6d1-41ac-a2a4-b705b703d234) > **PS:** Plugin download for Heaven Burns Red will be available soon. Join our official Discord to get you hands on the early access~ 👀 ## Bring Back NativeAOT Build Due to .NET issues in [#104583](dotnet/runtime#104583), we are unable to ship NativeAOT build to preview. Fortunately, the latest .NET 9 Runtime comes with a fix and the UI hang issue has been fixed in most scenarios. Publishing a NativeAOT Build brings some benefits, including faster cold start-up time, slight improvements on overall code performance (which relies on frequent inline calls) and smaller compiled code. This demo shows an improvement to the cold start-up time while the launcher is launched. We took Stable v1.82.31 as a baseline to the comparison and as a result, old ILCompile build start-up finished in 916 milliseconds while NativeAOT build start-up finished in just 466 milliseconds. [ComparisonAOTvsNonAOT.webm](https://github.com/user-attachments/assets/5b659198-76c9-4f42-9836-6901e231da31) This also results in a much smaller build as most of the .NET runtime code are stripped. Here's the comparison of the build size between two builds (with debug symbols removed): <img width="731" height="515" alt="image" src="https://github.com/user-attachments/assets/5fb87181-7a00-4169-8903-874111024267" /> ## [Revamp Post-Download Behavior Settings](#777), by @gablm We have added few options on how the launcher will do after game installation/update. You can also set the Download Speed Limit while performing game installation or update. <img width="802" height="454" alt="image" src="https://github.com/user-attachments/assets/2df669e5-c44a-4d51-b3e7-a98f203f951d" /> ## Cached API Response for Application-wide Functions, by @neon-nyan Tired of waiting for the launcher to load up each of the regions? Now, you can make it faster. With the new HTTP Cache method, you can make game region loadings much faster (even almost immediate). Previously, this feature is only available for few functionality, including Game Repair and Cache Updates. Now, every API calls from the launcher can be cached so the launcher loads everything much-much faster. [2025-09-14 22-10-08.webm](https://github.com/user-attachments/assets/012d13cb-5bb9-4bf9-8fcf-d7ef43ddb8fa) # What's Changed? - **[Removed]** Taking out CODING from CDN Mirror list - **[Imp]** Recompile Static Libraries with MSVC for NativeAOT builds, by @neon-nyan - **[Imp]** Update .NET components NuGet to 9.0.9, by @bagusnl @neon-nyan - **[Imp]** Update WindowsAppSDK to 1.8-stable, by @neon-nyan - **[Imp]** [Improve DBHandler reliability and error handling](#791), by @bagusnl - Implements a retry mechanism with exponential backoff for database operations - Adds detailed logging for debugging and troubleshooting - Uses internal methods for querying and storing data to streamline error handling - Integrates with Sentry for exception reporting - Improves stream expiration handling - **[Imp]** Decouple Hashing Extensions from Collapse Launcher's Main Code, by @neon-nyan - **[Imp]** [Improve app-wide logger extensions](6acea34#commitcomment-164583504), by @neon-nyan - Remove memory allocation entirely by writing string directly to Win32 handles - Add asynchronous variant for the overloads - Add ``DefaultInterpolatedStringHandler`` overload for passing interpolated string. - **[Imp]** [Improve Sentry Logging](#795), by @bagusnl - Now the telemetry will upload only the last 100 lines from the log instead of sending everything to Sentry. This will reduce time and guarantee the log is successfully sent for analysis. - If multiple errors occurs, the exceptions will be queued and sent one-by-one. This avoid collisions between other reports being sent at the same time. - **[Imp]** Improve I/O Performance on Sophon submodule, by @neon-nyan - Use OS-level file caching - Limit FileStream handle's access and share parameter - Automatically increase FileStream's buffer depends on target file size - Move ``ChunkStream.CopyToAsync`` into Task.Factory and run it synchronously in the background - Increase maximum buffer size budget on patch mode from 4 MiB to 32 MiB - Allocate only a certain amount of buffer based on target data size (this to avoid buffer overprovision, causing memory and CPU usage spikes) - **[Fix/Imp]** Ignore assets that marked as "unused/deleted" on ZZZ Game Installation/Update and Game Repair, by @neon-nyan - **[Fix]** ``NotSupportedException`` error while performing Game Repair on Honkai Impact 3rd and Honkai: Star Rail, by @neon-nyan - **[Fix]** Legacy Sophon won't recognize already existed files while installing games from scratch, by @neon-nyan - **[Locale]** Update Localizations for vn_VN, es_ES/419, ja_JP, id_ID, zh_CN, by Localizers ❤
2 parents 73fb782 + 8263e50 commit 1690f2e

File tree

261 files changed

+154045
-5987
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

261 files changed

+154045
-5987
lines changed

.github/workflows/build.yml

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ on:
2525
- '**/packages.lock.json'
2626

2727
env:
28-
DOTNET_INSTALL_DIR: '.\.dotnet'
29-
DOTNET_VERSION: '9.0.3xx'
30-
DOTNET_QUALITY: 'ga'
3128
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
3229

3330
jobs:
@@ -49,6 +46,14 @@ jobs:
4946
with:
5047
submodules: recursive
5148

49+
- name: 'Preparing Environment Variables'
50+
if: ${{ github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }}
51+
run: |
52+
$env = Get-Content env.json | ConvertFrom-Json
53+
foreach ($prop in $env.PSObject.Properties) {
54+
echo "$($prop.Name)=$($prop.Value)" >> $env:GITHUB_ENV
55+
}
56+
5257
- name: Install .NET
5358
uses: actions/setup-dotnet@v4
5459
with:
@@ -62,14 +67,22 @@ jobs:
6267

6368
- name: Build
6469
run: |
65-
dotnet publish CollapseLauncher -c ${{matrix.Configuration}} -p:PublishProfile=Publish-DebugCIRelease -p:PublishDir=".\debug-build\"
70+
dotnet publish CollapseLauncher -c ${{matrix.Configuration}} -p:PublishProfile=Publish-DebugCIRelease -p:PublishDir=".\debug-build\" -p:PublishAot=false
6671
6772
- name: Upload Artifact
6873
uses: actions/upload-artifact@v4
6974
with:
7075
name: collapse_${{ matrix.platform }}-${{ matrix.configuration }}_${{ matrix.framework }}_${{ github.sha }}
7176
path: ./CollapseLauncher/debug-build/
7277
compression-level: 9
78+
79+
- name: Validate build for Preview
80+
run: |
81+
dotnet build CollapseLauncher -c Release --verbosity quiet --no-restore
82+
83+
- name: Validate build for Stable
84+
run: |
85+
dotnet build CollapseLauncher -c Publish --verbosity quiet --no-restore
7386
7487
build-nativeaot:
7588
runs-on: windows-latest
@@ -89,6 +102,14 @@ jobs:
89102
with:
90103
submodules: recursive
91104

105+
- name: 'Preparing Environment Variables'
106+
if: ${{ github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }}
107+
run: |
108+
$env = Get-Content env.json | ConvertFrom-Json
109+
foreach ($prop in $env.PSObject.Properties) {
110+
echo "$($prop.Name)=$($prop.Value)" >> $env:GITHUB_ENV
111+
}
112+
92113
- name: Install .NET
93114
uses: actions/setup-dotnet@v4
94115
with:

.github/workflows/dd-sca.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
on: [push]
2+
3+
name: Datadog Software Composition Analysis
4+
5+
jobs:
6+
software-composition-analysis:
7+
runs-on: ubuntu-latest
8+
name: Datadog SBOM Generation and Upload
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v4
12+
with:
13+
submodules: recursive
14+
15+
- name: Check imported libraries are secure and compliant
16+
id: datadog-software-composition-analysis
17+
uses: DataDog/datadog-sca-github-action@main
18+
with:
19+
dd_api_key: ${{ secrets.DD_API_KEY }}
20+
dd_app_key: ${{ secrets.DD_APP_KEY }}
21+
dd_site: ap1.datadoghq.com
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
on: [push]
2+
3+
name: Datadog Static Code Analysis
4+
5+
jobs:
6+
static-analysis:
7+
runs-on: ubuntu-latest
8+
name: Datadog Static Analyzer
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v4
12+
with:
13+
submodules: recursive
14+
15+
- name: Check code meets quality and security standards
16+
id: datadog-static-analysis
17+
uses: DataDog/datadog-static-analyzer-github-action@v1
18+
with:
19+
dd_api_key: ${{ secrets.DD_API_KEY }}
20+
dd_app_key: ${{ secrets.DD_APP_KEY }}
21+
dd_site: ap1.datadoghq.com
22+
secrets_enabled: false
23+
static_analysis_enabled: true
24+
cpu_count: 2

.github/workflows/qodana-scan-pr.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ jobs:
2828
env:
2929
Configuration: ${{ matrix.configuration }}
3030
Platform: ${{ matrix.platform }}
31-
DOTNET_INSTALL_DIR: '.\.dotnet'
32-
DOTNET_VERSION: '9.0.3xx'
33-
DOTNET_QUALITY: 'ga'
3431
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
3532

3633
steps:
@@ -42,6 +39,15 @@ jobs:
4239
ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit
4340
fetch-depth: 0 # a full history is required for pull request analysis
4441
submodules: recursive # many many submodules
42+
43+
- name: 'Preparing Environment Variables'
44+
if: ${{ github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }}
45+
run: |
46+
$env = Get-Content env.json | ConvertFrom-Json
47+
foreach ($prop in $env.PSObject.Properties) {
48+
echo "$($prop.Name)=$($prop.Value)" >> $env:GITHUB_ENV
49+
}
50+
4551
- name: Install .NET
4652
uses: actions/setup-dotnet@v4
4753
with:

.github/workflows/qodana-scan.yml

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,8 @@ jobs:
1919
env:
2020
Configuration: ${{ matrix.configuration }}
2121
Platform: ${{ matrix.platform }}
22-
DOTNET_INSTALL_DIR: '.\.dotnet'
23-
DOTNET_VERSION: '9.0.3xx'
24-
DOTNET_QUALITY: 'ga'
2522
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
23+
2624
permissions:
2725
actions: read
2826
contents: write
@@ -34,18 +32,15 @@ jobs:
3432
with:
3533
ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit
3634
submodules: recursive # many many submodules
37-
# - name: Install winget
38-
# uses: Cyberboss/install-winget@v1
39-
# - name: Install Qodana CLI
40-
# uses: crazy-max/ghaction-chocolatey@v3
41-
# with:
42-
# args: install qodana --pre --confirm
43-
44-
# - name: Verify Qodana
45-
# run: |
46-
# Import-Module "$env:ChocolateyInstall/helpers/chocolateyInstaller.psm1"
47-
# refreshenv
48-
# qodana --version
35+
36+
- name: 'Preparing Environment Variables'
37+
if: ${{ github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }}
38+
run: |
39+
$env = Get-Content env.json | ConvertFrom-Json
40+
foreach ($prop in $env.PSObject.Properties) {
41+
echo "$($prop.Name)=$($prop.Value)" >> $env:GITHUB_ENV
42+
}
43+
4944
- name: Install .NET
5045
uses: actions/setup-dotnet@v4
5146
with:

.github/workflows/release-signed.yml

Lines changed: 41 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,11 @@ on:
88
env:
99
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
1010
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
11-
DOTNET_INSTALL_DIR: '.\.dotnet'
12-
DOTNET_VERSION: '9.0.3xx'
13-
DOTNET_QUALITY: 'ga'
1411
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
15-
SIGNPATH_ARTIFACT_SLUG: 'initial' # change this to 'aot-release' when releasing with AOT or 'initial' for normal release
16-
BUILD_PROFILE_PREVIEW: 'Publish-PreviewRelease'
17-
BUILD_PROFILE_STABLE: 'Publish-StableRelease'
18-
BUILD_PROFILE_DEBUG: 'Publish-DebugCIRelease'
12+
SIGNPATH_ARTIFACT_SLUG: 'aot-release' # change this to 'aot-release' when releasing with AOT or 'initial' for normal release
13+
BUILD_PROFILE_PREVIEW: 'Publish-PreviewReleaseAOT'
14+
BUILD_PROFILE_STABLE: 'Publish-StableReleaseAOT'
15+
BUILD_PROFILE_DEBUG: 'Publish-DebugCIReleaseAOT'
1916

2017
# schedule:
2118
# - cron: '0 0 * * 0' # At 00:00 on Sunday
@@ -33,6 +30,7 @@ jobs:
3330
PUBLISH_PROFILE: ""
3431
SIGNING_POLICY_SLUG: ""
3532
VERSION: ""
33+
PRODUCT_VERSION: ""
3634
Platform: ${{ matrix.platform }}
3735
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
3836

@@ -51,8 +49,8 @@ jobs:
5149
echo "PUBLISH_PROFILE=${{ env.BUILD_PROFILE_STABLE }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
5250
echo "SIGNING_POLICY_SLUG=release-signing" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
5351
} elseif ($branch -eq "github-signpath-test") {
54-
echo "CONFIGURATION_STRATEGY=Debug" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
55-
echo "PUBLISH_PROFILE=${{ env.BUILD_PROFILE_DEBUG }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
52+
echo "CONFIGURATION_STRATEGY=Release" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
53+
echo "PUBLISH_PROFILE=${{ env.BUILD_PROFILE_PREVIEW }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
5654
echo "SIGNING_POLICY_SLUG=test-signing-ci" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
5755
} else {
5856
Write-Error "Unknown branch or input: $branch"
@@ -69,6 +67,14 @@ jobs:
6967
uses: actions/checkout@v4
7068
with:
7169
submodules: recursive
70+
71+
- name: 'Preparing Environment Variables'
72+
if: ${{ github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }}
73+
run: |
74+
$env = Get-Content env.json | ConvertFrom-Json
75+
foreach ($prop in $env.PSObject.Properties) {
76+
echo "$($prop.Name)=$($prop.Value)" >> $env:GITHUB_ENV
77+
}
7278
7379
- name: Install .NET
7480
uses: actions/setup-dotnet@v4
@@ -156,7 +162,9 @@ jobs:
156162
if ($signature.Status -ne "Valid") {
157163
echo "::error::Invalid signature on $($file.Name): $($signature.Status)"
158164
}
159-
echo "✓ $($file.Name): $($signature.SignerCertificate.Subject)"
165+
else {
166+
echo "::notice::✓ $($file.Name): $($signature.SignerCertificate.Subject)"
167+
}
160168
}
161169
162170
- name: Re-upload Signed Artifact to GitHub
@@ -187,6 +195,27 @@ jobs:
187195
apps: sentry-cli
188196

189197
- name: Upload Debug artifact to Sentry
198+
continue-on-error: true
199+
shell: pwsh
190200
run: |
191-
sentry-cli debug-files upload --org collapse --project collapse-launcher --include-sources '.\SignedArtifact\BuildArtifact-${{ env.VERSION }}'
192-
201+
sentry-cli debug-files upload --org collapse --project collapse-launcher --include-sources '${{ runner.temp }}\SignedArtifact\BuildArtifact-${{ env.VERSION }}'
202+
203+
- name: Set release version in Sentry
204+
shell: pwsh
205+
continue-on-error: true
206+
run: |
207+
$exePath = "${{ runner.temp }}\SignedArtifact\BuildArtifact-${{ env.VERSION }}\CollapseLauncher.exe"
208+
if (Test-Path $exePath) {
209+
$version = "CollapseLauncher@" + ([System.Diagnostics.FileVersionInfo]::GetVersionInfo("./CollapseLauncher.exe").ProductVersion)
210+
if ($version) {
211+
sentry-cli releases new --org collapse --project collapse-launcher $version
212+
sentry-cli releases set-commits --auto $version
213+
sentry-cli releases finalize $version
214+
}
215+
else {
216+
Write-Warning "No product version found in $exePath"
217+
}
218+
}
219+
else {
220+
Write-Error "File not found: $exePath"
221+
}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ packages/*
88
CollapseLauncher/Deps/*
99
CollapseLauncher/StaticLib/*.lib
1010
CollapseLauncher/StaticLib/**/*.lib
11+
CollapseLauncher/StaticLib/*.pdb
12+
CollapseLauncher/StaticLib/**/*.pdb
1113
CollapseLauncher/Invoker/*
1214
**/Generated Files/**
1315
*.psd

.gitmodules

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[submodule "Hi3Helper.Http"]
22
path = Hi3Helper.Http
3-
url = https://github.com/neon-nyan/Hi3Helper.Http
3+
url = https://github.com/CollapseLauncher/Hi3Helper.Http
44
[submodule "ColorThief"]
55
path = ColorThief
6-
url = https://github.com/neon-nyan/ColorThief
6+
url = https://github.com/CollapseLauncher/ColorThief
77
[submodule "Hi3Helper.EncTool"]
88
path = Hi3Helper.EncTool
99
url = https://github.com/CollapseLauncher/Hi3Helper.EncTool
@@ -28,3 +28,6 @@
2828
[submodule "Hi3Helper.Win32"]
2929
path = Hi3Helper.Win32
3030
url = https://github.com/CollapseLauncher/Hi3Helper.Win32
31+
[submodule "Hi3Helper.Plugin.Core"]
32+
path = Hi3Helper.Plugin.Core
33+
url = https://github.com/CollapseLauncher/Hi3Helper.Plugin.Core

.idea/.idea.CollapseLauncher/.idea/encodings.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/.idea.CollapseLauncher/.idea/vcs.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)