Skip to content

Preview 1.83.3 #755

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 49 commits into from
Jun 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
b0647cc
[skip ci] Update README.md
neon-nyan May 12, 2025
8765ab7
[skip ci] Sync translation Translate en_US.json in fr_FR
transifex-integration[bot] May 13, 2025
8eaa6cb
[skip ci] Sync translation Translate en_US.json in ja_JP
transifex-integration[bot] May 13, 2025
4598260
Update .NET 9.0.5 CVE-2025-26646
bagusnl May 15, 2025
cb9ed24
Update .NET 9.0.5 CVE-2025-26646 (#749)
bagusnl May 15, 2025
976e4ef
[skip ci] Sync translation Translate en_US.json in zh_CN
transifex-integration[bot] May 20, 2025
989cc13
Avoid config.ini default values on initialization
neon-nyan May 29, 2025
c661bde
Fix GetGameState doesn't aware of alt. executable name
neon-nyan May 29, 2025
83cbd6e
Remove unused string on delta patch repair
neon-nyan May 29, 2025
475649c
Fix wrong indicator if the game have both Sophon and Delta-patch on u…
neon-nyan May 29, 2025
407a421
Ensure folder existence on saving Steam Shortcut
neon-nyan May 29, 2025
d1e2c51
Update dependency/type tree diagram
bagusnl May 31, 2025
658ae2d
[Read commit message] Update nuget
bagusnl May 31, 2025
8404fa5
Thread safe on ILogger caching method
bagusnl May 31, 2025
97cc1cf
[skip ci] Limit Qodana PR linter to only use 2GB of RAM
bagusnl May 31, 2025
d381562
Fix EnumFailedVersion in SpawnRegionNotification
bagusnl May 31, 2025
403f788
Remove Velopack update error due to the app not installed
bagusnl May 31, 2025
7d5bb28
Strip AlternateDataStream from some file operations
bagusnl May 31, 2025
f616439
[GI] [Repair] Prevent repair from nuking the install
bagusnl May 31, 2025
8d4a39c
Add image loading retry method
bagusnl May 31, 2025
f050a2e
Merge remote-tracking branch 'origin/nuget-update' into nuget-update
bagusnl May 31, 2025
6319f98
Remove url try count from concurrent directory
bagusnl May 31, 2025
9d3e2dc
[QD PR] Fix run error
bagusnl May 31, 2025
5a4a11e
Update WASDK + Webview
bagusnl May 31, 2025
bd563d4
[Repair][SR] Ignore 404 error when repairing
bagusnl Jun 1, 2025
1c282b6
Fix DebugAOT profile doesn't have AOT constant
bagusnl Jun 5, 2025
cda8802
Update Webview + enable Control Flow Guard
bagusnl Jun 5, 2025
efa9d58
Fix EncTool Hashing package version desync
bagusnl Jun 5, 2025
8fcbd72
Fix wrong flag on CFG setting
bagusnl Jun 5, 2025
10af925
Fix Sophon forced to set while fallback is enabled
neon-nyan Jun 6, 2025
c0a3bbe
Fix logic on IsUseSophon
neon-nyan Jun 6, 2025
6c01de5
Fix PerfMode not applied on Sophon Patch
neon-nyan Jun 6, 2025
1dec69f
Add CFG settings directly on all AOT publish profiles
bagusnl Jun 6, 2025
c2f872b
Bump NuGets
bagusnl Jun 6, 2025
56e3e4d
Fix Velopack undocumented breaking changes (again)
bagusnl Jun 6, 2025
0973b03
Fix image loader retry count initialization value was set to 2
bagusnl Jun 6, 2025
1264863
[skip ci] Update THIRD_PARTY_NOTICES.md
bagusnl Jun 6, 2025
f0c98da
Fix ZZZ Sophon Patch Frickery - Support for HDiff CopyOver
neon-nyan Jun 6, 2025
77d4331
Fix conflict (attempt: 1)
neon-nyan Jun 6, 2025
c9a15f2
Update dependencies and bug fixes (#753)
neon-nyan Jun 6, 2025
2b0a5b1
Fix H.NotifyIcon compile error
neon-nyan Jun 6, 2025
1eee1c3
[ZZZ GSP] Add new settings: Ambient Noise Volume
neon-nyan Jun 6, 2025
1dd6951
Remove unused dlls on post publish
neon-nyan Jun 6, 2025
6412a22
Fix post-build routine
neon-nyan Jun 6, 2025
1dfc7ce
Update PLJ
bagusnl Jun 7, 2025
ef43c59
[Repair][GI/ZZZ] Add safeguard against file 404
bagusnl Jun 7, 2025
7980303
Update TPN
bagusnl Jun 7, 2025
43aa32b
CodeQA
bagusnl Jun 7, 2025
0965bd9
[skip ci] Sync translation Translate en_US.json in es_419
transifex-integration[bot] Jun 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ on:

env:
DOTNET_INSTALL_DIR: '.\.dotnet'
DOTNET_VERSION: '9.0.2xx'
DOTNET_VERSION: '9.0.3xx'
DOTNET_QUALITY: 'ga'
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages

Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/qodana-scan-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
Configuration: ${{ matrix.configuration }}
Platform: ${{ matrix.platform }}
DOTNET_INSTALL_DIR: '.\.dotnet'
DOTNET_VERSION: '9.0.2xx'
DOTNET_VERSION: '9.0.3xx'
DOTNET_QUALITY: 'ga'
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages

Expand Down Expand Up @@ -58,6 +58,8 @@ jobs:
pr-mode: true
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }} # read the steps about it below
_JAVA_OPTIONS: -Xmx2g
JAVA_OPTIONS: -Xmx2g
- uses: github/codeql-action/upload-sarif@v3
if: ${{ github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }}
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/qodana-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
Configuration: ${{ matrix.configuration }}
Platform: ${{ matrix.platform }}
DOTNET_INSTALL_DIR: '.\.dotnet'
DOTNET_VERSION: '9.0.2xx'
DOTNET_VERSION: '9.0.3xx'
DOTNET_QUALITY: 'ga'
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
permissions:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-signed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
DOTNET_INSTALL_DIR: '.\.dotnet'
DOTNET_VERSION: '9.0.2xx'
DOTNET_VERSION: '9.0.3xx'
DOTNET_QUALITY: 'ga'
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
SIGNPATH_ARTIFACT_SLUG: 'initial' # change this to 'aot-release' when releasing with AOT or 'initial' for normal release
Expand Down
Binary file added CollapseLauncher-ProjectDependency.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CollapseLauncher-TypeDependency.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 24 additions & 24 deletions CollapseLauncher.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -5,81 +5,81 @@
<BuildType Name="Release" />
<Platform Name="x64" />
</Configurations>
<Project Path="CollapseLauncher\CollapseLauncher.csproj" Id="b71c36f7-f4f7-4d7d-8ba4-cfeb0fc8bd92">
<Project Path="CollapseLauncher/CollapseLauncher.csproj">
<Platform Project="x64" />
<Deploy Solution="Release|*" />
</Project>
<Project Path="ColorThief\ColorThief\ColorThief.csproj" Id="2ed0d451-cbaf-4919-9026-e7add7ca8e2d">
<Project Path="ColorThief/ColorThief/ColorThief.csproj">
<BuildType Solution="Publish|*" Project="Release" />
<Platform Project="x64" />
</Project>
<Project Path="H.NotifyIcon\src\libs\H.GeneratedIcons.System.Drawing\H.GeneratedIcons.System.Drawing.csproj" Id="1f5ca675-4adf-4664-99b7-c27cce07e498">
<Project Path="H.NotifyIcon/src/libs/H.GeneratedIcons.System.Drawing/H.GeneratedIcons.System.Drawing.csproj">
<BuildType Solution="Publish|*" Project="Release" />
<Platform Project="x64" />
</Project>
<Project Path="H.NotifyIcon\src\libs\H.NotifyIcon.WinUI\H.NotifyIcon.WinUI.csproj" Id="89b8ef27-0207-4f5e-8321-171e210df786">
<Project Path="H.NotifyIcon/src/libs/H.NotifyIcon.WinUI/H.NotifyIcon.WinUI.csproj">
<BuildType Solution="Publish|*" Project="Release" />
<Platform Project="x64" />
</Project>
<Project Path="H.NotifyIcon\src\libs\H.NotifyIcon\H.NotifyIcon.csproj" Id="ee54b1d4-6fe3-422b-8b42-6af9fddfee2a">
<Project Path="H.NotifyIcon/src/libs/H.NotifyIcon/H.NotifyIcon.csproj">
<BuildType Solution="Publish|*" Project="Release" />
<Platform Project="x64" />
</Project>
<Project Path="Hi3Helper.CommunityToolkit\ImageCropper\Hi3Helper.CommunityToolkit.WinUI.Controls.ImageCropper.csproj" Id="8e437186-9d61-4fd3-b9da-4871a0a32ef4">
<Project Path="Hi3Helper.CommunityToolkit/ImageCropper/Hi3Helper.CommunityToolkit.WinUI.Controls.ImageCropper.csproj">
<BuildType Solution="Publish|*" Project="Release" />
<Platform Project="x64" />
</Project>
<Project Path="Hi3Helper.CommunityToolkit\SettingsControls\Hi3Helper.CommunityToolkit.WinUI.Controls.SettingsControls.csproj" Id="5bcd6877-0385-4f3e-b490-f619fe9f880c">
<Project Path="Hi3Helper.CommunityToolkit/SettingsControls/Hi3Helper.CommunityToolkit.WinUI.Controls.SettingsControls.csproj">
<BuildType Solution="Publish|*" Project="Release" />
<Platform Project="x64" />
</Project>
<Project Path="Hi3Helper.Core\Hi3Helper.Core.csproj" Id="0ad5f84e-a3c1-4984-837f-6046e8c219de">
<BuildType Solution="Publish|*" Project="Release" />
<Project Path="Hi3Helper.Core/Hi3Helper.Core.csproj">
<Platform Project="x64" />
</Project>
<Project Path="Hi3Helper.EncTool.Test\Hi3Helper.EncTool.Test.csproj" Id="02f12e87-7423-420f-a3b6-07f32b4f5b9e">
<Project Path="Hi3Helper.EncTool.Test/Hi3Helper.EncTool.Test.csproj">
<BuildType Solution="Publish|*" Project="Release" />
<Platform Project="x64" />
<Build Solution="Publish|*" Project="false" />
<Build Solution="Release|*" Project="false" />
</Project>
<Project Path="Hi3Helper.EncTool\Hi3Helper.EncTool.csproj" Id="5ba95b31-a352-4477-ae5a-640a7c0e4b35">
<Project Path="Hi3Helper.EncTool/Hi3Helper.EncTool.csproj">
<BuildType Solution="Publish|*" Project="Release" />
<Platform Project="x64" />
</Project>
<Project Path="Hi3Helper.Http\Hi3Helper.Http.csproj" Id="9b438d88-6f1e-4eaa-aaa4-499aebb04de8">
<Project Path="Hi3Helper.Http/Hi3Helper.Http.csproj">
<BuildType Solution="Publish|*" Project="Release" />
<Platform Project="x64" />
</Project>
<Project Path="Hi3Helper.SharpDiscordRPC\DiscordRPC\DiscordRPC.csproj" Id="3708cd62-4b90-4498-b61a-43bca7a4a144">
<Project Path="Hi3Helper.SharpDiscordRPC/DiscordRPC/DiscordRPC.csproj">
<BuildType Solution="Publish|*" Project="Release" />
<Platform Project="x64" />
</Project>
<Project Path="Hi3Helper.Sophon\Hi3Helper.Sophon.csproj" Id="17e6d3cd-1d68-4254-85b3-6286a7992a4e">
<Project Path="Hi3Helper.Sophon/Hi3Helper.Sophon.csproj">
<BuildType Solution="Publish|*" Project="Release" />
<Platform Project="x64" />
</Project>
<Project Path="Hi3Helper.TaskScheduler\Hi3Helper.TaskScheduler.csproj" Id="561b6ad6-2bc3-4a88-8401-ab5e7f0bd517">
<Project Path="Hi3Helper.TaskScheduler/Hi3Helper.TaskScheduler.csproj">
<BuildType Solution="Publish|*" Project="Release" />
<Platform Project="x64" />
</Project>
<Project Path="Hi3Helper.Win32/Hi3Helper.Win32.csproj">
<BuildType Solution="Publish|*" Project="Debug" />
<BuildType Solution="Publish|*" Project="Release" />
<Platform Project="x64" />
</Project>
<Project Path="Hi3Helper.Win32/WinRT/Hi3Helper.Win32.WinRT.csproj">
<BuildType Solution="Publish|*" Project="Release" />
<Platform Project="x64" />
</Project>
<Project Path="ImageEx\ImageEx\ImageEx.csproj" Id="9c7abc1d-504e-45c4-ae76-98a9f6e28c80">
<Project Path="ImageEx/ImageEx/ImageEx.csproj">
<BuildType Solution="Publish|*" Project="Release" />
<Platform Project="x64" />
</Project>
<Project Path="InnoSetupHelper\InnoSetupHelper.csproj" Id="505d0af2-3df6-4a1e-a593-e7bcf390948b">
<Project Path="InnoSetupHelper/InnoSetupHelper.csproj">
<BuildType Solution="Publish|*" Project="Release" />
<Platform Project="x64" />
</Project>
<Project Path="SevenZipExtractor\SevenZipExtractor\SevenZipExtractor.csproj" Id="3a870233-747f-495d-b08d-770141bd715e">
<Project Path="SevenZipExtractor/SevenZipExtractor/SevenZipExtractor.csproj">
<BuildType Solution="Publish|*" Project="Release" />
<Platform Project="x64" />
</Project>
<Project Path="Hi3Helper.Win32\WinRT\Hi3Helper.Win32.WinRT.csproj" Id="5CA5A261-1D5B-8A4D-EA87-B031CFFD4DDD">
<BuildType Solution="Publish|*" Project="Release" />
<Platform Project="x64" />
</Project>
</Solution>
</Solution>
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ private async Task UpdateCacheAsset((SRAsset AssetIndex, IAssetProperty AssetPro
{
// Increment total count and update the status
ProgressAllCountCurrent++;
FileInfo fileInfo = new FileInfo(asset.AssetIndex.LocalName!).EnsureCreationOfDirectory().EnsureNoReadOnly();
FileInfo fileInfo = new FileInfo(asset.AssetIndex.LocalName!).EnsureCreationOfDirectory().StripAlternateDataStream().EnsureNoReadOnly();
Status.ActivityStatus = string.Format(Lang._Misc.Downloading + " {0}: {1}", asset.AssetIndex.AssetType, Path.GetFileName(fileInfo.Name));
UpdateAll();

Expand Down
35 changes: 35 additions & 0 deletions CollapseLauncher/Classes/Extension/DictionaryExtension.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.Linq;

namespace CollapseLauncher.Classes.Extension
{
#nullable enable
public static class DictionaryExtension
{
/// <summary>
/// Gets the value from a dictionary by key, ignoring case.
/// </summary>
/// <param name="dict">Dictionary you want to get value from</param>
/// <param name="key">Key of the value you want to get</param>
/// <param name="comparer">Comparison culture you want to use. Default: OrdinalIgnoreCase</param>
/// <returns>String of the key, null when dictionary is null or not found or value is null</returns>
public static string? TryGetValueIgnoreCase(this IDictionary<string, string>? dict,
string key,
StringComparison comparer = StringComparison.OrdinalIgnoreCase)
{
if (dict == null || dict.Count == 0) return null;

// Check if dictionary already implements case-insensitive comparison
if (comparer == StringComparison.OrdinalIgnoreCase &&
dict is Dictionary<string, string?> typedDict &&
Equals(typedDict.Comparer, StringComparer.OrdinalIgnoreCase))
{
return dict.TryGetValue(key, out var value) ? value : null;
}

var matchingPair = dict.FirstOrDefault(x => string.Equals(x.Key, key, comparer));
return matchingPair.Value;
}
}
}
21 changes: 17 additions & 4 deletions CollapseLauncher/Classes/Extension/UIElementExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -360,16 +360,29 @@ internal static TextBlock AddTextBlockNewLine(this TextBlock textBlock, int coun
return textBlock;
}

internal static TextBlock AddTextBlockLine(this TextBlock textBlock, string message, bool appendSpaceAtEnd, FontWeight? weight = null, double size = 14d)
internal static TextBlock AddTextBlockLine(this TextBlock textBlock, string message, bool appendSpaceAtEnd, FontWeight? weight = null, double size = 14d, double opacity = 1d)
{
message += ' ';
return textBlock.AddTextBlockLine(message, weight, size);
return textBlock.AddTextBlockLine(message, weight, size, opacity);
}

internal static TextBlock AddTextBlockLine(this TextBlock textBlock, string message, FontWeight? weight = null, double size = 14d)
internal static TextBlock AddTextBlockLine(this TextBlock textBlock, string message, FontWeight? weight = null, double size = 14d, double opacity = 1d)
{
weight ??= FontWeights.Normal;
textBlock.Inlines.Add(new Run { Text = message, FontWeight = weight.Value, FontSize = size });
Run run = new Run { Text = message, FontWeight = weight.Value, FontSize = size };

if (opacity < 1d)
{
SolidColorBrush brush = GetApplicationResource<SolidColorBrush>("DefaultTextForegroundThemeBrush");
SolidColorBrush opaqueBrush = new SolidColorBrush(brush.Color)
{
Opacity = opacity
};
run.Foreground = opaqueBrush;
}

textBlock.Inlines.Add(run);

return textBlock;
}

Expand Down
26 changes: 17 additions & 9 deletions CollapseLauncher/Classes/Extension/VelopackLocatorExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@
using Hi3Helper.SentryHelper;
using Hi3Helper.Shared.Region;
using Hi3Helper.Win32.ShellLinkCOM;
using Microsoft.Extensions.Logging;
using NuGet.Versioning;
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
using Velopack;
using Velopack.Locators;

// ReSharper disable IdentifierTypo
// ReSharper disable StringLiteralTypo
// ReSharper disable CommentTypo
Expand Down Expand Up @@ -55,19 +56,26 @@ internal static void StartUpdaterHook(string aumid)
#else
// Allocate the Velopack locator manually to avoid Velopack from re-assigning
// its custom AUMID
ILogger logger = ILoggerHelper.GetILogger("Velopack");
WindowsVelopackLocator locator = new WindowsVelopackLocator(logger);
var logger = ILoggerHelper.GetILogger("Velopack").ToVelopackLogger();

var currentProcess = Process.GetCurrentProcess();

var locator =
new WindowsVelopackLocator(currentProcess.MainModule!.FileName,
(uint)currentProcess.Id,
logger);
// HACK: Always ensure to set the AUMID field null so it won't
// set the AUMID to its own.
locator.GetLocatorAumidField() = null;

VelopackApp builder = VelopackApp.Build()
.WithRestarted(TryCleanupFallbackUpdate)
.WithAfterUpdateFastCallback(TryCleanupFallbackUpdate)
.WithFirstRun(TryCleanupFallbackUpdate)
.SetLocator(locator);
var velopackBuilder = VelopackApp.Build()
.OnRestarted(TryCleanupFallbackUpdate)
.OnAfterUpdateFastCallback(TryCleanupFallbackUpdate)
.OnFirstRun(TryCleanupFallbackUpdate)
.SetLocator(locator)
.SetLogger(logger);

builder.Run(logger);
velopackBuilder.Run();

_ = Task.Run(DeleteVelopackLock);

Expand Down
47 changes: 47 additions & 0 deletions CollapseLauncher/Classes/Extension/VelopackLoggerExtension.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
using Microsoft.Extensions.Logging;
using System;
using Velopack.Logging;

namespace CollapseLauncher.Classes.Extension
{
public class VelopackLoggerAdaptor(ILogger logger) : IVelopackLogger
{
private readonly ILogger _logger = logger ?? throw new ArgumentNullException(nameof(logger));

public void Log(VelopackLogLevel logLevel, string message, Exception exception)
{
switch (logLevel)
{
case VelopackLogLevel.Trace:
_logger.LogTrace(message);
break;
case VelopackLogLevel.Debug:
_logger.LogDebug(exception, message);
break;
case VelopackLogLevel.Information:
_logger.LogInformation(message);
break;
case VelopackLogLevel.Warning:
_logger.LogWarning(exception, message);
break;
case VelopackLogLevel.Error:
_logger.LogError(exception, message);
break;
case VelopackLogLevel.Critical:
_logger.LogCritical(exception, message);
break;
default:
_logger.LogError(exception ?? new Exception("An unknown log level was encountered."), message);
break;
}
}
}

public static class LoggerExtensions
{
public static IVelopackLogger ToVelopackLogger(this ILogger logger)
{
return new VelopackLoggerAdaptor(logger);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,18 @@ public int Audio_SfxVolume
set => _sfxVolData?.SetData(value);
}

// Key 20192 Ambient
private SystemSettingLocalData<int>? _ambientVolData;

[JsonIgnore]
public int Audio_AmbientVolume
{
get => (_ambientVolData ??= SystemSettingDataMap
.AsSystemSettingLocalData("20192", 10))
.GetData();
set => _ambientVolData?.SetData(value);
}

// Key 10104 Playback Device Type
private SystemSettingLocalData<AudioPlaybackDevice>? _playDevData;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ internal static void WriteString(string filePath, ReadOnlySpan<char> content, Re
}

// Get the FileInfo
FileInfo fileInfo = new FileInfo(filePath).EnsureNoReadOnly();
FileInfo fileInfo = new FileInfo(filePath).StripAlternateDataStream().EnsureNoReadOnly();

// Create the stream and write the thing
using FileStream stream = fileInfo.Open(FileMode.Create, FileAccess.Write, FileShare.Write);
Expand Down
Loading