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
11 changes: 9 additions & 2 deletions ShinRyuModManager-CE/ModLoadOrder/CpkPatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,20 @@ public static async Task RepackDictionary(Dictionary<string, List<string>> cpkDi

foreach (var kvp in cpkDict) {
var cpkDir = cpkPath + kvp.Key;
var origCpk = GamePath.DataPath + kvp.Key + ".cpk";

string origCpk;

if (!kvp.Key.Contains(".cpk")) {
origCpk = GamePath.DataPath + kvp.Key + ".cpk";
} else {
origCpk = GamePath.DataPath + kvp.Key;
}

if (!Directory.Exists(cpkDir))
Directory.CreateDirectory(cpkDir);

foreach (var mod in kvp.Value) {
var modCpkDir = Path.Combine(GamePath.ModsPath, mod);
var modCpkDir = Path.Combine(GamePath.ModsPath, mod).Replace(".cpk", "");
var cpkFiles = Directory.GetFiles(modCpkDir, "*.");

foreach (var file in cpkFiles) {
Expand Down
4 changes: 2 additions & 2 deletions ShinRyuModManager-CE/ModLoadOrder/Mods/Mod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ public void AddFiles(string path, string check) {
cpkDataPath = GamePath.RemoveModPath(path);

if (GamePath.CurrentGame == Game.Yakuza5) {
CpkFolders.Add(cpkDataPath + ".cpk");
Log.Verbose("Adding CPK folder: {CpkDataPath}", cpkDataPath);
RepackCpKs.Add(cpkDataPath + ".cpk");
//Log.Verbose("Adding CPK folder: {CpkDataPath}", cpkDataPath);
} else {
if (GamePath.CurrentGame <= Game.YakuzaKiwami) {
RepackCpKs.Add(cpkDataPath + ".cpk");
Expand Down
16 changes: 14 additions & 2 deletions ShinRyuModManager-CE/ShinRyuModManager-CE.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,21 @@
<Configurations>Debug;Release</Configurations>
<Platforms>x64</Platforms>
<IsPackable>false</IsPackable>
<AssemblyVersion>1.1.10</AssemblyVersion>
<ApplicationIcon>UserInterface\Assets\Icons\SRMM_icon.ico</ApplicationIcon>
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>

<!-- Versioning -->
<AssemblyVersion>1.1.11</AssemblyVersion>
<VersionPrefix>$(AssemblyVersion)</VersionPrefix>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<VersionSuffix>debug</VersionSuffix>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<VersionSuffix>$(BuildSuffix)</VersionSuffix>
</PropertyGroup>

<ItemGroup>
Expand All @@ -37,7 +49,7 @@
<PackageReference Include="Serilog.Sinks.Async" Version="2.1.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" />
<PackageReference Include="Serilog.Sinks.File" Version="7.0.0" />
<PackageReference Include="SharpCompress" Version="0.40.0" />
<PackageReference Include="SharpCompress" Version="0.41.0" />
<PackageReference Include="Skia.Controls.Avalonia" Version="11.3.0.3" />
<PackageReference Include="Svg.Controls.Skia.Avalonia" Version="11.3.0.3" />
<PackageReference Include="YamlDotNet" Version="16.3.0" />
Expand Down
5 changes: 5 additions & 0 deletions ShinRyuModManager-CE/UserInterface/Assets/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
> ### **%{color:orange} Version 1.1.11 %** ###
* Implemented changed from SRMM 4.6.5

---

> ### **%{color:orange} Version 1.1.10 %** ###
* Finished overhaul of logging
* Moved SRMM logs to their own folder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ namespace ShinRyuModManager.UserInterface;
public static class CustomFilePickerFileTypes {
public static FilePickerFileType CompressedZip { get; } = new("Zip Archive")
{
Patterns = ["*.zip"],
AppleUniformTypeIdentifiers = ["public.zip-archive"],
MimeTypes = ["application/zip"]
Patterns = ["*.zip", "*.7z"],
AppleUniformTypeIdentifiers = ["public.zip-archive", "org.7-zip.7-zip-archive"],
MimeTypes = ["application/zip", "application/x-7z-compressed"]
};

public static FilePickerFileType CompressedRar { get; } = new("Rar Archive")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using CommunityToolkit.Mvvm.ComponentModel;
using Utils;

namespace ShinRyuModManager.UserInterface.ViewModels;

Expand All @@ -11,7 +12,7 @@ public AboutWindowViewModel() {
}

private void Initialize() {
Version = $"v{Utils.GetAppVersion()}";
Version = $"v{AssemblyVersion.GetVersion()}";

using var credits = UiHelpers.LoadResourceAsStream("credits.txt");
using var sr = new StreamReader(credits);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public void SelectMod(ModMeta mod) {

private void Initialize() {
TitleText = $"Shin Ryu Mod Manager [{GamePath.GetGameFriendlyName(GamePath.CurrentGame)}]";
AppVersionText = $"v{Utils.GetAppVersion()}";
AppVersionText = $"v{AssemblyVersion.GetVersion()}";

// Prefer launching through Steam, but if Windows, allow launching via exe
if (GamePath.IsSteamInstalled()) {
Expand Down
4 changes: 0 additions & 4 deletions ShinRyuModManager-CE/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ public static string NormalizeToNodePath(string path) {
return NormalizeSeparator(path, NodeSystem.PathSeparator.ToCharArray()[0]);
}

public static string GetAppVersion() {
return Assembly.GetExecutingAssembly().GetName().Version!.ToString();
}

internal static bool CheckFlag(string flagName) {
var currentPath = Path.GetDirectoryName(Environment.CurrentDirectory);
var flagFilePath = Path.Combine(currentPath, flagName);
Expand Down
5 changes: 3 additions & 2 deletions Utils/AssemblyVersion.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Reflection;
using System.Diagnostics;
using System.Reflection;

namespace Utils;

Expand All @@ -8,7 +9,7 @@ public static class AssemblyVersion {
/// </summary>
/// <returns>A <see cref="string"/>.</returns>
public static string GetVersion() {
var version = Assembly.GetCallingAssembly().GetName().Version?.ToString();
var version = Assembly.GetEntryAssembly()!.GetCustomAttribute<AssemblyInformationalVersionAttribute>()?.InformationalVersion;

return version;
}
Expand Down