Changed version type to string

This commit is contained in:
erri120 2019-10-23 19:00:45 +02:00
parent b42c2fcd3c
commit 9515947734
No known key found for this signature in database
GPG Key ID: A8C0A18D8D4D3135
4 changed files with 12 additions and 12 deletions

View File

@ -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,

View File

@ -50,7 +50,7 @@ namespace Wabbajack.Lib
/// <summary>
/// The build version of Wabbajack used when compiling the Modlist
/// </summary>
public FileVersionInfo WabbajackVersion;
public string WabbajackVersion;
/// <summary>
/// Install directives

View File

@ -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})");

View File

@ -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(() =>
{