mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Fixes for broken RGE install
This commit is contained in:
parent
6ea7adc4ea
commit
2136924161
@ -6,8 +6,8 @@
|
||||
<AssemblyName>wabbajack-cli</AssemblyName>
|
||||
<Company>Wabbajack</Company>
|
||||
<Platforms>x64</Platforms>
|
||||
<AssemblyVersion>2.2.1.4</AssemblyVersion>
|
||||
<FileVersion>2.2.1.4</FileVersion>
|
||||
<AssemblyVersion>2.2.1.5</AssemblyVersion>
|
||||
<FileVersion>2.2.1.5</FileVersion>
|
||||
<Copyright>Copyright © 2019-2020</Copyright>
|
||||
<Description>An automated ModList installer</Description>
|
||||
<PublishReadyToRun>true</PublishReadyToRun>
|
||||
|
@ -4,8 +4,8 @@
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<UseWPF>true</UseWPF>
|
||||
<AssemblyVersion>2.2.1.4</AssemblyVersion>
|
||||
<FileVersion>2.2.1.4</FileVersion>
|
||||
<AssemblyVersion>2.2.1.5</AssemblyVersion>
|
||||
<FileVersion>2.2.1.5</FileVersion>
|
||||
<Copyright>Copyright © 2019-2020</Copyright>
|
||||
<Description>Wabbajack Application Launcher</Description>
|
||||
<PublishReadyToRun>true</PublishReadyToRun>
|
||||
|
@ -196,9 +196,6 @@ namespace Wabbajack.Lib
|
||||
|
||||
Status($"Verifying unpatched file {toPatch.To.FileName}");
|
||||
var toFile = OutputFolder.Combine(toPatch.To);
|
||||
var hash = await toFile.FileHashAsync();
|
||||
if (hash != toPatch.FromHash)
|
||||
throw new InvalidDataException($"Invalid Hash for {toPatch.To} before patching");
|
||||
|
||||
byte[] patchData = await LoadBytesFromPath(toPatch.PatchID);
|
||||
|
||||
@ -213,18 +210,11 @@ namespace Wabbajack.Lib
|
||||
Utils.ApplyPatch(oldData, () => new MemoryStream(patchData), outStream);
|
||||
}
|
||||
|
||||
Status($"Verifying Patch {toPatch.To.FileName}");
|
||||
hash = await toFile.FileHashAsync();
|
||||
if (hash != toPatch.Hash)
|
||||
{
|
||||
Utils.Log($"NOTE: Invalid Hash for {toPatch.To} after patching {hash} vs {toPatch.Hash}");
|
||||
}
|
||||
|
||||
if (await VirusScanner.ShouldScan(toFile) &&
|
||||
await ClientAPI.GetVirusScanResult(toFile) == VirusScanner.Result.Malware)
|
||||
{
|
||||
await toFile.DeleteAsync();
|
||||
Utils.ErrorThrow(new Exception($"Virus scan of patched executable reported possible malware: {toFile.ToString()} ({(long)hash})"));
|
||||
Utils.ErrorThrow(new Exception($"Virus scan of patched executable reported possible malware: {toFile.ToString()} ({(long)await toFile.FileHashCachedAsync()})"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -31,6 +31,12 @@ namespace Wabbajack.Lib.NexusApi
|
||||
.SelectMany(d => d.ParentNode.ParentNode.GetClasses())
|
||||
.FirstOrDefault(perm => perm.StartsWith("permission-"));
|
||||
|
||||
var not_found = response.DocumentNode.Descendants()
|
||||
.Where(d => d.Id == $"{modId}-title")
|
||||
.Select(d => d.InnerText)
|
||||
.FirstOrDefault() == "Not found";
|
||||
if (not_found) return PermissionValue.NotFound;
|
||||
|
||||
return perm switch
|
||||
{
|
||||
"permission-no" => PermissionValue.No,
|
||||
@ -46,6 +52,7 @@ namespace Wabbajack.Lib.NexusApi
|
||||
Yes = 1,
|
||||
Maybe = 2,
|
||||
Hidden = 3,
|
||||
NotFound = 4
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -137,7 +137,9 @@ namespace Wabbajack.Server.DataLayer
|
||||
var results =
|
||||
await conn.QueryAsync<(int, long, int)>(@"SELECT NexusGameID, ModID, Permissions FROM NexusModPermissions WHERE Permissions = @Permissions
|
||||
UNION
|
||||
SELECT Game, ModID, @Permissions from dbo.NexusModFiles where JSON_QUERY(Data, '$.files') = '[]'",
|
||||
SELECT Game, mf.ModID, 3 from dbo.NexusModFiles mf
|
||||
LEFT JOIN NexusModPermissions mp on mf.Game = mp.NexusGameID AND mf.ModId = mp.ModID
|
||||
WHERE JSON_QUERY(Data, '$.files') = '[]' AND mp.Permissions != 4",
|
||||
new {Permissions = (int)HTMLInterface.PermissionValue.Hidden});
|
||||
return results.ToDictionary(f => (GameRegistry.ByNexusID[f.Item1], f.Item2),
|
||||
f => (HTMLInterface.PermissionValue)f.Item3);
|
||||
|
@ -3,8 +3,8 @@
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<AssemblyVersion>2.2.1.4</AssemblyVersion>
|
||||
<FileVersion>2.2.1.4</FileVersion>
|
||||
<AssemblyVersion>2.2.1.5</AssemblyVersion>
|
||||
<FileVersion>2.2.1.5</FileVersion>
|
||||
<Copyright>Copyright © 2019-2020</Copyright>
|
||||
<Description>Wabbajack Server</Description>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
|
@ -124,6 +124,8 @@ namespace Wabbajack.Test
|
||||
Assert.Equal(HTMLInterface.PermissionValue.No, await HTMLInterface.GetUploadPermissions(Game.SkyrimSpecialEdition, 266));
|
||||
Assert.Equal(HTMLInterface.PermissionValue.Yes, await HTMLInterface.GetUploadPermissions(Game.SkyrimSpecialEdition, 1137));
|
||||
Assert.Equal(HTMLInterface.PermissionValue.Hidden, await HTMLInterface.GetUploadPermissions(Game.SkyrimSpecialEdition, 34604));
|
||||
Assert.Equal(HTMLInterface.PermissionValue.NotFound, await HTMLInterface.GetUploadPermissions(Game.SkyrimSpecialEdition, 24287));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6,8 +6,8 @@
|
||||
<UseWPF>true</UseWPF>
|
||||
<Platforms>x64</Platforms>
|
||||
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
|
||||
<AssemblyVersion>2.2.1.4</AssemblyVersion>
|
||||
<FileVersion>2.2.1.4</FileVersion>
|
||||
<AssemblyVersion>2.2.1.5</AssemblyVersion>
|
||||
<FileVersion>2.2.1.5</FileVersion>
|
||||
<Copyright>Copyright © 2019-2020</Copyright>
|
||||
<Description>An automated ModList installer</Description>
|
||||
<PublishReadyToRun>true</PublishReadyToRun>
|
||||
|
Loading…
Reference in New Issue
Block a user