mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Current Wabbajack must be newer than Wabbajack version of compiled Modlist
This commit is contained in:
parent
c5e11a2564
commit
77275dd30b
@ -11,6 +11,8 @@ namespace Wabbajack.Common
|
||||
{
|
||||
public static class Consts
|
||||
{
|
||||
public static Version? CurrentWabbajackVersion { get; set; }
|
||||
|
||||
public static bool TestMode { get; set; } = false;
|
||||
|
||||
public static RelativePath GameFolderFilesDir = (RelativePath)"Game Folder Files";
|
||||
|
@ -1,10 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Linq;
|
||||
using System.Reactive.Subjects;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Wabbajack.Common;
|
||||
@ -54,6 +56,8 @@ namespace Wabbajack.Lib
|
||||
public ACompiler(int steps)
|
||||
: base(steps)
|
||||
{
|
||||
//set in MainWindowVM
|
||||
WabbajackVersion = Consts.CurrentWabbajackVersion;
|
||||
}
|
||||
|
||||
public static void Info(string msg)
|
||||
|
@ -210,8 +210,10 @@ namespace Wabbajack
|
||||
ModListLocation.AdditionalError = this.WhenAny(x => x.ModList)
|
||||
.Select<ModListVM, IErrorResponse>(modList =>
|
||||
{
|
||||
if (modList == null) return ErrorResponse.Fail("ModList path resulted in a null object.");
|
||||
if (modList.Error != null) return ErrorResponse.Fail("ModList is corrupt", modList.Error);
|
||||
if (modList == null) return ErrorResponse.Fail("Modlist path resulted in a null object.");
|
||||
if (modList.Error != null) return ErrorResponse.Fail("Modlist is corrupt", modList.Error);
|
||||
if (modList.Version != null && modList.Version > Consts.CurrentWabbajackVersion)
|
||||
return ErrorResponse.Fail("The Modlist you are trying to install was made using a newer Version of Wabbajack. Please update Wabbajack before installing!");
|
||||
return ErrorResponse.Success;
|
||||
});
|
||||
|
||||
|
@ -120,6 +120,7 @@ namespace Wabbajack
|
||||
{
|
||||
var assembly = Assembly.GetExecutingAssembly();
|
||||
var fvi = FileVersionInfo.GetVersionInfo(assembly.Location);
|
||||
Consts.CurrentWabbajackVersion = Version.Parse(fvi.FileVersion);
|
||||
VersionDisplay = $"v{fvi.FileVersion}";
|
||||
Utils.Log($"Wabbajack Version: {fvi.FileVersion}");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user