mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
3.0.1.3
This commit is contained in:
parent
57edbffb5f
commit
801f655ef3
@ -1,8 +1,12 @@
|
||||
### Changelog
|
||||
|
||||
#### Version - 3.0.1.3 - 9/??/2022
|
||||
#### Version - 3.0.1.3 - 9/20/2022
|
||||
* Auto-include splash.png files when compiling
|
||||
* Fix support for `WABBAJACK_NOMATCH_INCLUDE_FILES.txt` and other variants
|
||||
* Fix missing MO2ArchiveName for stardewvalley
|
||||
* Write the name/version of the modlist to the log before installing
|
||||
* Refuse to install inside a Game folder or the a parent of a game folder
|
||||
* Refuse to install inside the Wabbajack folder or a parent of the Wabbajack folder
|
||||
|
||||
#### Version - 3.0.1.2 - 9/19/2022
|
||||
* Fix error with FNV BSAs not building properly when files are in the root folder
|
||||
|
@ -274,6 +274,29 @@ public class InstallerVM : BackNavigatingVM, IBackNavigatingVM, ICpuStatusVM
|
||||
yield return ErrorResponse.Fail("Install path isn't set to a folder");
|
||||
if (installPath.InFolder(KnownFolders.Windows))
|
||||
yield return ErrorResponse.Fail("Don't install modlists into your Windows folder");
|
||||
|
||||
foreach (var game in GameRegistry.Games)
|
||||
{
|
||||
if (!_gameLocator.TryFindLocation(game.Key, out var location))
|
||||
continue;
|
||||
|
||||
if (installPath.InFolder(location))
|
||||
yield return ErrorResponse.Fail("Can't install a modlist into a game folder");
|
||||
|
||||
if (location.ThisAndAllParents().Any(path => installPath == path))
|
||||
{
|
||||
yield return ErrorResponse.Fail(
|
||||
"Can't install in this path, installed files may overwrite important game files");
|
||||
}
|
||||
}
|
||||
|
||||
if (installPath.InFolder(KnownFolders.EntryPoint))
|
||||
yield return ErrorResponse.Fail("Can't install a modlist into the Wabbajack.exe path");
|
||||
|
||||
if (KnownFolders.EntryPoint.ThisAndAllParents().Any(path => installPath == path))
|
||||
{
|
||||
yield return ErrorResponse.Fail("Installing in this folder may overwrite Wabbajack");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -258,6 +258,7 @@ public static class GameRegistry
|
||||
Game = Game.StardewValley,
|
||||
NexusName = "stardewvalley",
|
||||
MO2Name = "Stardew Valley",
|
||||
MO2ArchiveName = "stardewvalley",
|
||||
NexusGameId = 1303,
|
||||
SteamIDs = new[] {413150},
|
||||
GOGIDs = new[] {1453375253},
|
||||
|
@ -63,6 +63,7 @@ public class StandardInstaller : AInstaller<StandardInstaller>
|
||||
public override async Task<bool> Begin(CancellationToken token)
|
||||
{
|
||||
if (token.IsCancellationRequested) return false;
|
||||
_logger.LogInformation("Installing: {Name} - {Version}", _configuration.ModList.Name, _configuration.ModList.Version);
|
||||
await _wjClient.SendMetric(MetricNames.BeginInstall, ModList.Name);
|
||||
NextStep(Consts.StepPreparing, "Configuring Installer", 0);
|
||||
_logger.LogInformation("Configuring Processor");
|
||||
|
@ -1,6 +1,8 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Wabbajack.Paths;
|
||||
|
||||
@ -69,6 +71,18 @@ public struct AbsolutePath : IPath, IComparable<AbsolutePath>, IEquatable<Absolu
|
||||
|
||||
public int Depth => Parts?.Length ?? 0;
|
||||
|
||||
public IEnumerable<AbsolutePath> ThisAndAllParents()
|
||||
{
|
||||
var p = this;
|
||||
while (true)
|
||||
{
|
||||
yield return p;
|
||||
if (p.Depth == 1)
|
||||
yield break;
|
||||
p = p.Parent;
|
||||
}
|
||||
}
|
||||
|
||||
public AbsolutePath ReplaceExtension(Extension newExtension)
|
||||
{
|
||||
var paths = new string[Parts.Length];
|
||||
|
Loading…
Reference in New Issue
Block a user