Skip to content

Commit 9c074be

Browse files
authored
Bring 1.83.x branch to main (#719)
# Features Spotlight: (so far) ## (2nd try) ~~NativeAOT Releases!~~ Postponed due to .NET/WinUI bug, Again! More native-app like speed in terms of start-up and other resource heavy operations (such as installation and repair). This is our 2nd try on shipping NativeAOT builds due to .NET issue back in SDK 9.0.0 causing random freeze/crashes. Let us know how you feel about Collapse performance and stability on this release! ## External DNS Support, by @neon-nyan Ability to set the DNS request to specific server just for the launcher. Supports plain DNS (UDP/53), DNS over HTTPS (DoH), and DNS over TLS (DoT). Includes 3 predefined DNS providers, Cloudflare (`$cloudflare`), Google (`$google`), and quad9 (`$quad9`). User can customize to use other DNS provider(s) and use multiple all at once as a fallback. ![image](https://github.com/user-attachments/assets/b40f065f-2220-4ccf-9a3d-fbd534f7be33) ## Search on App Settings, by @bagusnl & @neon-nyan Tired of scrolling all of our launcher MASSIVE tunable options? Us too! That's why we have implemented a way to search all the available settings by just typing it, then you can navigate by using arrows to get to the settings you want. Works in all of our supported locales! ![image](https://github.com/user-attachments/assets/f9d9f357-e9bf-4cfd-a733-9571c4b58348) ## Sophon Patch for Game Update Implementation, by @neon-nyan HoYo recently released what we called "Sophon Patch Mode" for game update. This method is different than the older "Sophon Chunk" as the patch method compares the entire file instead of replacing part of the file like in chunk method. This leads to Pre-download size reduction on Genshin Impact (EN+JP VO) from 15.97 GB with Sophon Chunk to 5.92 GB (almost a third of the size). Pretty good work on HoYo side, but we observed only a few of HoYoplay users have them. With our implementation, everyone can use them! (As long as it's provided in the game's update data from HoYo). You can also disable them the same way as you disable the Sophon Chunk method. [TODO: Image] # Other changes: - **[New]** Kill other instance that doesn't have window, by @bagusnl - **[Imp]** Improved WebView panel backend, by @bagusnl - Immediately dispose and release all related resources on panel close. - Ensures WebView instance is available before the UI is displayed and interactable. - **[Imp]** Move our release CI to GitHub action, by @bagusnl - Everyone can now monitor all of our release easily by opening the [Action tab](https://github.com/CollapseLauncher/Collapse/actions/workflows/release-signed.yml). You can also verify all the binaries were coming from the build as we upload both the unsigned and the signed build in the artifacts of the run. - The move from AppVeyor to GitHub is due to annoying fact that AppVeyor has a very long initialization time before the CI is even run, and also with separate config that we can only test when putting up a release meaning everytime the CI breaks especially on an emergency release, it is quite a feat to fix in terms of how much time it takes for both waiting and fixing it, also the sanity of the CI maintainer due to [how annoying the CI config looks](https://github.com/CollapseLauncher/Collapse/blob/1.83.x-staging/Backup/unused-app-veyor.yml)/ - By moving to GitHub Actions, we can monitor the CI availability as its the same commands that gets run every time we push a commit. So, when it breaks, we know before any release and can fix it easily. - **[Fix]** Increase DiscordRPC connection issue wait time to 5s, by @bagusnl - Decrease the spam when RPC can't connect with the server, usually when Discord is not yet loaded. - **[Fix]** Implemented the new hashing and repair method for Hi3 v8.2, by @neon-nyan - They now use MMH64B and it should now be fully implemented in Collapse. - Let us know if you have any issue with it! ### Templates <details> <summary>Changelog Prefixes</summary> ``` **[New]** **[Imp]** **[Fix]** **[Loc]** **[Doc]** ``` </details>
2 parents d1ae3bf + 11035b9 commit 9c074be

File tree

205 files changed

+7561
-3717
lines changed

Some content is hidden

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

205 files changed

+7561
-3717
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
push:
88
branches:
99
- 'main'
10+
- '1.83.x-staging'
1011
paths-ignore:
1112
- '**.md'
1213
- 'Hi3Helper.Core/Lang/**.json'
@@ -22,8 +23,6 @@ on:
2223
- 'Hi3Helper.Core/Lang/**.json'
2324
- 'Docs/**'
2425
- '**/packages.lock.json'
25-
# schedule:
26-
# - cron: '0 0 * * 0' # At 00:00 on Sunday
2726

2827
env:
2928
DOTNET_INSTALL_DIR: '.\.dotnet'
@@ -33,13 +32,12 @@ env:
3332

3433
jobs:
3534
build:
36-
# runs-on: [self-hosted, linux]
3735
runs-on: windows-latest
3836
strategy:
3937
matrix:
4038
configuration: [Debug] # No need to distribute Debug builds
4139
platform: [x64]
42-
framework: [net9.0-windows10.0.22621.0]
40+
framework: [net9.0-windows10.0.26100.0]
4341

4442
env:
4543
Configuration: ${{ matrix.configuration }}
@@ -79,7 +77,7 @@ jobs:
7977
matrix:
8078
configuration: [Debug]
8179
platform: [x64]
82-
framework: [net9.0-windows10.0.22621.0]
80+
framework: [net9.0-windows10.0.26100.0]
8381

8482
env:
8583
Configuration: ${{ matrix.configuration }}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
matrix:
2525
configuration: [Release] # No need to distribute Debug builds
2626
platform: [x64]
27-
framework: [net9.0-windows10.0.22621.0]
27+
framework: [net9.0-windows10.0.26100.0]
2828
env:
2929
Configuration: ${{ matrix.configuration }}
3030
Platform: ${{ matrix.platform }}

.github/workflows/qodana-scan.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
matrix:
1616
configuration: [Release] # No need to distribute Debug builds
1717
platform: [x64]
18-
framework: [net9.0-windows10.0.22621.0]
18+
framework: [net9.0-windows10.0.26100.0]
1919
env:
2020
Configuration: ${{ matrix.configuration }}
2121
Platform: ${{ matrix.platform }}
@@ -59,7 +59,7 @@ jobs:
5959
# refreshenv
6060
# qodana scan --ide QDNET-EAP -o ${{ runner.temp }}\qodana\results --cache-dir ${{ runner.temp }}\qodana\cache
6161
- name: Qodana Scan
62-
uses: JetBrains/qodana-action@v2024.3.3
62+
uses: JetBrains/qodana-action@main
6363
continue-on-error: true
6464
with:
6565
args: --ide,QDNET

.github/workflows/release-signed.yml

Lines changed: 82 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,18 @@ name: Publish Signed Builds
44

55
on:
66
workflow_dispatch:
7-
inputs:
8-
branch:
9-
description: 'Specify branch name (preview/stable/github-signpath-test)'
10-
required: true
11-
default: 'github-signpath-test'
127

138
env:
149
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
1510
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
1611
DOTNET_INSTALL_DIR: '.\.dotnet'
17-
DOTNET_VERSION: '9.x'
12+
DOTNET_VERSION: '9.0.2xx'
1813
DOTNET_QUALITY: 'ga'
1914
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
20-
SIGNPATH_ARTIFACT_SLUG: 'initial' # change this to 'aot-release' when releasing with AOT
15+
SIGNPATH_ARTIFACT_SLUG: 'aot-release' # change this to 'aot-release' when releasing with AOT or 'initial' for normal release
16+
BUILD_PROFILE_PREVIEW: 'Publish-PreviewReleaseAOT'
17+
BUILD_PROFILE_STABLE: 'Publish-StableReleaseAOT'
18+
BUILD_PROFILE_DEBUG: 'Publish-DebugCIReleaseAOT'
2119

2220
# schedule:
2321
# - cron: '0 0 * * 0' # At 00:00 on Sunday
@@ -28,48 +26,44 @@ jobs:
2826
strategy:
2927
matrix:
3028
platform: [x64]
31-
framework: [net9.0-windows10.0.22621.0]
29+
framework: [net9.0-windows10.0.26100.0]
3230

3331
env:
3432
CONFIGURATION_STRATEGY: ""
3533
PUBLISH_PROFILE: ""
3634
SIGNING_POLICY_SLUG: ""
3735
VERSION: ""
3836
Platform: ${{ matrix.platform }}
39-
37+
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
4038

4139
steps:
4240
- name: Set Configuration and Environment Variables
4341
id: set_env
4442
run: |
45-
if ($env:GITHUB_EVENT_NAME -eq "workflow_dispatch") {
46-
$branch = $env:GITHUB_EVENT_INPUTS_BRANCH
47-
} else {
48-
$branch = $env:GITHUB_REF_NAME
49-
}
43+
$branch = $env:GITHUB_REF_NAME
5044
5145
if ($branch -eq "preview") {
5246
echo "CONFIGURATION_STRATEGY=Release" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
53-
echo "PUBLISH_PROFILE=Publish-PreviewRelease" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
47+
echo "PUBLISH_PROFILE=${{ env.BUILD_PROFILE_PREVIEW }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
5448
echo "SIGNING_POLICY_SLUG=release-signing" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
5549
} elseif ($branch -eq "stable") {
5650
echo "CONFIGURATION_STRATEGY=Publish" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
57-
echo "PUBLISH_PROFILE=Publish-StableRelease" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
51+
echo "PUBLISH_PROFILE=${{ env.BUILD_PROFILE_STABLE }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
5852
echo "SIGNING_POLICY_SLUG=release-signing" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
5953
} elseif ($branch -eq "github-signpath-test") {
6054
echo "CONFIGURATION_STRATEGY=Debug" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
61-
echo "PUBLISH_PROFILE=Publish-DebugCIRelease" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
62-
echo "SIGNING_POLICY_SLUG=test-signing" | 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
56+
echo "SIGNING_POLICY_SLUG=test-signing-ci" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
6357
} else {
6458
Write-Error "Unknown branch or input: $branch"
6559
exit 1
6660
}
6761
6862
- name: Print env
6963
run: |
70-
echo Configuration Strategy: $env:CONFIGURATION_STRATEGY
71-
echo Publish Profile: $env:PUBLISH_PROFILE
72-
echo Signing Policy: $env:SIGNING_POLICY_SLUG
64+
echo "::notice::Configuration Strategy: $env:CONFIGURATION_STRATEGY"
65+
echo "::notice::Publish Profile: $env:PUBLISH_PROFILE"
66+
echo "::notice::Signing Policy: $env:SIGNING_POLICY_SLUG"
7367
7468
- name: Checkout
7569
uses: actions/checkout@v4
@@ -86,13 +80,20 @@ jobs:
8680

8781
- name: Build
8882
run: |
83+
dotnet workload update
8984
dotnet publish CollapseLauncher -c ${{ env.CONFIGURATION_STRATEGY }} -p:PublishProfile=${{ env.PUBLISH_PROFILE }} -p:PublishDir=".\build\"
9085
9186
- name: Prepare publish artifacts
9287
run: |
88+
cd CollapseLauncher
9389
.\build\CollapseLauncher.exe generatevelopackmetadata
94-
$version = ((Get-Item .\build\CollapseLauncher.exe).VersionInfo.FileVersion).TrimEnd(".0")
95-
echo Build version: $version
90+
91+
$version = ((Get-Item .\build\CollapseLauncher.exe).VersionInfo.FileVersion)
92+
if ($version.EndsWith(".0")) {
93+
$version = $version.Substring(0, $version.Length - 2)
94+
}
95+
96+
echo "::notice::Build version: $version"
9697
echo "VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
9798
mkdir SignArtifact
9899
mkdir SignArtifact\BuildArtifact-$version
@@ -102,10 +103,26 @@ jobs:
102103
id: upload-unsigned-artifact
103104
uses: actions/upload-artifact@v4
104105
with:
105-
name: collapse_${{ env.SIGNING_POLICY_SLUG }}-${{ env.CONFIGURATION_STRATEGY }}_${{ env.PUBLISH_PROFILE }}
106+
name: collapse-v${{ env.VERSION }}_${{ env.SIGNING_POLICY_SLUG }}-${{ env.CONFIGURATION_STRATEGY }}_${{ env.PUBLISH_PROFILE }}
106107
path: ./CollapseLauncher/SignArtifact
107108
compression-level: 9
108109

110+
- name: Notify Discord for pending build
111+
uses: sarisia/[email protected]
112+
if: always()
113+
continue-on-error: true
114+
with:
115+
webhook: ${{ secrets.DISCORD_WEBHOOK_CIRELEASENOTIFIER }}
116+
title: Collapse Launcher Release CI build is PENDING!
117+
nofail: true
118+
color: 0xFF0000
119+
url: https://github.com/CollapseLauncher/Collapse/actions/runs/${{ github.run_id }}
120+
description: |
121+
Commit `${{ github.sha }}` by ${{ github.actor }} in branch `${{ github.ref_name }}`
122+
Version: ${{ env.VERSION }}
123+
[Click here to view the run](https://github.com/CollapseLauncher/Collapse/actions/runs/${{ github.run_id }})
124+
For core maintainers, go to SignPath to sign the build!
125+
109126
- name: Sign Build Artifact with SignPath
110127
uses: signpath/[email protected]
111128
with:
@@ -116,33 +133,59 @@ jobs:
116133
github-artifact-id: '${{ steps.upload-unsigned-artifact.outputs.artifact-id }}'
117134
wait-for-completion: true
118135
output-artifact-directory: '/SignedArtifact/'
136+
artifact-configuration-slug: ${{ env.SIGNPATH_ARTIFACT_SLUG}}
119137

120138
- name: Process Signed Build
121139
run: |
122-
$buildDir = '\SignedArtifact\BuildArtifact-${{ env.VERSION }}'
123-
echo Re-checking build version
124-
echo ((Get-Item $buildDir\CollapseLauncher.exe).VersionInfo.FileVersion).TrimEnd(".0")
140+
$buildDir = '.\SignedArtifact\BuildArtifact-${{ env.VERSION }}'
141+
echo "Re-checking build version"
142+
$versionFinal = ((Get-Item $buildDir\CollapseLauncher.exe).VersionInfo.FileVersion)
143+
if ($versionFinal.EndsWith(".0")) {
144+
$versionFinal = $versionFinal.Substring(0, $versionFinal.Length - 2)
145+
}
146+
echo "::notice::Final build version: $versionFinal"
147+
echo "VERSION=$versionFinal" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
148+
149+
- name: Verify Signed Artifacts
150+
run: |
151+
$buildDir = '.\SignedArtifact\BuildArtifact-${{ env.VERSION }}'
152+
$files = Get-ChildItem -Path "$buildDir" -Recurse -Include "*.exe","*.dll"
153+
foreach ($file in $files) {
154+
$signature = Get-AuthenticodeSignature $file.FullName
155+
if ($signature.Status -ne "Valid") {
156+
echo "::error::Invalid signature on $($file.Name): $($signature.Status)"
157+
}
158+
echo "✓ $($file.Name): $($signature.SignerCertificate.Subject)"
159+
}
125160
126161
- name: Re-upload Signed Artifact to GitHub
127162
uses: actions/upload-artifact@v4
128163
with:
129-
name: (SIGNED)collapse_${{ env.SIGNING_POLICY_SLUG }}-${{ env.CONFIGURATION_STRATEGY }}_${{ env.PUBLISH_PROFILE }}
130-
path: /SignedArtifact
164+
name: SIGNED_collapse-v${{ env.VERSION }}_${{ env.SIGNING_POLICY_SLUG }}-${{ env.CONFIGURATION_STRATEGY }}_${{ env.PUBLISH_PROFILE }}
165+
path: ./SignedArtifact
131166
compression-level: 9
132167

133-
notify-discord:
134-
runs-on: ubuntu-latest
135-
if: always()
136-
needs: [build]
137-
steps:
138-
- name: Notify Discord
139-
uses: sarisia/[email protected]
168+
- name: Final Notify Discord
169+
uses: sarisia/[email protected]
140170
if: always()
141171
continue-on-error: true
142172
with:
143-
webhook: ${{ secrets.DISCORD_WEBHOOK_NIGHTLY }}
144-
title: Collapse Launcher CI build is complete!
173+
webhook: ${{ secrets.DISCORD_WEBHOOK_CIRELEASENOTIFIER }}
174+
title: Collapse Launcher Release CI build is complete!
145175
status: ${{ job.status }}
176+
nofail: true
177+
url: https://github.com/CollapseLauncher/Collapse/actions/runs/${{ github.run_id }}
146178
description: |
147-
Commit `${{ github.sha }}` by ${{ github.actor }}
179+
Commit `${{ github.sha }}` by ${{ github.actor }} in branch `${{ github.ref_name }}`
148180
Click [here](https://nightly.link/CollapseLauncher/Collapse/actions/runs/${{ github.run_id }}) to download!
181+
182+
- name: Install Sentry CLI
183+
uses: MinoruSekine/[email protected]
184+
with:
185+
buckets: extras
186+
apps: sentry-cli
187+
188+
- name: Upload Debug artifact to Sentry
189+
run: |
190+
sentry-cli debug-files upload --org collapse --project collapse-launcher --include-sources '.\SignedArtifact\BuildArtifact-${{ env.VERSION }}'
191+

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

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

.idea/.idea.CollapseLauncher/.idea/projectSettingsUpdater.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)