From 37e64508fbfd5cfc29f5f172e85b3d2c1739569a Mon Sep 17 00:00:00 2001 From: EzioTheDeadPoet <52624146+EzioTheDeadPoet@users.noreply.github.com> Date: Wed, 2 Nov 2022 21:49:52 +0100 Subject: [PATCH 1/6] Addresses #2159 GOG Detection support for Skyrim Special Edition --- Wabbajack.DTOs/Game/GameRegistry.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Wabbajack.DTOs/Game/GameRegistry.cs b/Wabbajack.DTOs/Game/GameRegistry.cs index 08e2a10d..8f94346e 100644 --- a/Wabbajack.DTOs/Game/GameRegistry.cs +++ b/Wabbajack.DTOs/Game/GameRegistry.cs @@ -107,6 +107,12 @@ public static class GameRegistry MO2Name = "Skyrim Special Edition", MO2ArchiveName = "skyrimse", SteamIDs = new[] {489830}, + GOGIDs = new[] + { + 1711230643,// The Elder Scrolls V: Skyrim Special Edition AKA Base Game + 1801825368,// The Elder Scrolls V: Skyrim Anniversary Edition AKA The Store Bundle + 1162721350 // Upgrade DLC + }, RequiredFiles = new[] { "SkyrimSE.exe".ToRelativePath() From 92b657ba8215edec65cad8f3af1e84a718e7df83 Mon Sep 17 00:00:00 2001 From: erri120 Date: Fri, 4 Nov 2022 11:53:24 +0100 Subject: [PATCH 2/6] Always use process location for file association --- Wabbajack.App.Wpf/View Models/MainWindowVM.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Wabbajack.App.Wpf/View Models/MainWindowVM.cs b/Wabbajack.App.Wpf/View Models/MainWindowVM.cs index 2274dfab..e0eccb6f 100644 --- a/Wabbajack.App.Wpf/View Models/MainWindowVM.cs +++ b/Wabbajack.App.Wpf/View Models/MainWindowVM.cs @@ -151,7 +151,10 @@ namespace Wabbajack { var applicationRegistrationService = _serviceProvider.GetRequiredService(); - var applicationInfo = new ApplicationInfo("Wabbajack", "Wabbajack", "Wabbajack", location); + var processLocation = Process.GetCurrentProcess().MainModule?.FileName ?? + throw new NotSupportedException("Unable to get process information"); + + var applicationInfo = new ApplicationInfo("Wabbajack", "Wabbajack", "Wabbajack", processLocation); applicationInfo.SupportedExtensions.Add("wabbajack"); applicationRegistrationService.RegisterApplication(applicationInfo); } From d3d0a29bcbe8951f6e26c9f281a87297c6efa645 Mon Sep 17 00:00:00 2001 From: EzioTheDeadPoet <52624146+EzioTheDeadPoet@users.noreply.github.com> Date: Fri, 4 Nov 2022 17:41:45 +0100 Subject: [PATCH 3/6] correction --- Wabbajack.Compiler/CompilerSettings.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Wabbajack.Compiler/CompilerSettings.cs b/Wabbajack.Compiler/CompilerSettings.cs index 8dddaa71..57c97eff 100644 --- a/Wabbajack.Compiler/CompilerSettings.cs +++ b/Wabbajack.Compiler/CompilerSettings.cs @@ -64,7 +64,7 @@ public class CompilerSettings public RelativePath[] Include { get; set; } = Array.Empty(); /// - /// These files are inlined into the modlist + /// These files are ignored when compiling the modlist /// public RelativePath[] Ignore { get; set; } = Array.Empty(); From 7ca983e26a23164c20cbf426d6e9212a57342daf Mon Sep 17 00:00:00 2001 From: EzioTheDeadPoet <52624146+EzioTheDeadPoet@users.noreply.github.com> Date: Fri, 4 Nov 2022 20:28:33 +0100 Subject: [PATCH 4/6] compiler settings file picker QoL changes allow selection of files for including. allow selection of files for ignoring. allow multiselect for files and folders. allow multiselect for additional profiles. allow multiselect for always enabled mods. --- .../Views/Compilers/CompilerView.xaml | 12 +- .../Views/Compilers/CompilerView.xaml.cs | 126 ++++++++++++++---- 2 files changed, 111 insertions(+), 27 deletions(-) diff --git a/Wabbajack.App.Wpf/Views/Compilers/CompilerView.xaml b/Wabbajack.App.Wpf/Views/Compilers/CompilerView.xaml index c1fb0b94..b88638c3 100644 --- a/Wabbajack.App.Wpf/Views/Compilers/CompilerView.xaml +++ b/Wabbajack.App.Wpf/Views/Compilers/CompilerView.xaml @@ -165,7 +165,11 @@ - + + + @@ -179,7 +183,11 @@ - + + + diff --git a/Wabbajack.App.Wpf/Views/Compilers/CompilerView.xaml.cs b/Wabbajack.App.Wpf/Views/Compilers/CompilerView.xaml.cs index da3702f7..b5abf0f2 100644 --- a/Wabbajack.App.Wpf/Views/Compilers/CompilerView.xaml.cs +++ b/Wabbajack.App.Wpf/Views/Compilers/CompilerView.xaml.cs @@ -219,6 +219,7 @@ namespace Wabbajack .DisposeWith(disposables); AddInclude.Command = ReactiveCommand.CreateFromTask(async () => await AddIncludeCommand()); + AddIncludeFiles.Command = ReactiveCommand.CreateFromTask(async () => await AddIncludeFilesCommand()); ViewModel.WhenAnyValue(vm => vm.Ignore) .WhereNotNull() @@ -227,6 +228,7 @@ namespace Wabbajack .DisposeWith(disposables); AddIgnore.Command = ReactiveCommand.CreateFromTask(async () => await AddIgnoreCommand()); + AddIgnoreFiles.Command = ReactiveCommand.CreateFromTask(async () => await AddIgnoreFilesCommand()); }); @@ -258,16 +260,19 @@ namespace Wabbajack EnsurePathExists = true, EnsureReadOnly = false, EnsureValidNames = true, - Multiselect = false, + Multiselect = true, ShowPlacesList = true, }; if (dlg.ShowDialog() != CommonFileDialogResult.Ok) return; - var selectedPath = dlg.FileNames.First().ToAbsolutePath(); + foreach (var fileName in dlg.FileNames) + { + var selectedPath = fileName.ToAbsolutePath(); - if (!selectedPath.InFolder(ViewModel.Source)) return; - - ViewModel.AddAlwaysEnabled(selectedPath.RelativeTo(ViewModel.Source)); + if (!selectedPath.InFolder(ViewModel.Source)) continue; + + ViewModel.AddAlwaysEnabled(selectedPath.RelativeTo(ViewModel.Source)); + } } public async Task AddOtherProfileCommand() @@ -295,16 +300,19 @@ namespace Wabbajack EnsurePathExists = true, EnsureReadOnly = false, EnsureValidNames = true, - Multiselect = false, + Multiselect = true, ShowPlacesList = true, }; if (dlg.ShowDialog() != CommonFileDialogResult.Ok) return; - var selectedPath = dlg.FileNames.First().ToAbsolutePath(); - - if (!selectedPath.InFolder(ViewModel.Source.Combine("profiles"))) return; - - ViewModel.AddOtherProfile(selectedPath.FileName.ToString()); + foreach (var filename in dlg.FileNames) + { + var selectedPath = filename.ToAbsolutePath(); + + if (!selectedPath.InFolder(ViewModel.Source.Combine("profiles"))) continue; + + ViewModel.AddOtherProfile(selectedPath.FileName.ToString()); + } } public Task AddNoMatchIncludeCommand() @@ -321,16 +329,20 @@ namespace Wabbajack EnsurePathExists = true, EnsureReadOnly = false, EnsureValidNames = true, - Multiselect = false, + Multiselect = true, ShowPlacesList = true, }; if (dlg.ShowDialog() != CommonFileDialogResult.Ok) return Task.CompletedTask; - var selectedPath = dlg.FileNames.First().ToAbsolutePath(); + foreach (var filename in dlg.FileNames) + { + var selectedPath = filename.ToAbsolutePath(); - if (!selectedPath.InFolder(ViewModel.Source)) return Task.CompletedTask; + if (!selectedPath.InFolder(ViewModel.Source)) continue; + + ViewModel.AddNoMatchInclude(selectedPath.RelativeTo(ViewModel!.Source)); + } - ViewModel.AddNoMatchInclude(selectedPath.RelativeTo(ViewModel!.Source)); return Task.CompletedTask; } @@ -338,7 +350,7 @@ namespace Wabbajack { var dlg = new CommonOpenFileDialog { - Title = "Please select a file to include", + Title = "Please select folders to include", IsFolderPicker = true, InitialDirectory = ViewModel!.Source.ToString(), AddToMostRecentlyUsedList = false, @@ -348,23 +360,55 @@ namespace Wabbajack EnsurePathExists = true, EnsureReadOnly = false, EnsureValidNames = true, - Multiselect = false, + Multiselect = true, ShowPlacesList = true, }; if (dlg.ShowDialog() != CommonFileDialogResult.Ok) return; - var selectedPath = dlg.FileNames.First().ToAbsolutePath(); + foreach (var filename in dlg.FileNames) + { + var selectedPath = filename.ToAbsolutePath(); - if (!selectedPath.InFolder(ViewModel.Source)) return; + if (!selectedPath.InFolder(ViewModel.Source)) continue; - ViewModel.AddInclude(selectedPath.RelativeTo(ViewModel!.Source)); + ViewModel.AddInclude(selectedPath.RelativeTo(ViewModel!.Source)); + } + } + + public async Task AddIncludeFilesCommand() + { + var dlg = new CommonOpenFileDialog + { + Title = "Please select files to include", + IsFolderPicker = false, + InitialDirectory = ViewModel!.Source.ToString(), + AddToMostRecentlyUsedList = false, + AllowNonFileSystemItems = false, + DefaultDirectory = ViewModel!.Source.ToString(), + EnsureFileExists = true, + EnsurePathExists = true, + EnsureReadOnly = false, + EnsureValidNames = true, + Multiselect = true, + ShowPlacesList = true, + }; + + if (dlg.ShowDialog() != CommonFileDialogResult.Ok) return; + foreach (var filename in dlg.FileNames) + { + var selectedPath = filename.ToAbsolutePath(); + + if (!selectedPath.InFolder(ViewModel.Source)) continue; + + ViewModel.AddInclude(selectedPath.RelativeTo(ViewModel!.Source)); + } } public async Task AddIgnoreCommand() { var dlg = new CommonOpenFileDialog { - Title = "Please select a file to ignore", + Title = "Please select folders to ignore", IsFolderPicker = true, InitialDirectory = ViewModel!.Source.ToString(), AddToMostRecentlyUsedList = false, @@ -374,16 +418,48 @@ namespace Wabbajack EnsurePathExists = true, EnsureReadOnly = false, EnsureValidNames = true, - Multiselect = false, + Multiselect = true, ShowPlacesList = true, }; if (dlg.ShowDialog() != CommonFileDialogResult.Ok) return; - var selectedPath = dlg.FileNames.First().ToAbsolutePath(); + foreach (var filename in dlg.FileNames) + { + var selectedPath = filename.ToAbsolutePath(); - if (!selectedPath.InFolder(ViewModel.Source)) return; + if (!selectedPath.InFolder(ViewModel.Source)) continue; - ViewModel.AddIgnore(selectedPath.RelativeTo(ViewModel!.Source)); + ViewModel.AddIgnore(selectedPath.RelativeTo(ViewModel!.Source)); + } + } + + public async Task AddIgnoreFilesCommand() + { + var dlg = new CommonOpenFileDialog + { + Title = "Please select files to ignore", + IsFolderPicker = false, + InitialDirectory = ViewModel!.Source.ToString(), + AddToMostRecentlyUsedList = false, + AllowNonFileSystemItems = false, + DefaultDirectory = ViewModel!.Source.ToString(), + EnsureFileExists = true, + EnsurePathExists = true, + EnsureReadOnly = false, + EnsureValidNames = true, + Multiselect = true, + ShowPlacesList = true, + }; + + if (dlg.ShowDialog() != CommonFileDialogResult.Ok) return; + foreach (var filename in dlg.FileNames) + { + var selectedPath = filename.ToAbsolutePath(); + + if (!selectedPath.InFolder(ViewModel.Source)) continue; + + ViewModel.AddIgnore(selectedPath.RelativeTo(ViewModel!.Source)); + } } } } From 9985b02ff630d954a61485565bcec1fe9ef18b9a Mon Sep 17 00:00:00 2001 From: EzioTheDeadPoet <52624146+EzioTheDeadPoet@users.noreply.github.com> Date: Sat, 5 Nov 2022 00:57:34 +0100 Subject: [PATCH 5/6] add GOG notice for Skyrim Special Edition to README.md --- README.md | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 4aab392f..5f78af42 100644 --- a/README.md +++ b/README.md @@ -17,29 +17,29 @@ Wabbajack is an automated Modlist Installer that can reproduce an entire modding If you own a game on this list on the Epic Games Store, and the store isn't listed as suppoted, please get in touch on [Discord](https://discord.gg/wabbajack), so you can help us make Wabbajack support those versions as well. This is needed, since the EGS has no public database of its game IDs. -| Game | Platform | Versions | Notes | -|----------------------------|------------------------------|-------------------------------------|--------------| -| Morrowind | Steam, GOG, BethNet | | | -| Oblivion | Steam, GOG | Normal and GotY | | -| Fallout 3 | Steam, GOG | Normal and GotY | | -| Fallout New Vegas | Steam, GOG | Normal and region locked RU version | | -| Skyrim | Steam | | | -| Skyrim Special Edition | Steam | | | -| Enderal | Steam | | | -| Enderal Special Edition | Steam | | | -| Fallout 4 | Steam | | | -| Skyrim VR | Steam | | | -| Fallout 4 VR | Steam | | | -| Darkest Dungeon | Steam, GOG, Epic Games Store | | Experimental | -| The Witcher 3 | Steam, GOG | Normal and GotY | Experimental | -| Stardew Valley | Steam, GOG | | Experimental | -| Kingdom Come: Deliverance | Steam, GOG | | Experimental | -| Mechwarrior 5: Mercenaries | Epic Games Store | | Experimental | -| No Man's Sky | Steam, GOG | | Experimental | -| Dragon Age Origins | Stean, GOG, Origin | | Experimental | -| Dragon Age 2 | Steam, Origin | | Experimental | -| Dragon Age Inquisition | Steam, Origin | | Experimental | -| Kerbal Space Program | Steam, GOG | | Experimental | +| Game | Platform | Versions | Notes | +|----------------------------|------------------------------|-------------------------------------|--------------------------------------------| +| Morrowind | Steam, GOG, BethNet | | | +| Oblivion | Steam, GOG | Normal and GotY | | +| Fallout 3 | Steam, GOG | Normal and GotY | | +| Fallout New Vegas | Steam, GOG | Normal and region locked RU version | | +| Skyrim | Steam | | | +| Skyrim Special Edition | Steam, GOG | | Platform support varies between mod lists! | +| Enderal | Steam | | | +| Enderal Special Edition | Steam | | | +| Fallout 4 | Steam | | | +| Skyrim VR | Steam | | | +| Fallout 4 VR | Steam | | | +| Darkest Dungeon | Steam, GOG, Epic Games Store | | Experimental | +| The Witcher 3 | Steam, GOG | Normal and GotY | Experimental | +| Stardew Valley | Steam, GOG | | Experimental | +| Kingdom Come: Deliverance | Steam, GOG | | Experimental | +| Mechwarrior 5: Mercenaries | Epic Games Store | | Experimental | +| No Man's Sky | Steam, GOG | | Experimental | +| Dragon Age Origins | Stean, GOG, Origin | | Experimental | +| Dragon Age 2 | Steam, Origin | | Experimental | +| Dragon Age Inquisition | Steam, Origin | | Experimental | +| Kerbal Space Program | Steam, GOG | | Experimental | **Note about games marked with experimental support**: From 65b23794260c401939b16a9619dc3713a65eacc4 Mon Sep 17 00:00:00 2001 From: erri120 Date: Sat, 5 Nov 2022 12:28:34 +0100 Subject: [PATCH 6/6] Use both Assembly and Process locations --- Wabbajack.App.Wpf/View Models/MainWindowVM.cs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/Wabbajack.App.Wpf/View Models/MainWindowVM.cs b/Wabbajack.App.Wpf/View Models/MainWindowVM.cs index e0eccb6f..3ac56faa 100644 --- a/Wabbajack.App.Wpf/View Models/MainWindowVM.cs +++ b/Wabbajack.App.Wpf/View Models/MainWindowVM.cs @@ -132,12 +132,13 @@ namespace Wabbajack try { var assembly = Assembly.GetExecutingAssembly(); - var location = assembly.Location; - if (string.IsNullOrWhiteSpace(location)) - location = Process.GetCurrentProcess().MainModule?.FileName ?? throw new Exception("Assembly location is unavailable!"); + var assemblyLocation = assembly.Location; + var processLocation = Process.GetCurrentProcess().MainModule?.FileName ?? throw new Exception("Process location is unavailable!"); - _logger.LogInformation("App Location: {Location}", assembly.Location); - var fvi = FileVersionInfo.GetVersionInfo(location); + _logger.LogInformation("Assembly Location: {AssemblyLocation}", assemblyLocation); + _logger.LogInformation("Process Location: {ProcessLocation}", processLocation); + + var fvi = FileVersionInfo.GetVersionInfo(string.IsNullOrWhiteSpace(assemblyLocation) ? processLocation : assemblyLocation); Consts.CurrentMinimumWabbajackVersion = Version.Parse(fvi.FileVersion); VersionDisplay = $"v{fvi.FileVersion}"; AppName = "WABBAJACK " + VersionDisplay; @@ -151,9 +152,6 @@ namespace Wabbajack { var applicationRegistrationService = _serviceProvider.GetRequiredService(); - var processLocation = Process.GetCurrentProcess().MainModule?.FileName ?? - throw new NotSupportedException("Unable to get process information"); - var applicationInfo = new ApplicationInfo("Wabbajack", "Wabbajack", "Wabbajack", processLocation); applicationInfo.SupportedExtensions.Add("wabbajack"); applicationRegistrationService.RegisterApplication(applicationInfo);