diff --git a/ShinRyuModManager-CE/ModLoadOrder/CpkPatcher.cs b/ShinRyuModManager-CE/ModLoadOrder/CpkPatcher.cs index 1db9986..b744526 100644 --- a/ShinRyuModManager-CE/ModLoadOrder/CpkPatcher.cs +++ b/ShinRyuModManager-CE/ModLoadOrder/CpkPatcher.cs @@ -19,13 +19,20 @@ public static async Task RepackDictionary(Dictionary> 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) { diff --git a/ShinRyuModManager-CE/ModLoadOrder/Mods/Mod.cs b/ShinRyuModManager-CE/ModLoadOrder/Mods/Mod.cs index 654b9c7..bbb6feb 100644 --- a/ShinRyuModManager-CE/ModLoadOrder/Mods/Mod.cs +++ b/ShinRyuModManager-CE/ModLoadOrder/Mods/Mod.cs @@ -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"); diff --git a/ShinRyuModManager-CE/ShinRyuModManager-CE.csproj b/ShinRyuModManager-CE/ShinRyuModManager-CE.csproj index 17661c1..17ae65e 100644 --- a/ShinRyuModManager-CE/ShinRyuModManager-CE.csproj +++ b/ShinRyuModManager-CE/ShinRyuModManager-CE.csproj @@ -10,9 +10,21 @@ Debug;Release x64 false - 1.1.10 UserInterface\Assets\Icons\SRMM_icon.ico true + + + 1.1.11 + $(AssemblyVersion) + false + + + + debug + + + + $(BuildSuffix) @@ -37,7 +49,7 @@ - + diff --git a/ShinRyuModManager-CE/UserInterface/Assets/changelog.md b/ShinRyuModManager-CE/UserInterface/Assets/changelog.md index 77a7ae2..31231aa 100644 --- a/ShinRyuModManager-CE/UserInterface/Assets/changelog.md +++ b/ShinRyuModManager-CE/UserInterface/Assets/changelog.md @@ -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 diff --git a/ShinRyuModManager-CE/UserInterface/CustomFilePickerFileTypes.cs b/ShinRyuModManager-CE/UserInterface/CustomFilePickerFileTypes.cs index ecfeafe..612ce18 100644 --- a/ShinRyuModManager-CE/UserInterface/CustomFilePickerFileTypes.cs +++ b/ShinRyuModManager-CE/UserInterface/CustomFilePickerFileTypes.cs @@ -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") diff --git a/ShinRyuModManager-CE/UserInterface/ViewModels/AboutWindowViewModel.cs b/ShinRyuModManager-CE/UserInterface/ViewModels/AboutWindowViewModel.cs index c6907b5..f8c81a0 100644 --- a/ShinRyuModManager-CE/UserInterface/ViewModels/AboutWindowViewModel.cs +++ b/ShinRyuModManager-CE/UserInterface/ViewModels/AboutWindowViewModel.cs @@ -1,4 +1,5 @@ using CommunityToolkit.Mvvm.ComponentModel; +using Utils; namespace ShinRyuModManager.UserInterface.ViewModels; @@ -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); diff --git a/ShinRyuModManager-CE/UserInterface/ViewModels/MainWindowViewModel.cs b/ShinRyuModManager-CE/UserInterface/ViewModels/MainWindowViewModel.cs index e3d1d5c..4c4e689 100644 --- a/ShinRyuModManager-CE/UserInterface/ViewModels/MainWindowViewModel.cs +++ b/ShinRyuModManager-CE/UserInterface/ViewModels/MainWindowViewModel.cs @@ -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()) { diff --git a/ShinRyuModManager-CE/Utils.cs b/ShinRyuModManager-CE/Utils.cs index 5a75184..5d43a87 100644 --- a/ShinRyuModManager-CE/Utils.cs +++ b/ShinRyuModManager-CE/Utils.cs @@ -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); diff --git a/Utils/AssemblyVersion.cs b/Utils/AssemblyVersion.cs index a1422de..5016087 100644 --- a/Utils/AssemblyVersion.cs +++ b/Utils/AssemblyVersion.cs @@ -1,4 +1,5 @@ -using System.Reflection; +using System.Diagnostics; +using System.Reflection; namespace Utils; @@ -8,7 +9,7 @@ public static class AssemblyVersion { /// /// A . public static string GetVersion() { - var version = Assembly.GetCallingAssembly().GetName().Version?.ToString(); + var version = Assembly.GetEntryAssembly()!.GetCustomAttribute()?.InformationalVersion; return version; }