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
|
### Changelog
|
||||||
|
|
||||||
#### Version - 3.0.1.3 - 9/??/2022
|
#### Version - 3.0.1.3 - 9/20/2022
|
||||||
* Auto-include splash.png files when compiling
|
* Auto-include splash.png files when compiling
|
||||||
* Fix support for `WABBAJACK_NOMATCH_INCLUDE_FILES.txt` and other variants
|
* 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
|
#### Version - 3.0.1.2 - 9/19/2022
|
||||||
* Fix error with FNV BSAs not building properly when files are in the root folder
|
* 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");
|
yield return ErrorResponse.Fail("Install path isn't set to a folder");
|
||||||
if (installPath.InFolder(KnownFolders.Windows))
|
if (installPath.InFolder(KnownFolders.Windows))
|
||||||
yield return ErrorResponse.Fail("Don't install modlists into your Windows folder");
|
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,
|
Game = Game.StardewValley,
|
||||||
NexusName = "stardewvalley",
|
NexusName = "stardewvalley",
|
||||||
MO2Name = "Stardew Valley",
|
MO2Name = "Stardew Valley",
|
||||||
|
MO2ArchiveName = "stardewvalley",
|
||||||
NexusGameId = 1303,
|
NexusGameId = 1303,
|
||||||
SteamIDs = new[] {413150},
|
SteamIDs = new[] {413150},
|
||||||
GOGIDs = new[] {1453375253},
|
GOGIDs = new[] {1453375253},
|
||||||
|
@ -63,6 +63,7 @@ public class StandardInstaller : AInstaller<StandardInstaller>
|
|||||||
public override async Task<bool> Begin(CancellationToken token)
|
public override async Task<bool> Begin(CancellationToken token)
|
||||||
{
|
{
|
||||||
if (token.IsCancellationRequested) return false;
|
if (token.IsCancellationRequested) return false;
|
||||||
|
_logger.LogInformation("Installing: {Name} - {Version}", _configuration.ModList.Name, _configuration.ModList.Version);
|
||||||
await _wjClient.SendMetric(MetricNames.BeginInstall, ModList.Name);
|
await _wjClient.SendMetric(MetricNames.BeginInstall, ModList.Name);
|
||||||
NextStep(Consts.StepPreparing, "Configuring Installer", 0);
|
NextStep(Consts.StepPreparing, "Configuring Installer", 0);
|
||||||
_logger.LogInformation("Configuring Processor");
|
_logger.LogInformation("Configuring Processor");
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
|
||||||
namespace Wabbajack.Paths;
|
namespace Wabbajack.Paths;
|
||||||
|
|
||||||
@ -69,6 +71,18 @@ public struct AbsolutePath : IPath, IComparable<AbsolutePath>, IEquatable<Absolu
|
|||||||
|
|
||||||
public int Depth => Parts?.Length ?? 0;
|
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)
|
public AbsolutePath ReplaceExtension(Extension newExtension)
|
||||||
{
|
{
|
||||||
var paths = new string[Parts.Length];
|
var paths = new string[Parts.Length];
|
||||||
|
Loading…
Reference in New Issue
Block a user