Skip to content

Commit cc38f6e

Browse files
authored
Preview 1.82.12 Emergency Hotfix (#654)
# What's new ? - 1.82.12 - **[Fix]** Failure when installing sophon, by @neon-nyan - neon forgor to put the variable into the right line - **[Fix]** Disk space recognition when resuming game install with sophon, by @neon-nyan - neon forgor to return the right value - **[Fix]** Game update with sophon failing if its updating from a version that is too old, by @neon-nyan - neon too eepy and forgor to check if the manifest exist for those older game version - if the game is too old then fallback to use install method and replace any assets that is not matching with the target version. - **[Fix]** `EnumFailedVersion` errors when installing games and (super rarely) in early launch, by @bagusnl - **[Imp]** Use Attachment instead of breadcrumbs for LoadedModules reporting in Sentry, by @bagusnl ### Templates <details> <summary>Changelog Prefixes</summary> ``` **[New]** **[Imp]** **[Fix]** **[Loc]** **[Doc]** ``` </details>
2 parents 2da36be + f639903 commit cc38f6e

File tree

9 files changed

+231
-96
lines changed

9 files changed

+231
-96
lines changed

CollapseLauncher/Classes/InstallManagement/BaseClass/InstallManagerBase.Sophon.cs

Lines changed: 170 additions & 64 deletions
Large diffs are not rendered by default.

CollapseLauncher/Classes/InstallManagement/BaseClass/InstallManagerBase.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ protected virtual async ValueTask StartDeltaPatchPreReqDownload(List<GameInstall
486486
_progressAllCountCurrent = 1;
487487

488488
// Start the verification routine
489-
foreach (GameInstallPackage asset in gamePackage)
489+
foreach (GameInstallPackage asset in gamePackage.ToList())
490490
{
491491
switch (await RunPackageVerificationRoutine(asset, _token!.Token))
492492
{
@@ -677,7 +677,7 @@ public virtual async ValueTask<int> StartPackageVerification(List<GameInstallPac
677677
_status.IsProgressAllIndetermined = false;
678678

679679
// Iterate the asset
680-
foreach (GameInstallPackage asset in gamePackage)
680+
foreach (GameInstallPackage asset in gamePackage.ToList())
681681
{
682682
int returnCode;
683683

@@ -854,7 +854,7 @@ protected virtual async Task StartPackageInstallationInner(List<GameInstallPacka
854854
TryRemoveRedundantHDiffList();
855855

856856
// Enumerate the installation package
857-
foreach (GameInstallPackage asset in gamePackage)
857+
foreach (GameInstallPackage asset in gamePackage.ToList())
858858
{
859859
// Update the status
860860
_status.ActivityStatus =
@@ -2804,7 +2804,7 @@ protected virtual async ValueTask AddMainResourceVersionList(RegionResourceVersi
28042804
// Write to log if the package has segments (Example: Genshin Impact)
28052805
if (package.Segments != null)
28062806
{
2807-
foreach (GameInstallPackage segment in package.Segments)
2807+
foreach (GameInstallPackage segment in package.Segments.ToList())
28082808
{
28092809
LogWriteLine($"Adding segmented package: {segment.Name} to the list (Hash: {segment.HashString})",
28102810
LogType.Default, true);
@@ -2964,7 +2964,7 @@ private async ValueTask InvokePackageDownloadRoutine(DownloadClient do
29642964
try
29652965
{
29662966
// Iterate the package list
2967-
foreach (GameInstallPackage package in packageList)
2967+
foreach (GameInstallPackage package in packageList.ToList())
29682968
{
29692969
// If the package is segmented, then iterate and run the routine for segmented packages
29702970
if (package.Segments != null)

CollapseLauncher/CollapseLauncher.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<Authors>$(Company). neon-nyan, Cry0, bagusnl, shatyuka, gablm.</Authors>
1717
<Copyright>Copyright 2022-2024 $(Company)</Copyright>
1818
<!-- Versioning -->
19-
<Version>1.82.11</Version>
19+
<Version>1.82.12</Version>
2020
<LangVersion>preview</LangVersion>
2121
<!-- Target Settings -->
2222
<Platforms>x64</Platforms>

CollapseLauncher/XAMLs/MainApp/MainPage.xaml.cs

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -301,9 +301,8 @@ private RectInt32[] DragAreaMode_Normal
301301
get
302302
{
303303
double scaleFactor = WindowUtility.CurrentWindowMonitorScaleFactor;
304-
RectInt32[] rect = new RectInt32[2]
304+
RectInt32[] rect = new[]
305305
{
306-
307306
new RectInt32((int)(TitleBarDrag1.ActualOffset.X * scaleFactor),
308307
0,
309308
(int)(TitleBarDrag1.ActualWidth * scaleFactor),
@@ -324,7 +323,7 @@ private RectInt32[] DragAreaMode_Full
324323
Rect currentWindowPos = WindowUtility.CurrentWindowPosition;
325324
double scaleFactor = WindowUtility.CurrentWindowMonitorScaleFactor;
326325

327-
RectInt32[] rect = new RectInt32[1]
326+
RectInt32[] rect = new[]
328327
{
329328
new RectInt32(0,
330329
0,
@@ -364,7 +363,7 @@ private void ChangeTitleDragAreaInvoker_TitleBarEvent(object sender, ChangeTitle
364363
switch (e.Template)
365364
{
366365
case DragAreaTemplate.None:
367-
nonClientInputSrc.SetRegionRects(NonClientRegionKind.Passthrough, new RectInt32[]
366+
nonClientInputSrc.SetRegionRects(NonClientRegionKind.Passthrough, new[]
368367
{
369368
GetElementPos((WindowUtility.CurrentWindow as MainWindow)?.AppTitleBar)
370369
});
@@ -374,7 +373,7 @@ private void ChangeTitleDragAreaInvoker_TitleBarEvent(object sender, ChangeTitle
374373
break;
375374
case DragAreaTemplate.Default:
376375
nonClientInputSrc.ClearAllRegionRects();
377-
nonClientInputSrc.SetRegionRects(NonClientRegionKind.Passthrough, new RectInt32[]
376+
nonClientInputSrc.SetRegionRects(NonClientRegionKind.Passthrough, new[]
378377
{
379378
GetElementPos(GridBG_RegionGrid),
380379
GetElementPos(GridBG_IconGrid),
@@ -815,7 +814,7 @@ private async Task SpawnPushAppNotification()
815814
{
816815
TypedEventHandler<InfoBar, object> ClickCloseAction;
817816
if (NotificationData?.AppPush == null) return;
818-
foreach (NotificationProp Entry in NotificationData.AppPush)
817+
foreach (NotificationProp Entry in NotificationData.AppPush.ToList())
819818
{
820819
// Check for Close Action for certain MsgIds
821820
switch (Entry.MsgId)
@@ -926,25 +925,36 @@ private void SpawnAppUpdatedNotification()
926925

927926
// Create notification
928927
NotificationContent toastContent = NotificationContent.Create()
929-
.SetTitle(Lang._NotificationToast.LauncherUpdated_NotifTitle)
930-
.SetContent(
931-
string.Format(Lang._NotificationToast.LauncherUpdated_NotifSubtitle,
932-
VerString + (IsPreview ? "-preview" : ""),
933-
Lang._SettingsPage.PageTitle,
934-
Lang._SettingsPage.Update_SeeChangelog)
935-
)
936-
.AddAppHeroImagePath(heroImage);
928+
.SetTitle(Lang._NotificationToast
929+
.LauncherUpdated_NotifTitle)
930+
.SetContent(
931+
string
932+
.Format(Lang._NotificationToast.LauncherUpdated_NotifSubtitle,
933+
VerString + (IsPreview
934+
? "-preview"
935+
: ""),
936+
Lang._SettingsPage
937+
.PageTitle,
938+
Lang._SettingsPage
939+
.Update_SeeChangelog)
940+
)
941+
.AddAppHeroImagePath(heroImage);
937942

938943
// Get notification service
939944
Windows.UI.Notifications.ToastNotification notificationService =
940-
WindowUtility.CurrentToastNotificationService?.CreateToastNotification(toastContent);
945+
WindowUtility.CurrentToastNotificationService.CreateToastNotification(toastContent);
941946

942947
// Spawn notification service
943948
Windows.UI.Notifications.ToastNotifier notifier =
944-
WindowUtility.CurrentToastNotificationService?.CreateToastNotifier();
949+
WindowUtility.CurrentToastNotificationService.CreateToastNotifier();
945950
notifier.Show(notificationService);
946951
}
947-
catch { }
952+
catch (Exception ex)
953+
{
954+
LogWriteLine($"[SpawnAppUpdatedNotification] Failed to spawn toast notification!\r\n{ex}",
955+
LogType.Error, true);
956+
SentryHelper.ExceptionHandler(ex);
957+
}
948958
}
949959
}
950960
catch
@@ -1950,7 +1960,7 @@ private void RestoreCurrentRegion()
19501960
List<string>? gameNameCollection = LauncherMetadataHelper.GetGameNameCollection();
19511961
_ = LauncherMetadataHelper.GetGameRegionCollection(gameName);
19521962

1953-
var indexCategory = gameNameCollection?.IndexOf(gameName!) ?? -1;
1963+
var indexCategory = gameNameCollection?.IndexOf(gameName) ?? -1;
19541964
if (indexCategory < 0) indexCategory = 0;
19551965

19561966
var indexRegion = LauncherMetadataHelper.GetPreviousGameRegion(gameName);

Hi3Helper.Core/Classes/SentryHelper/SentryHelper.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
using System.Collections.Concurrent;
1010
using System.Collections.Generic;
1111
using System.Diagnostics;
12+
using System.IO;
1213
using System.Linq;
14+
using System.Text;
1315
using System.Text.RegularExpressions;
1416

1517
// ReSharper disable UnusedAutoPropertyAccessor.Global
@@ -483,8 +485,11 @@ private static Task ExceptionHandlerInner(Exception ex, ExceptionType exT = Exce
483485
}
484486
});
485487

486-
SentrySdk.AddBreadcrumb("Loaded Modules", "AppInfo",
487-
"system.module", modulesInfo.ToDictionary());
488+
var sbModulesInfo = new StringBuilder();
489+
foreach (var (key, value) in modulesInfo)
490+
{
491+
sbModulesInfo.AppendLine($"{key}: {value}");
492+
}
488493

489494
ex.Data[Mechanism.HandledKey] ??= exT == ExceptionType.Handled;
490495

@@ -513,6 +518,9 @@ private static Task ExceptionHandlerInner(Exception ex, ExceptionType exT = Exce
513518
SentrySdk.CaptureException(ex, s =>
514519
{
515520
s.AddAttachment(LoggerBase.LogPath, AttachmentType.Default, "text/plain");
521+
s.AddAttachment(new MemoryStream(Encoding.UTF8.GetBytes(sbModulesInfo.ToString())),
522+
"LoadedModules.txt", AttachmentType.Default,
523+
"text/plain");
516524
});
517525
}
518526
else

Hi3Helper.Core/Lang/Locale/LangDialogs.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,11 @@ public sealed partial class LangDialogs
177177

178178
public string DbGenerateUid_Title { get; set; } = LangFallback?._Dialogs.DbGenerateUid_Title;
179179
public string DbGenerateUid_Content { get; set; } = LangFallback?._Dialogs.DbGenerateUid_Content;
180+
public string SophonIncrementUpdateUnavailTitle { get; set; } = LangFallback?._Dialogs.SophonIncrementUpdateUnavailTitle;
181+
public string SophonIncrementUpdateUnavailSubtitle1 { get; set; } = LangFallback?._Dialogs.SophonIncrementUpdateUnavailSubtitle1;
182+
public string SophonIncrementUpdateUnavailSubtitle2 { get; set; } = LangFallback?._Dialogs.SophonIncrementUpdateUnavailSubtitle2;
183+
public string SophonIncrementUpdateUnavailSubtitle3 { get; set; } = LangFallback?._Dialogs.SophonIncrementUpdateUnavailSubtitle3;
184+
public string SophonIncrementUpdateUnavailSubtitle4 { get; set; } = LangFallback?._Dialogs.SophonIncrementUpdateUnavailSubtitle4;
180185
}
181186
}
182187
#endregion

Hi3Helper.Core/Lang/en_US.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -995,7 +995,13 @@
995995
"CloseOverlay": "Close Overlay",
996996

997997
"DbGenerateUid_Title": "Are you sure you wish to change your user ID?",
998-
"DbGenerateUid_Content": "Changing the current user ID will cause the associated data to be lost if you lose it."
998+
"DbGenerateUid_Content": "Changing the current user ID will cause the associated data to be lost if you lose it.",
999+
1000+
"SophonIncrementUpdateUnavailTitle": "Incremental Update is Unavailable: Version is Too Obsolete!",
1001+
"SophonIncrementUpdateUnavailSubtitle1": "Your game version: {0}",
1002+
"SophonIncrementUpdateUnavailSubtitle2": " is too obsolete",
1003+
"SophonIncrementUpdateUnavailSubtitle3": " and incremental update for your version is not available. However, you could still update your game by re-downloading the entire thing from scratch.",
1004+
"SophonIncrementUpdateUnavailSubtitle4": "Click \"{0}\" to continue updating the entire thing or click \"{1}\" to cancel the process"
9991005
},
10001006

10011007
"_FileMigrationProcess": {

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,11 +229,11 @@ Not only that, this launcher also has some advanced features for **Genshin Impac
229229
> > Please keep in mind that the Game Conversion feature is currently only available for Honkai Impact: 3rd. Other miHoYo/Cognosphere Pte. Ltd. games are currently not planned for game conversion.
230230
231231
# Download Ready-To-Use Builds
232-
[<img src="https://user-images.githubusercontent.com/30566970/172445052-b0e62327-1d2e-4663-bc0f-af50c7f23615.svg" width="320"/>](https://github.com/CollapseLauncher/Collapse/releases/download/CL-v1.82.10/CollapseLauncher-stable-Setup.exe)
233-
> **Note**: The version for this build is `1.82.10` (Released on: December 27th, 2024).
232+
[<img src="https://user-images.githubusercontent.com/30566970/172445052-b0e62327-1d2e-4663-bc0f-af50c7f23615.svg" width="320"/>](https://github.com/CollapseLauncher/Collapse/releases/download/CL-v1.82.11/CollapseLauncher-stable-Setup.exe)
233+
> **Note**: The version for this build is `1.82.11` (Released on: January 1st, 2025).
234234
235-
[<img src="https://user-images.githubusercontent.com/30566970/172445153-d098de0d-1236-4124-8e13-05000b374eb6.svg" width="320"/>](https://github.com/CollapseLauncher/Collapse/releases/download/CL-v1.82.10-pre/CollapseLauncher-preview-Setup.exe)
236-
> **Note**: The version for this build is `1.82.10` (Released on: December 27th, 2024).
235+
[<img src="https://user-images.githubusercontent.com/30566970/172445153-d098de0d-1236-4124-8e13-05000b374eb6.svg" width="320"/>](https://github.com/CollapseLauncher/Collapse/releases/download/CL-v1.82.11-pre/CollapseLauncher-preview-Setup.exe)
236+
> **Note**: The version for this build is `1.82.11` (Released on: January 1st, 2025).
237237
238238
To view all releases, [**click here**](https://github.com/neon-nyan/CollapseLauncher/releases).
239239

0 commit comments

Comments
 (0)