This commit is contained in:
Timothy Baldridge 2021-06-27 14:35:11 -06:00
parent a439a98a27
commit a56921e130
11 changed files with 78 additions and 30 deletions

View File

@ -1,5 +1,9 @@
### Changelog ### Changelog
#### Version - 2.5.0.4 - 6/27/2021
* Fix for NPE in Texture analysis compiler step
* Implemented attachment support in IPS4 sites
#### Version - 2.5.0.3 - 6/26/2021 #### Version - 2.5.0.3 - 6/26/2021
* HOTFIX: Fix "argument out of range" error when installing modlists * HOTFIX: Fix "argument out of range" error when installing modlists

View File

@ -40,7 +40,8 @@ namespace Wabbajack.CLI
typeof(VerifyAllDownloads), typeof(VerifyAllDownloads),
typeof(HashBenchmark), typeof(HashBenchmark),
typeof(StressTestURL), typeof(StressTestURL),
typeof(MirrorFolder) typeof(MirrorFolder),
typeof(DownloadFromMeta)
}; };
} }
} }

View File

@ -1,7 +1,8 @@
{ {
"profiles": { "profiles": {
"Wabbajack.CLI": { "Wabbajack.CLI": {
"commandName": "Project" "commandName": "Project",
"commandLineArgs": "download-from-meta -m c:\\tmp\\test.meta -o c:\\tmp\\out.7z"
} }
} }
} }

View File

@ -0,0 +1,38 @@
using System;
using System.Threading.Tasks;
using CommandLine;
using Wabbajack.Common;
using Wabbajack.Lib;
using Wabbajack.Lib.Downloaders;
using Wabbajack.Lib.LibCefHelpers;
namespace Wabbajack.CLI.Verbs
{
[Verb("download-from-meta", HelpText = "Download a file from a given .meta file")]
public class DownloadFromMeta : AVerb
{
[Option('m', "meta", Required = true, HelpText = "Meta to read from which to source the download")]
public string Meta { get; set; } = "";
[Option('o', "output", Required = true, HelpText = "Output file name")]
public string Output { get; set; } = "";
protected override async Task<ExitCode> Run()
{
var state = await DownloadDispatcher.ResolveArchive(((AbsolutePath)Meta).LoadIniFile(), true);
if (state == null)
{
Console.WriteLine("Cannot find downloader for input meta");
return ExitCode.Error;
}
var astate = (AbstractDownloadState)state;
Console.WriteLine($"Downloading {astate.PrimaryKeyString}");
await astate.Download(new Archive(astate), (AbsolutePath)Output);
return ExitCode.Ok;
}
}
}

View File

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

View File

@ -104,14 +104,14 @@ namespace Wabbajack.Common
} }
} }
public static RelativePath MetaIni = new RelativePath("meta.ini"); public static RelativePath MetaIni = new("meta.ini");
public static Extension IniExtension = new Extension(".ini"); public static Extension IniExtension = new(".ini");
public static Extension HashFileExtension = new Extension(".xxHash"); public static Extension HashFileExtension = new(".xxHash");
public static Extension MetaFileExtension = new Extension(".meta"); public static Extension MetaFileExtension = new(".meta");
public const string ModListExtensionString = ".wabbajack"; public const string ModListExtensionString = ".wabbajack";
public static Extension ModListExtension = new Extension(ModListExtensionString); public static Extension ModListExtension = new(ModListExtensionString);
public static AbsolutePath LocalAppDataPath => new AbsolutePath(Path.Combine(KnownFolders.LocalAppData.Path, "Wabbajack")); public static AbsolutePath LocalAppDataPath => new(Path.Combine(KnownFolders.LocalAppData.Path, "Wabbajack"));
public static AbsolutePath FaviconCacheFolderPath => LocalAppDataPath.Combine("favicons"); public static AbsolutePath FaviconCacheFolderPath => LocalAppDataPath.Combine("favicons");
public static string MetricsKeyHeader => "x-metrics-key"; public static string MetricsKeyHeader => "x-metrics-key";
@ -136,8 +136,8 @@ namespace Wabbajack.Common
public static AbsolutePath EntryPoint => (AbsolutePath)(Assembly.GetEntryAssembly()?.Location ?? (string)((RelativePath)"Unknown").RelativeToWorkingDirectory()); public static AbsolutePath EntryPoint => (AbsolutePath)(Assembly.GetEntryAssembly()?.Location ?? (string)((RelativePath)"Unknown").RelativeToWorkingDirectory());
public static AbsolutePath LogFile => LogsFolder.Combine(EntryPoint.FileNameWithoutExtension + ".current.log"); public static AbsolutePath LogFile => LogsFolder.Combine(EntryPoint.FileNameWithoutExtension + ".current.log");
public static int MaxOldLogs = 50; public static int MaxOldLogs = 50;
public static Extension BSA = new Extension(".BSA"); public static Extension BSA = new(".BSA");
public static Extension MOHIDDEN = new Extension(".mohidden"); public static Extension MOHIDDEN = new(".mohidden");
public static AbsolutePath SettingsFile => LocalAppDataPath.Combine("settings.json"); public static AbsolutePath SettingsFile => LocalAppDataPath.Combine("settings.json");
public static RelativePath SettingsIni = (RelativePath)"settings.ini"; public static RelativePath SettingsIni = (RelativePath)"settings.ini";

View File

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

View File

@ -87,21 +87,24 @@ namespace Wabbajack.Lib.LibCefHelpers
public static Func<IBrowser, IFrame, string, IRequest, IResourceHandler>? SchemeHandler { get; set; } public static Func<IBrowser, IFrame, string, IRequest, IResourceHandler>? SchemeHandler { get; set; }
private static object _initLock = new object();
public static void Init() public static void Init()
{ {
if (Inited || Cef.IsInitialized) return; lock (_initLock)
Inited = true;
CefSettings settings = new CefSettings();
settings.CachePath = Consts.CefCacheLocation.ToString();
settings.JavascriptFlags = "--noexpose_wasm";
settings.RegisterScheme(new CefCustomScheme()
{ {
SchemeName = "wabbajack", if (Inited || Cef.IsInitialized) return;
SchemeHandlerFactory = new SchemeHandlerFactor() Inited = true;
}); CefSettings settings = new CefSettings();
settings.CachePath = Consts.CefCacheLocation.ToString();
settings.JavascriptFlags = "--noexpose_wasm";
Cef.Initialize(settings); settings.RegisterScheme(new CefCustomScheme()
{
SchemeName = "wabbajack", SchemeHandlerFactory = new SchemeHandlerFactor()
});
Cef.Initialize(settings);
}
} }
private class SchemeHandlerFactor : ISchemeHandlerFactory private class SchemeHandlerFactor : ISchemeHandlerFactory

View File

@ -25,6 +25,7 @@ namespace Wabbajack.Lib.WebAutomation
} }
public static async Task<Driver> Create() public static async Task<Driver> Create()
{ {
Helpers.Init();
var driver = new Driver(); var driver = new Driver();
await driver._driver.WaitForInitialized(); await driver._driver.WaitForInitialized();
return driver; return driver;

View File

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

View File

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