From 9515947734611ad1798ad3f75aa7ebe8bf6bc72d Mon Sep 17 00:00:00 2001 From: erri120 Date: Wed, 23 Oct 2019 19:00:45 +0200 Subject: [PATCH] Changed version type to string --- Wabbajack.Lib/Compiler.cs | 4 ++-- Wabbajack.Lib/Data.cs | 2 +- Wabbajack.Lib/ReportBuilder.cs | 2 +- Wabbajack/AppState.cs | 16 ++++++++-------- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Wabbajack.Lib/Compiler.cs b/Wabbajack.Lib/Compiler.cs index 536fed60..e517da27 100644 --- a/Wabbajack.Lib/Compiler.cs +++ b/Wabbajack.Lib/Compiler.cs @@ -34,7 +34,7 @@ namespace Wabbajack.Lib public string MO2Profile; public string ModListName, ModListAuthor, ModListDescription, ModListWebsite, ModListImage, ModListReadme; - public FileVersionInfo WabbajackVersionInfo; + public string WabbajackVersion; public Compiler(string mo2_folder) { @@ -276,7 +276,7 @@ namespace Wabbajack.Lib ModList = new ModList { GameType = GameRegistry.Games.Values.First(f => f.MO2Name == MO2Ini.General.gameName).Game, - WabbajackVersion = WabbajackVersionInfo, + WabbajackVersion = WabbajackVersion, Archives = SelectedArchives, Directives = InstallDirectives, Name = ModListName ?? MO2Profile, diff --git a/Wabbajack.Lib/Data.cs b/Wabbajack.Lib/Data.cs index e3bacf8d..4ee9e5d2 100644 --- a/Wabbajack.Lib/Data.cs +++ b/Wabbajack.Lib/Data.cs @@ -50,7 +50,7 @@ namespace Wabbajack.Lib /// /// The build version of Wabbajack used when compiling the Modlist /// - public FileVersionInfo WabbajackVersion; + public string WabbajackVersion; /// /// Install directives diff --git a/Wabbajack.Lib/ReportBuilder.cs b/Wabbajack.Lib/ReportBuilder.cs index 609e54fe..c6d09198 100644 --- a/Wabbajack.Lib/ReportBuilder.cs +++ b/Wabbajack.Lib/ReportBuilder.cs @@ -47,7 +47,7 @@ namespace Wabbajack.Lib public void Build(Compiler c, ModList lst) { Text($"### {lst.Name} by {lst.Author} - Installation Summary"); - Text($"Build with Wabbajack Version {lst.WabbajackVersion.FileVersion}"); + Text($"Build with Wabbajack Version {lst.WabbajackVersion}"); Text(lst.Description); Text($"#### Website:"); NoWrapText($"[{lst.Website}]({lst.Website})"); diff --git a/Wabbajack/AppState.cs b/Wabbajack/AppState.cs index 6496263c..9eea5bb0 100644 --- a/Wabbajack/AppState.cs +++ b/Wabbajack/AppState.cs @@ -34,7 +34,7 @@ namespace Wabbajack { public SlideShow Slideshow { get; } - public readonly FileVersionInfo WabbajackVersionInfo = FileVersionInfo.GetVersionInfo(Assembly.GetEntryAssembly().Location); + public readonly string WabbajackVersion = FileVersionInfo.GetVersionInfo(Assembly.GetEntryAssembly().Location).FileVersion; private string _mo2Folder; @@ -295,15 +295,15 @@ namespace Wabbajack HTMLReport = this.ModList.ReportHTML; Location = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); - var currentWJVersion = new Version(WabbajackVersionInfo.FileVersion); - var modlistWJVersion = new Version(modlist.WabbajackVersion.FileVersion); + var currentWJVersion = new Version(WabbajackVersion); + var modlistWJVersion = new Version(modlist.WabbajackVersion); if (currentWJVersion > modlistWJVersion) { MessageBox.Show( "The selected Modlist was build with an earlier version of Wabbajack. " + - $"Current Version: {WabbajackVersionInfo.FileVersion}, " + - $"Version used to build the Modlist: {modlist.WabbajackVersion.FileVersion}", + $"Current Version: {WabbajackVersion}, " + + $"Version used to build the Modlist: {modlist.WabbajackVersion}", "Information", MessageBoxButton.OK); } @@ -311,8 +311,8 @@ namespace Wabbajack { MessageBox.Show( "The selected Modlist was build with a newer version of Wabbajack. " + - $"Current Version: {WabbajackVersionInfo.FileVersion}, " + - $"Version used to build the Modlist: {modlist.WabbajackVersion.FileVersion}", + $"Current Version: {WabbajackVersion}, " + + $"Version used to build the Modlist: {modlist.WabbajackVersion}", "Information", MessageBoxButton.OK); } @@ -375,7 +375,7 @@ namespace Wabbajack ModListImage = ChangedProperties ? newImagePath : null, ModListWebsite = ChangedProperties ? this.Slideshow.NexusSiteURL : null, ModListReadme = ChangedProperties ? readmePath : null, - WabbajackVersionInfo = WabbajackVersionInfo + WabbajackVersion = WabbajackVersion }; var th = new Thread(() => {