This commit is contained in:
Timothy Baldridge 2021-07-11 16:23:44 -06:00
parent 13a567e705
commit ba3c3a43f1
6 changed files with 48 additions and 34 deletions

View File

@ -1,5 +1,10 @@
### Changelog
#### Version - 2.5.1.2 - 7/11/2021
* Fix issue with LL file upgrading
* Update GameFinder library to latest version
* Switch texture recompression to use TextConv for better compatability
#### Version - 2.5.1.1 - 7/9/2021
* Fix a bug with INI path remapping, was using case sensitive replace

View File

@ -6,8 +6,8 @@
<AssemblyName>wabbajack-cli</AssemblyName>
<Company>Wabbajack</Company>
<Platforms>x64</Platforms>
<AssemblyVersion>2.5.1.1</AssemblyVersion>
<FileVersion>2.5.1.1</FileVersion>
<AssemblyVersion>2.5.1.2</AssemblyVersion>
<FileVersion>2.5.1.2</FileVersion>
<Copyright>Copyright © 2019-2020</Copyright>
<Description>An automated ModList installer</Description>
<PublishReadyToRun>true</PublishReadyToRun>

View File

@ -79,33 +79,42 @@ namespace Wabbajack.ImageHashing
await ConvertImage(inFile, to.Parent, state.Width, state.Height, state.Format, ext);
}
public static async Task<ImageState> GetState(AbsolutePath path)
public static async Task<ImageState?> GetState(AbsolutePath path)
{
var ph = new ProcessHelper
{
Path = @"Tools\texdiag.exe".RelativeTo(AbsolutePath.EntryPoint), Arguments = new object[] {"info", path, "-nologo"},
ThrowOnNonZeroExitCode = true,
LogError = true
};
var lines = new List<string>();
using var _ = ph.Output.Where(p => p.Type == ProcessHelper.StreamType.Output)
.Select(p => p.Line)
.Where(p => p.Contains(" = "))
.Subscribe(l => lines.Add(l));
await ph.Start();
var data = lines.Select(l =>
{
var split = l.Split(" = ");
return (split[0].Trim(), split[1].Trim());
}).ToDictionary(p => p.Item1, p => p.Item2);
return new ImageState
{
Width = int.Parse(data["width"]),
Height = int.Parse(data["height"]),
Format = Enum.Parse<DXGI_FORMAT>(data["format"]),
PerceptualHash = await GetPHash(path)
};
}
{
Path = @"Tools\texdiag.exe".RelativeTo(AbsolutePath.EntryPoint),
Arguments = new object[] {"info", path, "-nologo"},
ThrowOnNonZeroExitCode = true,
LogError = true
};
var lines = new List<string>();
using var _ = ph.Output.Where(p => p.Type == ProcessHelper.StreamType.Output)
.Select(p => p.Line)
.Where(p => p.Contains(" = "))
.Subscribe(l => lines.Add(l));
try
{
await ph.Start();
}
catch (Exception ex)
{
return null;
}
var data = lines.Select(l =>
{
var split = l.Split(" = ");
return (split[0].Trim(), split[1].Trim());
}).ToDictionary(p => p.Item1, p => p.Item2);
return new ImageState
{
Width = int.Parse(data["width"]),
Height = int.Parse(data["height"]),
Format = Enum.Parse<DXGI_FORMAT>(data["format"]),
PerceptualHash = await GetPHash(path)
};
}
}
}

View File

@ -4,8 +4,8 @@
<OutputType>Exe</OutputType>
<TargetFramework>net5.0-windows</TargetFramework>
<UseWPF>true</UseWPF>
<AssemblyVersion>2.5.1.1</AssemblyVersion>
<FileVersion>2.5.1.1</FileVersion>
<AssemblyVersion>2.5.1.2</AssemblyVersion>
<FileVersion>2.5.1.2</FileVersion>
<Copyright>Copyright © 2019-2020</Copyright>
<Description>Wabbajack Application Launcher</Description>
<PublishReadyToRun>true</PublishReadyToRun>

View File

@ -3,8 +3,8 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0-windows</TargetFramework>
<AssemblyVersion>2.5.1.1</AssemblyVersion>
<FileVersion>2.5.1.1</FileVersion>
<AssemblyVersion>2.5.1.2</AssemblyVersion>
<FileVersion>2.5.1.2</FileVersion>
<Copyright>Copyright © 2019-2020</Copyright>
<Description>Wabbajack Server</Description>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>

View File

@ -6,8 +6,8 @@
<UseWPF>true</UseWPF>
<Platforms>x64</Platforms>
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
<AssemblyVersion>2.5.1.1</AssemblyVersion>
<FileVersion>2.5.1.1</FileVersion>
<AssemblyVersion>2.5.1.2</AssemblyVersion>
<FileVersion>2.5.1.2</FileVersion>
<Copyright>Copyright © 2019-2020</Copyright>
<Description>An automated ModList installer</Description>
<PublishReadyToRun>true</PublishReadyToRun>