Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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/create-draft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
dir source\minhook

- name: Install Premake 5
uses: abel0b/setup-premake@b80dc6f70e8ab159fb854bdadbeb1a53cfc28723 # v2.4
uses: abel0b/setup-premake@de7d79047789622064f7a2d251e929fadd166707 # v2.4
with:
version: "5.0.0-beta2"

Expand Down
2 changes: 1 addition & 1 deletion CpkTools/CpkTools.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CommunityToolkit.HighPerformance" Version="8.4.0" />
<PackageReference Include="CommunityToolkit.HighPerformance" Version="8.4.2" />
</ItemGroup>

</Project>
8 changes: 4 additions & 4 deletions ParLibrary.Tests/ParLibrary.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
<PackageReference Include="MSTest.TestAdapter" Version="4.0.2" />
<PackageReference Include="MSTest.TestFramework" Version="4.0.2" />
<PackageReference Include="coverlet.collector" Version="6.0.4">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.5.1" />
<PackageReference Include="MSTest.TestAdapter" Version="4.2.2" />
<PackageReference Include="MSTest.TestFramework" Version="4.2.2" />
<PackageReference Include="coverlet.collector" Version="10.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
8 changes: 4 additions & 4 deletions ParLibrary/Converter/ParArchiveReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,17 +166,17 @@ public NodeContainerFormat Convert(BinaryFormat source) {
}

private static void BuildTree(Node node, IReadOnlyList<Node> folders, IReadOnlyList<Node> files, ParArchiveReaderParameters parameters) {
int firstFolderIndex = node.Tags["FirstFolderIndex"];
int folderCount = node.Tags["FolderCount"];
var firstFolderIndex = (int)node.Tags["FirstFolderIndex"];
var folderCount = (int)node.Tags["FolderCount"];

for (var i = firstFolderIndex; i < firstFolderIndex + folderCount; i++) {
node.Add(folders[i]);

BuildTree(folders[i], folders, files, parameters);
}

int firstFileIndex = node.Tags["FirstFileIndex"];
int fileCount = node.Tags["FileCount"];
var firstFileIndex = (int)node.Tags["FirstFileIndex"];
var fileCount = (int)node.Tags["FileCount"];

for (var i = firstFileIndex; i < firstFileIndex + fileCount; i++) {
if (parameters.Recursive &&
Expand Down
11 changes: 6 additions & 5 deletions ParLibrary/Converter/ParArchiveWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
var folder = queue.Dequeue();

folder.Tags["FirstFolderIndex"] = folderIndex;
folder.Tags["FolderCount"] = 0;

Check warning on line 163 in ParLibrary/Converter/ParArchiveWriter.cs

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Define a constant instead of using this literal 'FolderCount' 4 times.

See more on https://sonarcloud.io/project/issues?id=TheTrueColonel_ShinRyuModManager-CE&issues=AZ37C1G7D6vS1LGSrPiS&open=AZ37C1G7D6vS1LGSrPiS&pullRequest=46
folder.Tags["FirstFileIndex"] = fileIndex;
folder.Tags["FileCount"] = 0;
folder.Tags["Attributes"] = 0x00000010;
Expand All @@ -183,11 +183,12 @@

files.Add(child);
fileIndex++;
folder.Tags["FileCount"]++;

folder.Tags["FileCount"] = (int)folder.Tags["FileCount"] + 1;
} else {
folders.Add(child);
folderIndex++;
folder.Tags["FolderCount"]++;
folder.Tags["FolderCount"] = (int)folder.Tags["FolderCount"] + 1;

queue.Enqueue(child);
}
Expand All @@ -198,7 +199,7 @@

files.Add(child);
fileIndex++;
folder.Tags["FileCount"]++;
folder.Tags["FileCount"] = (int)folder.Tags["FileCount"] + 1;
}
}
}
Expand Down Expand Up @@ -252,7 +253,7 @@
var attributes = 0x00000010;

if (tags.TryGetValue("DirectoryInfo", out var directoryInfo)) {
DirectoryInfo info = directoryInfo;
var info = (DirectoryInfo)directoryInfo;
attributes = (int)info.Attributes;
}

Expand Down Expand Up @@ -297,7 +298,7 @@
var baseDate = DateTime.UnixEpoch;

if (node.Tags.TryGetValue("Timestamp", out var timestamp)) {
date = baseDate.AddSeconds(timestamp);
date = baseDate.AddSeconds((double)timestamp);
}

if (node.Tags.TryGetValue("FileInfo", out var fileInfo) && fileInfo is FileInfo info) {
Expand Down
2 changes: 1 addition & 1 deletion ParLibrary/ParLibrary.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Yarhl" Version="4.0.0" />
<PackageReference Include="Yarhl" Version="4.1.0" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion Scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ for TARGET in "${!UPDATER_TARGET_ARGS[@]}"; do
mkdir -p "${OUT_DIR}"

# Reads the target's arguments and split them into an array
IFS=";" read -r -a arr <<< "${TARGET_ARGS[${TARGET}]}"
IFS=";" read -r -a arr <<< "${UPDATER_TARGET_ARGS[${TARGET}]}"

echo "Buidling RyuUpdater ${TARGET}..."

Expand Down
2 changes: 2 additions & 0 deletions Scripts/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ for TARGET in "${SRMM_BUILD_DIRS[@]}"; do
OUTPUT_FILE_BASE="${SRMM_BASE_NAME}-${OUTPUT_TARGET_STR}-${SRMM_VERSION}"

echo "Compressing ${OUTPUT_FILE_BASE}..."

find "${DIR}" -name "*.pdb" -delete

7za a "${SRMM_OUTPUT_DIR}/${OUTPUT_FILE_BASE}.zip" -tzip -bd -y "${DIR}/*" > /dev/null
tar czf "${SRMM_OUTPUT_DIR}/${OUTPUT_FILE_BASE}.tar.gz" --owner=0 --group=0 --numeric-owner -C "${DIR}/" .
Expand Down
2 changes: 0 additions & 2 deletions ShinRyuModManager-CE/ModLoadOrder/Generator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ public static async Task<MLO> GenerateModeLoadOrder(List<ModInfo> mods, bool loo

Log.Information("Reading mods...\n");

// TODO: Make mod reading async

// Use a reverse loop to be able to remove items from the list when necessary
for (var i = mods.Count - 1; i >= 0; i--) {
var mod = new Mod(mods[i]);
Expand Down
6 changes: 4 additions & 2 deletions ShinRyuModManager-CE/ModLoadOrder/Mods/ModInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
namespace ShinRyuModManager.ModLoadOrder.Mods;

public sealed partial class ModInfo : ObservableObject, IEquatable<ModInfo> {
[ObservableProperty] private string _name;

[ObservableProperty]
public partial string Name { get; set; }

public ProfileMask EnabledProfiles { get; set; }

public bool Enabled {
Expand All @@ -16,6 +17,7 @@ public bool Enabled {
} else {
EnabledProfiles &= ~Program.ActiveProfile.ToMask();
}
OnPropertyChanged();
}
}

Expand Down
2 changes: 1 addition & 1 deletion ShinRyuModManager-CE/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ private static void Main(string[] args) {
.WriteTo.Async(a => a.File(new JsonFormatter(renderMessage: true), errorLogsPath, rollingInterval: RollingInterval.Day)))
.CreateLogger();

#if LINUX_SLIM
#if LINUX_SLIM || DEBUG
// Slim versions of Linux need to have .NET 10 installed to run and Proton/Wine makes that
// annoying to find to get this working. Temporarily disabled.
RebuildMlo = false;
Expand Down
32 changes: 16 additions & 16 deletions ShinRyuModManager-CE/ShinRyuModManager-CE.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>

<!-- Versioning -->
<AssemblyVersion>1.5.0</AssemblyVersion>
<AssemblyVersion>1.6.0</AssemblyVersion>
<VersionPrefix>$(AssemblyVersion)</VersionPrefix>
<AssemblyTitle>ShinRyuModManager-CE</AssemblyTitle>
<Company>SRMM Studio</Company>
Expand Down Expand Up @@ -44,28 +44,28 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Avalonia" Version="11.3.8" />
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.3.8" />
<PackageReference Include="Avalonia.Desktop" Version="11.3.8" />
<PackageReference Include="Avalonia.Diagnostics" Version="11.3.8" />
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.3.8" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.3.8" />
<PackageReference Include="ClassIsland.Markdown.Avalonia" Version="11.0.3.4" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
<PackageReference Include="Avalonia" Version="12.0.2" />
<PackageReference Include="Avalonia.Controls.DataGrid" Version="12.0.0" />
<PackageReference Include="Avalonia.Desktop" Version="12.0.2" />
<PackageReference Include="Avalonia.Fonts.Inter" Version="12.0.2" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="12.0.2" />
<PackageReference Include="AvaloniaUI.DiagnosticsSupport" Version="2.2.1" />
<PackageReference Include="ClassIsland.Markdown.Avalonia" Version="12.0.0" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.2" />
<PackageReference Include="ini-parser-netstandard" Version="2.5.3" />
<PackageReference Include="JetBrains.Annotations" Version="2025.2.2" />
<PackageReference Include="JetBrains.Annotations" Version="2025.2.4" />
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="3.0.1" />
<PackageReference Include="NetSparkleUpdater.UI.Avalonia" Version="3.0.4" />
<PackageReference Include="Serilog" Version="4.3.0" />
<PackageReference Include="NetSparkleUpdater.UI.Avalonia" Version="4.0.0-preview20260505001" />
<PackageReference Include="Serilog" Version="4.3.1" />
<PackageReference Include="Serilog.Exceptions" Version="8.4.0" />
<PackageReference Include="Serilog.Expressions" Version="5.0.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="2.1.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="6.1.1" />
<PackageReference Include="Serilog.Sinks.File" Version="7.0.0" />
<PackageReference Include="SharpCompress" Version="0.41.0" />
<PackageReference Include="Skia.Controls.Avalonia" Version="11.3.6.2" />
<PackageReference Include="Svg.Controls.Skia.Avalonia" Version="11.3.6.2" />
<PackageReference Include="YamlDotNet" Version="16.3.0" />
<PackageReference Include="SharpCompress" Version="0.47.4" />
<PackageReference Include="Skia.Controls.Avalonia" Version="12.0.0.6" />
<PackageReference Include="Svg.Controls.Skia.Avalonia" Version="12.0.0.6" />
<PackageReference Include="YamlDotNet" Version="17.1.0" />
</ItemGroup>

<ItemGroup>
Expand Down
22 changes: 4 additions & 18 deletions ShinRyuModManager-CE/UserInterface/App.axaml.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using Avalonia;
using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Data.Core.Plugins;
using Avalonia.Markup.Xaml;
using Serilog;
using ShinRyuModManager.UserInterface.ViewModels;
Expand All @@ -17,10 +15,6 @@ public override void Initialize() {

public override void OnFrameworkInitializationCompleted() {
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop) {
// Avoid duplicate validations from both Avalonia and the CommunityToolkit.
// More info: https://docs.avaloniaui.net/docs/guides/development-guides/data-validation#manage-validationplugins
DisableAvaloniaDataAnnotationValidation();

var culture = new CultureInfo("en");

CultureInfo.DefaultThreadCurrentCulture = culture;
Expand All @@ -34,6 +28,10 @@ public override void OnFrameworkInitializationCompleted() {

desktop.Exit += DesktopOnExit;
}

#if DEBUG
this.AttachDeveloperTools();
#endif

base.OnFrameworkInitializationCompleted();
}
Expand All @@ -42,17 +40,5 @@ public override void OnFrameworkInitializationCompleted() {
private static void DesktopOnExit(object sender, ControlledApplicationLifetimeExitEventArgs e) {
Log.CloseAndFlush();
}

[UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Only removing validation plugins; no reflection or property access used.")]
private static void DisableAvaloniaDataAnnotationValidation() {
// Get an array of plugins to remove
var dataValidationPluginsToRemove =
BindingPlugins.DataValidators.OfType<DataAnnotationsValidationPlugin>().ToArray();

// remove each entry found
foreach (var plugin in dataValidationPluginsToRemove) {
BindingPlugins.DataValidators.Remove(plugin);
}
}
}

8 changes: 7 additions & 1 deletion ShinRyuModManager-CE/UserInterface/Assets/changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
> ### **%{color:gold} Version 1.5.0 %** ###
> ### **%{color:gold} Version 1.6.0 %** ###
* Migrated to Avalonia 12
* Bumped all other packages

---

> ### **%{color:orange} Version 1.5.0 %** ###
* Partial RebuildMLO support for Linux users
* `linux` "non-slim" users only, until a workaround is found for `linux-slim` users

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
namespace ShinRyuModManager.UserInterface.ViewModels;

public partial class AboutWindowViewModel : ViewModelBase {
[ObservableProperty] private string _version;
[ObservableProperty] private string _creditsText;
[ObservableProperty]
public partial string Version { get; set; }

[ObservableProperty]
public partial string CreditsText { get; set; }

public AboutWindowViewModel() {
Initialize();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
namespace ShinRyuModManager.UserInterface.ViewModels;

public partial class ChangeLogWindowViewModel : ViewModelBase {
[ObservableProperty] private string _changeLogText;
[ObservableProperty]
public partial string ChangeLogText { get; set; }

public ChangeLogWindowViewModel() {
Initialize();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,49 @@
namespace ShinRyuModManager.UserInterface.ViewModels;

public partial class LibraryDisplayControlViewModel : ViewModelBase {
[ObservableProperty] private string _libName = "Name";
[ObservableProperty] private string _author = "Author";
[ObservableProperty] private string _description = "Description";
[ObservableProperty] private string _guid = "Guid";
[ObservableProperty] private string _version = "Version";
[ObservableProperty] private string _sourceLink;

[ObservableProperty] private bool _enableBtnVisibility;
[ObservableProperty] private bool _disableBtnVisibility;
[ObservableProperty] private bool _installBtnVisibility;
[ObservableProperty] private bool _uninstallBtnVisibility;
[ObservableProperty] private bool _updateBtnVisibility;
[ObservableProperty] private bool _sourceBtnVisibility;
[ObservableProperty]
public partial string LibName { get; set; } = "Name";

[ObservableProperty]
public partial string Author { get; set; } = "Author";

[ObservableProperty]
public partial string Description { get; set; } = "Description";

[ObservableProperty]
public partial string Guid { get; set; } = "Guid";

[ObservableProperty]
public partial string Version { get; set; } = "Version";

[ObservableProperty]
public partial string SourceLink { get; set; }

[ObservableProperty]
public partial bool EnableBtnVisibility { get; set; }

[ObservableProperty]
public partial bool DisableBtnVisibility { get; set; }

[ObservableProperty]
public partial bool InstallBtnVisibility { get; set; }

[ObservableProperty]
public partial bool UninstallBtnVisibility { get; set; }

[ObservableProperty]
public partial bool UpdateBtnVisibility { get; set; }

[ObservableProperty]
public partial bool SourceBtnVisibility { get; set; }

public LibraryDisplayControlViewModel() { }

public LibraryDisplayControlViewModel(LibMeta meta) {
_libName = meta.Name;
_author = meta.Author;
_description = meta.Description;
_guid = meta.GUID.ToString();
_version = meta.Version;
LibName = meta.Name;
Author = meta.Author;
Description = meta.Description;
Guid = meta.GUID.ToString();
Version = meta.Version;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
namespace ShinRyuModManager.UserInterface.ViewModels;

public partial class LibraryManagerViewModel : ViewModelBase {
[ObservableProperty] private ObservableCollection<LibraryDisplayControl> _library = [];
[ObservableProperty]
public partial ObservableCollection<LibraryDisplayControl> Library { get; set; } = [];
}
Loading
Loading