diff --git a/CHANGELOG.md b/CHANGELOG.md index 73a860d2..57b4e65d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/Wabbajack.Common/Consts.cs b/Wabbajack.Common/Consts.cs index dffea35f..e5819c4c 100644 --- a/Wabbajack.Common/Consts.cs +++ b/Wabbajack.Common/Consts.cs @@ -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 GameESMs = new HashSet() { "Skyrim.esm", "Update.esm", "Dawnguard.esm", "HearthFires.esm", "Dragonborn.esm" }; - public static string WABBAJACK_ALWAYS_ENABLE = "WABBAJACK_ALWAYS_ENABLE"; } } diff --git a/Wabbajack/AppState.cs b/Wabbajack/AppState.cs index 653a61af..ce513b9e 100644 --- a/Wabbajack/AppState.cs +++ b/Wabbajack/AppState.cs @@ -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"; diff --git a/Wabbajack/Compiler.cs b/Wabbajack/Compiler.cs index 38d6a967..0a5ff4b1 100644 --- a/Wabbajack/Compiler.cs +++ b/Wabbajack/Compiler.cs @@ -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 IncludeAllConfigs() + { + return source => + { + if (!Consts.ConfigFileExtensions.Contains(Path.GetExtension(source.Path))) return null; + var result = source.EvolveTo(); + result.SourceData = File.ReadAllBytes(source.AbsolutePath).ToBase64(); + return result; + }; + } + private Func PatchStockESMs() { return source =>