Skip to content

Commit 8ee9b3f

Browse files
authored
Preview 1.82.8 (#626)
# What's new? - 1.82.8 > We have just published our new landing page, which you can view in https://collapselauncher.com ! - **[Fix]** Game repair methods failing to check for plugin existence, by @bagusnl - This happened because string matching error between `/` and `\` - **[Fix]** ZZZ Repair failing due to unknown return code, by @bagusnl - is this even a fix? idk, I just ignored the return code LMAO - **[Fix]** AppUserModelID conflicting between ToastCOM and Velopack, by @neon-nyan - **[Imp]** Performance improvement for 7z extractor method, by @neon-nyan - **[Imp]** Performance improvement for any unmanaged calls by increasing buffer size, by @neon-nyan - **[Imp]** Avoid UI locking when loading Sophon metadata, by @neon-nyan - **[Imp]** Refactored Progress handler, by @neon-nyan - **[Fix]** Game File Cleanup freeze when trying to cleanup >1000 items, by @bagusnl & @neon-nyan - Use SelectAllSafe and UnselectAll to do as described - Improved speed when selecting all items by (from ~140000 ms to ~170ms) when selecting 25000 files. - Use .NET's built-in SIMD calculation for summing all the asset sizes - Use batching when injecting files to the ListViewTable source - **[Fix]** Cannot close the app from taskbar, by @shatyuka - **[Fix]** COMException when trying to install game with Sophon, by @bagusnl ### Templates <details> <summary>Changelog Prefixes</summary> ``` **[New]** **[Imp]** **[Fix]** **[Loc]** **[Doc]** ``` </details>
2 parents d8db1ea + ecf4586 commit 8ee9b3f

File tree

87 files changed

+1875
-1503
lines changed

Some content is hidden

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

87 files changed

+1875
-1503
lines changed

.editorconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,5 @@ dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
8080
dotnet_style_prefer_compound_assignment = true:suggestion
8181
dotnet_style_prefer_simplified_interpolation = true:suggestion
8282
dotnet_style_namespace_match_folder = true:suggestion
83+
84+
resharper_localizable_element_highlighting=hint

.github/workflows/build.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535

3636
steps:
3737
- name: Checkout
38-
uses: actions/checkout@v4.1.5
38+
uses: actions/checkout@v4
3939
with:
4040
submodules: recursive
4141

@@ -52,7 +52,7 @@ jobs:
5252
dotnet publish CollapseLauncher -c ${{matrix.Configuration}} -p:PublishProfile=Publish-DebugCIRelease -p:PublishDir=".\debug-build\"
5353
5454
- name: Upload Artifact
55-
uses: actions/upload-artifact@v4.3.1
55+
uses: actions/upload-artifact@v4
5656
with:
5757
name: collapse_${{ matrix.platform }}-${{ matrix.configuration }}_${{ matrix.framework }}_${{ github.sha }}
5858
path: ./CollapseLauncher/debug-build/
@@ -76,7 +76,7 @@ jobs:
7676

7777
steps:
7878
- name: Checkout
79-
uses: actions/checkout@v4.1.5
79+
uses: actions/checkout@v4
8080
with:
8181
submodules: recursive
8282

@@ -97,7 +97,7 @@ jobs:
9797
dotnet publish CollapseLauncher -c ${{matrix.Configuration}} -p:PublishProfile=Publish-DebugCIReleaseAOT -p:PublishDir=".\debug-aot-build\"
9898
9999
- name: Upload Artifact
100-
uses: actions/upload-artifact@v4.3.1
100+
uses: actions/upload-artifact@v4
101101
with:
102102
name: aot-experimental_collapse_${{ matrix.platform }}-${{ matrix.configuration }}_${{ matrix.framework }}_${{ github.sha }}
103103
path: ./CollapseLauncher/debug-aot-build/
@@ -109,7 +109,7 @@ jobs:
109109
needs: [build, build-nativeaot]
110110
steps:
111111
- name: Notify Discord
112-
uses: sarisia/actions-status-discord@v1.13.0
112+
uses: sarisia/actions-status-discord@v1.15.1
113113
if: always()
114114
continue-on-error: true
115115
with:

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

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,53 @@ on:
66

77
jobs:
88
qodana:
9-
runs-on: ubuntu-latest
9+
runs-on: windows-latest
10+
1011
permissions:
1112
actions: read
1213
contents: write
1314
pull-requests: write
1415
checks: write
1516
security-events: write
17+
18+
strategy:
19+
matrix:
20+
configuration: [Release] # No need to distribute Debug builds
21+
platform: [x64]
22+
framework: [net9.0-windows10.0.22621.0]
23+
24+
env:
25+
Configuration: ${{ matrix.configuration }}
26+
Platform: ${{ matrix.platform }}
27+
DOTNET_INSTALL_DIR: '.\.dotnet'
28+
DOTNET_VERSION: '9.x'
29+
DOTNET_QUALITY: 'ga'
30+
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
31+
1632
steps:
1733
# skip all the steps if the head repo is not the same as the main repo
1834
# https://github.com/orgs/community/discussions/26829#discussioncomment-3253575
19-
- uses: actions/checkout@v4.1.5
35+
- uses: actions/checkout@v4
2036
if: ${{ github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }}
2137
with:
2238
ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit
2339
fetch-depth: 0 # a full history is required for pull request analysis
2440
submodules: recursive # many many submodules
41+
42+
- name: Install .NET
43+
uses: actions/setup-dotnet@v4
44+
with:
45+
dotnet-version: ${{ env.DOTNET_VERSION }}
46+
dotnet-quality: ${{ env.DOTNET_QUALITY }}
47+
cache: true
48+
cache-dependency-path: CollapseLauncher/packages.lock.json
2549

2650
- name: 'Qodana Scan'
2751
if: ${{ github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }}
2852
uses: JetBrains/qodana-action@latest
53+
with:
54+
args: --ide,QDNET
55+
pr-mode: true
2956
env:
3057
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }} # read the steps about it below
3158

.github/workflows/qodana-scan.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
security-events: write
3333

3434
steps:
35-
- uses: actions/checkout@v4.1.5
35+
- uses: actions/checkout@v4
3636
with:
3737
ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit
3838
submodules: recursive # many many submodules
@@ -66,10 +66,11 @@ jobs:
6666
# qodana scan --ide QDNET-EAP -o ${{ runner.temp }}\qodana\results --cache-dir ${{ runner.temp }}\qodana\cache
6767

6868
- name: Qodana Scan
69-
uses: JetBrains/qodana-action@next
69+
uses: JetBrains/qodana-action@v2024.3.3
7070
continue-on-error: true
7171
with:
72-
args: --ide,QDNET-EAP
72+
args: --ide,QDNET
73+
pr-mode: false
7374
env:
7475
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
7576

CollapseLauncher/Classes/CachesManagement/Honkai/Check.cs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,11 @@ private async Task<List<CacheAsset>> Check(List<CacheAsset> assetIndex, Cancella
2020
List<CacheAsset> returnAsset = new List<CacheAsset>();
2121

2222
// Set Indetermined status as false
23-
_status!.IsProgressAllIndetermined = false;
23+
_status.IsProgressAllIndetermined = false;
2424

2525
// Show the asset entry panel
2626
_status.IsAssetEntryPanelShow = true;
2727

28-
// Reset stopwatch
29-
RestartStopwatch();
3028
try
3129
{
3230
// Create the cache directory if it doesn't exist
@@ -104,8 +102,8 @@ private async ValueTask CheckAsset(CacheAsset asset, List<CacheAsset> returnAsse
104102
{
105103
// Increment the count and update the status
106104
Interlocked.Add(ref _progressAllCountCurrent, 1);
107-
_status!.ActivityStatus = string.Format(Lang!._CachesPage!.CachesStatusChecking!, asset!.DataType, asset.N);
108-
_status!.ActivityAll = string.Format(Lang._CachesPage.CachesTotalStatusChecking!, _progressAllCountCurrent, _progressAllCountTotal);
105+
_status.ActivityStatus = string.Format(Lang!._CachesPage!.CachesStatusChecking!, asset!.DataType, asset.N);
106+
_status.ActivityAll = string.Format(Lang._CachesPage.CachesTotalStatusChecking!, _progressAllCountCurrent, _progressAllCountTotal);
109107

110108
// Assign the file info.
111109
FileInfo fileInfo = new FileInfo(asset.ConcatPath!);
@@ -148,7 +146,7 @@ private void AddGenericCheckAsset(CacheAsset asset, CacheAssetStatus assetStatus
148146
lock (this)
149147
{
150148
// Set Indetermined status as false
151-
_status!.IsProgressAllIndetermined = false;
149+
_status.IsProgressAllIndetermined = false;
152150
_progressAllCountFound++;
153151
_progressAllSizeFound += asset!.CS;
154152
}
@@ -172,9 +170,6 @@ private void AddGenericCheckAsset(CacheAsset asset, CacheAssetStatus assetStatus
172170
remoteCRC
173171
))
174172
);
175-
176-
// Update the progress and status
177-
UpdateProgressCRC();
178173
}
179174
}
180175
}

CollapseLauncher/Classes/CachesManagement/Honkai/Fetch.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ private async Task BuildGameRepoURL(DownloadClient downloadClient, CancellationT
119119
private async Task<(int, long)> FetchByType(CacheAssetType type, DownloadClient downloadClient, List<CacheAsset> assetIndex, CancellationToken token)
120120
{
121121
// Set total activity string as "Fetching Caches Type: <type>"
122-
_status!.ActivityStatus = string.Format(Lang!._CachesPage!.CachesStatusFetchingType!, type);
122+
_status.ActivityStatus = string.Format(Lang!._CachesPage!.CachesStatusFetchingType!, type);
123123
_status.IsProgressAllIndetermined = true;
124124
_status.IsIncludePerFileIndicator = false;
125125
UpdateStatus();
@@ -271,9 +271,9 @@ await Parallel.ForEachAsync(EnumerateCacheTextAsset(type, dataTextAsset.GetStrin
271271
if (content.DLM == 2)
272272
{
273273
// Update the status
274-
_status!.ActivityStatus = string.Format(Lang._CachesPage.Status2, type, content.N);
275-
_status!.IsProgressAllIndetermined = true;
276-
_status!.IsProgressPerFileIndetermined = true;
274+
_status.ActivityStatus = string.Format(Lang._CachesPage.Status2, type, content.N);
275+
_status.IsProgressAllIndetermined = true;
276+
_status.IsProgressPerFileIndetermined = true;
277277
UpdateStatus();
278278

279279
// Check for the URL availability and is not available, then skip.

CollapseLauncher/Classes/CachesManagement/Honkai/HonkaiCache.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,6 @@ public async Task StartUpdateRoutine(bool showInteractivePrompt = false)
7575

7676
private async Task<bool> UpdateRoutine()
7777
{
78-
// Restart stopwatch
79-
RestartStopwatch();
80-
8178
// Assign update task
8279
Task<bool> updateTask = Update(_updateAssetIndex, _assetIndex, _token!.Token);
8380

@@ -88,9 +85,9 @@ private async Task<bool> UpdateRoutine()
8885
ResetStatusAndProgress();
8986

9087
// Set as completed
91-
_status!.IsCompleted = true;
92-
_status!.IsCanceled = false;
93-
_status!.ActivityStatus = Lang!._CachesPage!.CachesStatusUpToDate;
88+
_status.IsCompleted = true;
89+
_status.IsCanceled = false;
90+
_status.ActivityStatus = Lang!._CachesPage!.CachesStatusUpToDate;
9491

9592
// Update status and progress
9693
UpdateAll();

CollapseLauncher/Classes/CachesManagement/Honkai/Update.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ private async Task<bool> Update(List<CacheAsset> updateAssetIndex, List<CacheAss
3232
try
3333
{
3434
// Set IsProgressAllIndetermined as false and update the status
35-
_status!.IsProgressAllIndetermined = true;
35+
_status.IsProgressAllIndetermined = true;
3636
UpdateStatus();
3737

3838
// Iterate the asset index and do update operation
@@ -121,7 +121,7 @@ private async Task UpdateCacheAsset((CacheAsset AssetIndex, IAssetProperty Asset
121121
{
122122
// Increment total count and update the status
123123
_progressAllCountCurrent++;
124-
_status!.ActivityStatus = string.Format(Lang!._Misc!.Downloading + " {0}: {1}", asset!.AssetIndex.DataType, asset.AssetIndex.N);
124+
_status.ActivityStatus = string.Format(Lang!._Misc!.Downloading + " {0}: {1}", asset!.AssetIndex.DataType, asset.AssetIndex.N);
125125
UpdateAll();
126126

127127
FileInfo fileInfo = new FileInfo(asset.AssetIndex.ConcatPath!)

CollapseLauncher/Classes/CachesManagement/StarRail/Check.cs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,11 @@ private async Task<List<SRAsset>> Check(List<SRAsset> assetIndex, CancellationTo
2020
List<SRAsset> returnAsset = new List<SRAsset>();
2121

2222
// Set Indetermined status as false
23-
_status!.IsProgressAllIndetermined = false;
23+
_status.IsProgressAllIndetermined = false;
2424

2525
// Show the asset entry panel
2626
_status.IsAssetEntryPanelShow = true;
2727

28-
// Reset stopwatch
29-
RestartStopwatch();
30-
3128
// Get persistent and streaming paths
3229
string execName = Path.GetFileNameWithoutExtension(_innerGameVersionManager!.GamePreset!.GameExecutableName);
3330
string baseDesignDataPathPersistent = Path.Combine(_gamePath!, @$"{execName}_Data\Persistent\DesignData\Windows");
@@ -77,7 +74,7 @@ private async ValueTask CheckAsset(SRAsset asset, List<SRAsset> returnAsset, str
7774
lock (this)
7875
{
7976
_progressAllCountCurrent++;
80-
_status!.ActivityStatus = string.Format(Lang!._CachesPage!.CachesStatusChecking!, asset!.AssetType, asset.LocalName);
77+
_status.ActivityStatus = string.Format(Lang!._CachesPage!.CachesStatusChecking!, asset!.AssetType, asset.LocalName);
8178
_status.ActivityAll = string.Format(Lang!._CachesPage!.CachesTotalStatusChecking!, _progressAllCountCurrent, _progressAllCountTotal);
8279
}
8380

@@ -122,7 +119,7 @@ private void AddGenericCheckAsset(SRAsset asset, CacheAssetStatus assetStatus, L
122119
lock (this)
123120
{
124121
// Set Indetermined status as false
125-
_status!.IsProgressAllIndetermined = false;
122+
_status.IsProgressAllIndetermined = false;
126123
_progressAllCountFound++;
127124
_progressAllSizeFound += asset!.Size;
128125
}
@@ -145,9 +142,6 @@ private void AddGenericCheckAsset(SRAsset asset, CacheAssetStatus assetStatus, L
145142
remoteCRC
146143
))
147144
);
148-
149-
// Update the progress and status
150-
UpdateProgressCRC();
151145
}
152146
}
153147
}

CollapseLauncher/Classes/CachesManagement/StarRail/Fetch.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ private async Task<List<SRAsset>> Fetch(CancellationToken token)
3636

3737
// Initialize metadata
3838
// Set total activity string as "Fetching Caches Type: Dispatcher"
39-
_status!.ActivityStatus = string.Format(Lang!._CachesPage!.CachesStatusFetchingType!, CacheAssetType.Dispatcher);
40-
_status!.IsProgressAllIndetermined = true;
41-
_status!.IsIncludePerFileIndicator = false;
39+
_status.ActivityStatus = string.Format(Lang!._CachesPage!.CachesStatusFetchingType!, CacheAssetType.Dispatcher);
40+
_status.IsProgressAllIndetermined = true;
41+
_status.IsIncludePerFileIndicator = false;
4242
UpdateStatus();
4343

4444
if (!await _innerGameVersionManager!.StarRailMetadataTool.Initialize(token, downloadClient, _httpClient_FetchAssetProgress, GetExistingGameRegionID(), Path.Combine(_gamePath!, $"{Path.GetFileNameWithoutExtension(_gameVersionManager!.GamePreset!.GameExecutableName)}_Data\\Persistent")))
@@ -78,9 +78,9 @@ await Parallel.ForEachAsync(Enum.GetValues<SRAssetType>(), token, async (type, i
7878
private async Task<(int, long)> FetchByType(DownloadClient downloadClient, DownloadProgressDelegate downloadProgress, SRAssetType type, List<SRAsset> assetIndex, CancellationToken token)
7979
{
8080
// Set total activity string as "Fetching Caches Type: <type>"
81-
_status!.ActivityStatus = string.Format(Lang!._CachesPage!.CachesStatusFetchingType!, type);
82-
_status!.IsProgressAllIndetermined = true;
83-
_status!.IsIncludePerFileIndicator = false;
81+
_status.ActivityStatus = string.Format(Lang!._CachesPage!.CachesStatusFetchingType!, type);
82+
_status.IsProgressAllIndetermined = true;
83+
_status.IsIncludePerFileIndicator = false;
8484
UpdateStatus();
8585

8686
// Start reading the metadata and build the asset index of each type

0 commit comments

Comments
 (0)