This commit is contained in:
Timothy Baldridge 2019-09-04 14:49:13 -06:00
parent 5f2c382e19
commit 4cfd2f245f
4 changed files with 16 additions and 14 deletions

View File

@ -17,6 +17,7 @@ to be a list of other profiles to be included in the install. This list should b
* Any config files pointing to the download folder are remapped.
* Refuse to run inside `downloads` folders (anti-virus watches these files too closely and it can cause VFS issues)
* Refuse to run if MO2 is on the system installed in non-portable mode (otherwise broken installs may result)
* Config files that don't otherwise match a rule are inlined into the modlist
#### Version 0.8.1 - 8/29/2019
* Fixed a bug that was causing VFS temp folders not to be cleaned

View File

@ -33,6 +33,7 @@ namespace Wabbajack.Common
public static string NexusCacheDirectory = "nexus_link_cache";
public static string WABBAJACK_INCLUDE = "WABBAJACK_INCLUDE";
public static string WABBAJACK_ALWAYS_ENABLE = "WABBAJACK_ALWAYS_ENABLE";
public static string GAME_PATH_MAGIC_BACK = "{--||GAME_PATH_MAGIC_BACK||--}";
public static string GAME_PATH_MAGIC_DOUBLE_BACK = "{--||GAME_PATH_MAGIC_DOUBLE_BACK||--}";
@ -51,6 +52,5 @@ namespace Wabbajack.Common
public static string HashCacheName = "Wabbajack.hash_cache";
public static HashSet<string> GameESMs = new HashSet<string>() { "Skyrim.esm", "Update.esm", "Dawnguard.esm", "HearthFires.esm", "Dragonborn.esm" };
public static string WABBAJACK_ALWAYS_ENABLE = "WABBAJACK_ALWAYS_ENABLE";
}
}

View File

@ -170,19 +170,6 @@ namespace Wabbajack
Environment.Exit(1);
}
if (Directory.EnumerateDirectories(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "ModOrganizer"))
.Any(f => !f.EndsWith("\\cache")))
{
MessageBox.Show(
"You seem to have a installed copy of Mod Organizer 2 on your system. Wabbajack requires that Mod Organizer 2 be run in `Portable` mode. " +
"Unfortunately it is impossible to have both portable and non-portable versions of MO2 on the same system at the same time. Pleas uninstall Mod Organizer 2 " +
"and use only portable (archive) versions with Wabbajack. If you get this message after uninstalling MO2, be sure to delete the folders in `AppData\\Local\\Mod Organizer`",
"Cannot run with non-portable MO2 installed.",
MessageBoxButton.OK,
MessageBoxImage.Error);
Environment.Exit(2);
}
_startTime = DateTime.Now;
LogFile = Assembly.GetExecutingAssembly().Location + ".log";

View File

@ -12,6 +12,7 @@ using System.Security.Cryptography;
using System.Text;
using System.Text.RegularExpressions;
using System.Web;
using System.Windows.Documents;
using CommonMark;
using Wabbajack.Common;
using static Wabbajack.NexusAPI;
@ -585,10 +586,23 @@ namespace Wabbajack
PatchStockESMs(),
IncludeAllConfigs(),
DropAll()
};
}
private Func<RawSourceFile, Directive> IncludeAllConfigs()
{
return source =>
{
if (!Consts.ConfigFileExtensions.Contains(Path.GetExtension(source.Path))) return null;
var result = source.EvolveTo<InlineFile>();
result.SourceData = File.ReadAllBytes(source.AbsolutePath).ToBase64();
return result;
};
}
private Func<RawSourceFile, Directive> PatchStockESMs()
{
return source =>