refuse to run if MO2 is installed in non-portable mode

This commit is contained in:
Timothy Baldridge
2019-09-03 19:59:07 -06:00
parent 685f0d991d
commit 1b4b2d5bac
2 changed files with 17 additions and 1 deletions

View File

@ -16,6 +16,7 @@ to be a list of other profiles to be included in the install. This list should b
* Can now set the download folder both during compilation and installation. * Can now set the download folder both during compilation and installation.
* Any config files pointing to the download folder are remapped. * 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 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)
#### Version 0.8.1 - 8/29/2019 #### Version 0.8.1 - 8/29/2019
* Fixed a bug that was causing VFS temp folders not to be cleaned * Fixed a bug that was causing VFS temp folders not to be cleaned
@ -26,6 +27,7 @@ to be a list of other profiles to be included in the install. This list should b
TLDR: We now fully analyze a single archive before moving on to the next. TLDR: We now fully analyze a single archive before moving on to the next.
#### Version 0.8 - 8/26/2019 #### Version 0.8 - 8/26/2019
* Mod folders that contain ESMs with names matching the Skyrim core ESMs are assumed to be cleaned versions of the core * Mod folders that contain ESMs with names matching the Skyrim core ESMs are assumed to be cleaned versions of the core
game mods, and will be patched from the ESMs found in the game folder. **Note:** if you have also cleaned the files in the Skyrim game mods, and will be patched from the ESMs found in the game folder. **Note:** if you have also cleaned the files in the Skyrim

View File

@ -4,6 +4,7 @@ using System.Collections.ObjectModel;
using System.ComponentModel; using System.ComponentModel;
using System.Diagnostics; using System.Diagnostics;
using System.IO; using System.IO;
using System.Linq;
using System.Reflection; using System.Reflection;
using System.Threading; using System.Threading;
using System.Windows; using System.Windows;
@ -169,6 +170,19 @@ namespace Wabbajack
Environment.Exit(1); 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; _startTime = DateTime.Now;
LogFile = Assembly.GetExecutingAssembly().Location + ".log"; LogFile = Assembly.GetExecutingAssembly().Location + ".log";