mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Clean up some references try to get tests to work
This commit is contained in:
parent
8c79b795e1
commit
e4c78ebed9
@ -5,5 +5,6 @@
|
|||||||
<Workers>0</Workers>
|
<Workers>0</Workers>
|
||||||
<Scope>MethodLevel</Scope>
|
<Scope>MethodLevel</Scope>
|
||||||
</Parallelize>
|
</Parallelize>
|
||||||
|
<DisableAppDomain>True</DisableAppDomain>
|
||||||
</MSTest>
|
</MSTest>
|
||||||
</RunSettings>
|
</RunSettings>
|
@ -1,3 +1,4 @@
|
|||||||
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
|
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
|
||||||
<ReactiveUI />
|
<ReactiveUI />
|
||||||
|
<ModuleInit />
|
||||||
</Weavers>
|
</Weavers>
|
@ -5,6 +5,7 @@
|
|||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:all>
|
<xs:all>
|
||||||
<xs:element name="ReactiveUI" minOccurs="0" maxOccurs="1" type="xs:anyType" />
|
<xs:element name="ReactiveUI" minOccurs="0" maxOccurs="1" type="xs:anyType" />
|
||||||
|
<xs:element name="ModuleInit" minOccurs="0" maxOccurs="1" type="xs:anyType" />
|
||||||
</xs:all>
|
</xs:all>
|
||||||
<xs:attribute name="VerifyAssembly" type="xs:boolean">
|
<xs:attribute name="VerifyAssembly" type="xs:boolean">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
|
@ -9,18 +9,17 @@ using System.Threading;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Alphaleonis.Win32.Filesystem;
|
using Alphaleonis.Win32.Filesystem;
|
||||||
using CefSharp;
|
using CefSharp;
|
||||||
|
using CefSharp.OffScreen;
|
||||||
using Wabbajack.Common;
|
using Wabbajack.Common;
|
||||||
|
|
||||||
namespace Wabbajack.Lib.LibCefHelpers
|
namespace Wabbajack.Lib.LibCefHelpers
|
||||||
{
|
{
|
||||||
public static class Helpers
|
public static class Helpers
|
||||||
{
|
{
|
||||||
private static readonly Task _initTask;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// We bundle the cef libs inside the .exe, we need to extract them before loading any wpf code that requires them
|
/// We bundle the cef libs inside the .exe, we need to extract them before loading any wpf code that requires them
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private static async Task ExtractLibs()
|
private static void ExtractLibs()
|
||||||
{
|
{
|
||||||
if (File.Exists("cefsharp.7z") && File.Exists("libcef.dll")) return;
|
if (File.Exists("cefsharp.7z") && File.Exists("libcef.dll")) return;
|
||||||
|
|
||||||
@ -32,18 +31,15 @@ namespace Wabbajack.Lib.LibCefHelpers
|
|||||||
}
|
}
|
||||||
using (var wq = new WorkQueue(1))
|
using (var wq = new WorkQueue(1))
|
||||||
{
|
{
|
||||||
await FileExtractor.ExtractAll(wq, "cefsharp.7z", ".");
|
FileExtractor.ExtractAll(wq, "cefsharp.7z", ".").Wait();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static Helpers()
|
static Helpers()
|
||||||
{
|
{
|
||||||
_initTask = Task.Run(ExtractLibs);
|
ExtractLibs();
|
||||||
}
|
if (!Cef.IsInitialized)
|
||||||
|
Cef.Initialize(new CefSettings { MultiThreadedMessageLoop = true });
|
||||||
public static Task Initialize()
|
|
||||||
{
|
|
||||||
return _initTask;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static HttpClient GetClient(IEnumerable<Cookie> cookies, string referer)
|
public static HttpClient GetClient(IEnumerable<Cookie> cookies, string referer)
|
||||||
@ -112,5 +108,18 @@ namespace Wabbajack.Lib.LibCefHelpers
|
|||||||
public string Domain { get; set; }
|
public string Domain { get; set; }
|
||||||
public string Path { get; set; }
|
public string Path { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void Init()
|
||||||
|
{
|
||||||
|
// does nothing, but kicks off the static constructor
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class ModuleInitializer
|
||||||
|
{
|
||||||
|
public static void Initialize()
|
||||||
|
{
|
||||||
|
Helpers.Init();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -156,10 +156,6 @@
|
|||||||
<Compile Include="WebAutomation\CefSharpWrapper.cs" />
|
<Compile Include="WebAutomation\CefSharpWrapper.cs" />
|
||||||
<Compile Include="WebAutomation\IWebDriver.cs" />
|
<Compile Include="WebAutomation\IWebDriver.cs" />
|
||||||
<Compile Include="WebAutomation\WebAutomation.cs" />
|
<Compile Include="WebAutomation\WebAutomation.cs" />
|
||||||
<Compile Include="WebAutomation\WebAutomationWindow.xaml.cs">
|
|
||||||
<DependentUpon>WebAutomationWindow.xaml</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="WebAutomation\WebAutomationWindowViewModel.cs" />
|
|
||||||
<Compile Include="zEditIntegration.cs" />
|
<Compile Include="zEditIntegration.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@ -208,6 +204,9 @@
|
|||||||
<PackageReference Include="Microsoft.Toolkit.Wpf.UI.Controls.WebView">
|
<PackageReference Include="Microsoft.Toolkit.Wpf.UI.Controls.WebView">
|
||||||
<Version>6.0.0</Version>
|
<Version>6.0.0</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
<PackageReference Include="ModuleInit.Fody">
|
||||||
|
<Version>2.1.0</Version>
|
||||||
|
</PackageReference>
|
||||||
<PackageReference Include="Newtonsoft.Json">
|
<PackageReference Include="Newtonsoft.Json">
|
||||||
<Version>12.0.3</Version>
|
<Version>12.0.3</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
@ -233,12 +232,6 @@
|
|||||||
<Version>8.0.0</Version>
|
<Version>8.0.0</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<Page Include="WebAutomation\WebAutomationWindow.xaml">
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</Page>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup />
|
<ItemGroup />
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
</Project>
|
</Project>
|
@ -2,93 +2,54 @@
|
|||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
using CefSharp;
|
||||||
|
using CefSharp.OffScreen;
|
||||||
|
|
||||||
namespace Wabbajack.Lib.WebAutomation
|
namespace Wabbajack.Lib.WebAutomation
|
||||||
{
|
{
|
||||||
public enum DisplayMode
|
|
||||||
{
|
|
||||||
Visible,
|
|
||||||
Hidden
|
|
||||||
}
|
|
||||||
|
|
||||||
public class Driver : IDisposable
|
public class Driver : IDisposable
|
||||||
{
|
{
|
||||||
private WebAutomationWindow _window;
|
private IWebBrowser _browser;
|
||||||
private WebAutomationWindowViewModel _ctx;
|
private CefSharpWrapper _driver;
|
||||||
private Task<WebAutomationWindow> _windowTask;
|
|
||||||
|
|
||||||
private Driver(DisplayMode displayMode = DisplayMode.Hidden)
|
public Driver()
|
||||||
{
|
{
|
||||||
var windowTask = new TaskCompletionSource<WebAutomationWindow>();
|
_browser = new ChromiumWebBrowser();
|
||||||
|
_driver = new CefSharpWrapper(_browser);
|
||||||
var t = new Thread(() =>
|
|
||||||
{
|
|
||||||
_window = new WebAutomationWindow();
|
|
||||||
_ctx = (WebAutomationWindowViewModel)_window.DataContext;
|
|
||||||
// Initiates the dispatcher thread shutdown when the window closes
|
|
||||||
|
|
||||||
_window.Closed += (s, e) => _window.Dispatcher.InvokeShutdown();
|
|
||||||
|
|
||||||
if (displayMode == DisplayMode.Hidden)
|
|
||||||
{
|
|
||||||
_window.WindowState = WindowState.Minimized;
|
|
||||||
_window.ShowInTaskbar = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
_window.Show();
|
|
||||||
|
|
||||||
windowTask.SetResult(_window);
|
|
||||||
// Makes the thread support message pumping
|
|
||||||
System.Windows.Threading.Dispatcher.Run();
|
|
||||||
});
|
|
||||||
_windowTask = windowTask.Task;
|
|
||||||
|
|
||||||
t.SetApartmentState(ApartmentState.STA);
|
|
||||||
t.Start();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async Task<Driver> Create()
|
public static async Task<Driver> Create()
|
||||||
{
|
{
|
||||||
var driver = new Driver();
|
var driver = new Driver();
|
||||||
driver._window = await driver._windowTask;
|
await driver._driver.WaitForInitialized();
|
||||||
driver._ctx = (WebAutomationWindowViewModel) driver._window.DataContext;
|
|
||||||
return driver;
|
return driver;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task<Uri> NavigateTo(Uri uri)
|
public async Task<Uri> NavigateTo(Uri uri)
|
||||||
{
|
{
|
||||||
return _ctx.NavigateTo(uri);
|
await _driver.NavigateTo(uri);
|
||||||
|
return await GetLocation();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task<Uri> GetLocation()
|
public async ValueTask<Uri> GetLocation()
|
||||||
{
|
{
|
||||||
var tcs = new TaskCompletionSource<Uri>();
|
try
|
||||||
_window.Dispatcher.Invoke(() => tcs.SetResult(_window.WebView.Source));
|
{
|
||||||
return tcs.Task;
|
return new Uri(_browser.Address);
|
||||||
|
}
|
||||||
|
catch (UriFormatException)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task<string> GetAttr(string selector, string attr)
|
public Task<string> GetAttr(string selector, string attr)
|
||||||
{
|
{
|
||||||
var tcs = new TaskCompletionSource<string>();
|
return _driver.EvaluateJavaScript($"document.querySelector(\"{selector}\").{attr}");
|
||||||
_window.Dispatcher.Invoke(() =>
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var script = $"document.querySelector(\"{selector}\").{attr}";
|
|
||||||
var result = _window.WebView.InvokeScript("eval", script);
|
|
||||||
tcs.SetResult(result);
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
tcs.SetException(ex);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return tcs.Task;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
_window.Dispatcher.Invoke(_window.Close);
|
_browser.Dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
<Window x:Class="Wabbajack.WebAutomationWindow"
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
||||||
xmlns:local="clr-namespace:Wabbajack"
|
|
||||||
xmlns:controls="clr-namespace:Microsoft.Toolkit.Wpf.UI.Controls;assembly=Microsoft.Toolkit.Wpf.UI.Controls.WebView"
|
|
||||||
mc:Ignorable="d"
|
|
||||||
Title="WebAutomationWindow" Height="450" Width="800">
|
|
||||||
<Grid>
|
|
||||||
<controls:WebView Name="WebView">
|
|
||||||
</controls:WebView>
|
|
||||||
</Grid>
|
|
||||||
</Window>
|
|
@ -1,17 +0,0 @@
|
|||||||
using System.Windows;
|
|
||||||
using Wabbajack.Lib.WebAutomation;
|
|
||||||
|
|
||||||
namespace Wabbajack
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Interaction logic for WebAutomationWindow.xaml
|
|
||||||
/// </summary>
|
|
||||||
public partial class WebAutomationWindow : Window
|
|
||||||
{
|
|
||||||
public WebAutomationWindow()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
DataContext = new WebAutomationWindowViewModel(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,36 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Microsoft.Toolkit.Win32.UI.Controls.Interop.WinRT;
|
|
||||||
using Microsoft.Toolkit.Wpf.UI.Controls;
|
|
||||||
|
|
||||||
namespace Wabbajack.Lib.WebAutomation
|
|
||||||
{
|
|
||||||
public class WebAutomationWindowViewModel : ViewModel
|
|
||||||
{
|
|
||||||
private WebAutomationWindow _window;
|
|
||||||
|
|
||||||
private WebView Browser => _window.WebView;
|
|
||||||
|
|
||||||
public WebAutomationWindowViewModel(WebAutomationWindow window)
|
|
||||||
{
|
|
||||||
_window = window;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Task<Uri> NavigateTo(Uri uri)
|
|
||||||
{
|
|
||||||
var tcs = new TaskCompletionSource<Uri>();
|
|
||||||
|
|
||||||
EventHandler<WebViewControlNavigationCompletedEventArgs> handler = null;
|
|
||||||
handler = (s, e) =>
|
|
||||||
{
|
|
||||||
Browser.NavigationCompleted -= handler;
|
|
||||||
tcs.SetResult(uri);
|
|
||||||
};
|
|
||||||
Browser.NavigationCompleted += handler;
|
|
||||||
Browser.Source = uri;
|
|
||||||
return tcs.Task;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
using Wabbajack.Common;
|
using Wabbajack.Common;
|
||||||
using Wabbajack.Lib;
|
using Wabbajack.Lib;
|
||||||
@ -15,7 +16,7 @@ namespace Wabbajack.Test
|
|||||||
[TestInitialize]
|
[TestInitialize]
|
||||||
public async Task TestInitialize()
|
public async Task TestInitialize()
|
||||||
{
|
{
|
||||||
await Helpers.Initialize();
|
Helpers.Init();
|
||||||
Consts.TestMode = true;
|
Consts.TestMode = true;
|
||||||
|
|
||||||
utils = new TestUtils();
|
utils = new TestUtils();
|
||||||
|
@ -4,6 +4,8 @@ using System.Threading.Tasks;
|
|||||||
using System.Reactive.Disposables;
|
using System.Reactive.Disposables;
|
||||||
using System.Reactive.Linq;
|
using System.Reactive.Linq;
|
||||||
using Alphaleonis.Win32.Filesystem;
|
using Alphaleonis.Win32.Filesystem;
|
||||||
|
using CefSharp;
|
||||||
|
using CefSharp.OffScreen;
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
using Wabbajack.Common;
|
using Wabbajack.Common;
|
||||||
using Wabbajack.Common.StatusFeed;
|
using Wabbajack.Common.StatusFeed;
|
||||||
@ -12,6 +14,7 @@ using Wabbajack.Lib.Downloaders;
|
|||||||
using Wabbajack.Lib.LibCefHelpers;
|
using Wabbajack.Lib.LibCefHelpers;
|
||||||
using Wabbajack.Lib.NexusApi;
|
using Wabbajack.Lib.NexusApi;
|
||||||
using Wabbajack.Lib.Validation;
|
using Wabbajack.Lib.Validation;
|
||||||
|
using Wabbajack.Lib.WebAutomation;
|
||||||
using File = Alphaleonis.Win32.Filesystem.File;
|
using File = Alphaleonis.Win32.Filesystem.File;
|
||||||
using Game = Wabbajack.Common.Game;
|
using Game = Wabbajack.Common.Game;
|
||||||
|
|
||||||
@ -20,13 +23,17 @@ namespace Wabbajack.Test
|
|||||||
[TestClass]
|
[TestClass]
|
||||||
public class DownloaderTests
|
public class DownloaderTests
|
||||||
{
|
{
|
||||||
|
static DownloaderTests()
|
||||||
|
{
|
||||||
|
Helpers.Init();
|
||||||
|
}
|
||||||
|
|
||||||
public TestContext TestContext { get; set; }
|
public TestContext TestContext { get; set; }
|
||||||
|
|
||||||
[TestInitialize]
|
[TestInitialize]
|
||||||
public async Task Setup()
|
public async Task Setup()
|
||||||
{
|
{
|
||||||
await Helpers.Initialize();
|
Helpers.Init();
|
||||||
Utils.LogMessages.OfType<IInfo>().Subscribe(onNext: msg => TestContext.WriteLine(msg.ShortDescription));
|
Utils.LogMessages.OfType<IInfo>().Subscribe(onNext: msg => TestContext.WriteLine(msg.ShortDescription));
|
||||||
Utils.LogMessages.OfType<IUserIntervention>().Subscribe(msg =>
|
Utils.LogMessages.OfType<IUserIntervention>().Subscribe(msg =>
|
||||||
TestContext.WriteLine("ERROR: User intervetion required: " + msg.ShortDescription));
|
TestContext.WriteLine("ERROR: User intervetion required: " + msg.ShortDescription));
|
||||||
|
@ -32,8 +32,8 @@
|
|||||||
<PlatformTarget>x64</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<NoWarn>CS1998</NoWarn>
|
<NoWarn>CS1998</NoWarn>
|
||||||
<WarningsAsErrors>CS4014</WarningsAsErrors>
|
<WarningsAsErrors>CS4014</WarningsAsErrors>
|
||||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
|
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
<DebugType>pdbonly</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
@ -44,8 +44,8 @@
|
|||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<NoWarn>CS1998</NoWarn>
|
<NoWarn>CS1998</NoWarn>
|
||||||
<WarningsAsErrors>CS4014</WarningsAsErrors>
|
<WarningsAsErrors>CS4014</WarningsAsErrors>
|
||||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
|
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
@ -55,8 +55,8 @@
|
|||||||
<PlatformTarget>x64</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
|
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||||
<OutputPath>bin\x64\Release\</OutputPath>
|
<OutputPath>bin\x64\Release\</OutputPath>
|
||||||
@ -66,8 +66,8 @@
|
|||||||
<PlatformTarget>x64</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
|
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
@ -78,8 +78,8 @@
|
|||||||
<LangVersion>7.3</LangVersion>
|
<LangVersion>7.3</LangVersion>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
|
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||||
<OutputPath>bin\x86\Release\</OutputPath>
|
<OutputPath>bin\x86\Release\</OutputPath>
|
||||||
@ -90,10 +90,18 @@
|
|||||||
<LangVersion>7.3</LangVersion>
|
<LangVersion>7.3</LangVersion>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
|
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Reference Include="CefSharp.Core, Version=75.1.143.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=AMD64">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>..\..\..\Users\tbald\.nuget\packages\cefsharp.common\75.1.143\CefSharp\x64\CefSharp.Core.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="CefSharp.OffScreen, Version=75.1.143.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=AMD64">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>..\..\..\Users\tbald\.nuget\packages\cefsharp.offscreen\75.1.143\CefSharp\x64\CefSharp.OffScreen.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="PresentationCore" />
|
<Reference Include="PresentationCore" />
|
||||||
<Reference Include="PresentationFramework" />
|
<Reference Include="PresentationFramework" />
|
||||||
@ -161,8 +169,11 @@
|
|||||||
<PackageReference Include="AlphaFS">
|
<PackageReference Include="AlphaFS">
|
||||||
<Version>2.2.6</Version>
|
<Version>2.2.6</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="CefGlue.Wpf">
|
<PackageReference Include="CefSharp.Common">
|
||||||
<Version>75.1.28</Version>
|
<Version>75.1.143</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="CefSharp.OffScreen">
|
||||||
|
<Version>75.1.143</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="MSTest.TestAdapter">
|
<PackageReference Include="MSTest.TestAdapter">
|
||||||
<Version>2.0.0</Version>
|
<Version>2.0.0</Version>
|
||||||
|
@ -10,7 +10,6 @@ using ReactiveUI.Fody.Helpers;
|
|||||||
using Wabbajack.Lib;
|
using Wabbajack.Lib;
|
||||||
using Wabbajack.Lib.LibCefHelpers;
|
using Wabbajack.Lib.LibCefHelpers;
|
||||||
using Wabbajack.Lib.WebAutomation;
|
using Wabbajack.Lib.WebAutomation;
|
||||||
using Xilium.CefGlue.WPF;
|
|
||||||
|
|
||||||
namespace Wabbajack
|
namespace Wabbajack
|
||||||
{
|
{
|
||||||
@ -33,7 +32,6 @@ namespace Wabbajack
|
|||||||
public static async Task<WebBrowserVM> GetNew(string url = "http://www.wabbajack.org")
|
public static async Task<WebBrowserVM> GetNew(string url = "http://www.wabbajack.org")
|
||||||
{
|
{
|
||||||
// Make sure libraries are extracted first
|
// Make sure libraries are extracted first
|
||||||
await Helpers.Initialize();
|
|
||||||
return new WebBrowserVM(url);
|
return new WebBrowserVM(url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,7 @@ namespace Wabbajack
|
|||||||
|
|
||||||
public MainWindow()
|
public MainWindow()
|
||||||
{
|
{
|
||||||
|
Helpers.Init();
|
||||||
// Wire any unhandled crashing exceptions to log before exiting
|
// Wire any unhandled crashing exceptions to log before exiting
|
||||||
AppDomain.CurrentDomain.UnhandledException += (sender, e) =>
|
AppDomain.CurrentDomain.UnhandledException += (sender, e) =>
|
||||||
{
|
{
|
||||||
@ -32,7 +33,6 @@ namespace Wabbajack
|
|||||||
// Run some init tasks in background
|
// Run some init tasks in background
|
||||||
Task.Run(async () =>
|
Task.Run(async () =>
|
||||||
{
|
{
|
||||||
await Helpers.Initialize();
|
|
||||||
var appPath = System.Reflection.Assembly.GetExecutingAssembly().Location;
|
var appPath = System.Reflection.Assembly.GetExecutingAssembly().Location;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
|
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
|
||||||
xmlns:wabbajack="clr-namespace:Wabbajack"
|
xmlns:wabbajack="clr-namespace:Wabbajack"
|
||||||
xmlns:wpf="clr-namespace:Xilium.CefGlue.WPF;assembly=Xilium.CefGlue.WPF"
|
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="450" d:DesignWidth="800">
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
<UserControl.Resources>
|
<UserControl.Resources>
|
||||||
|
Loading…
Reference in New Issue
Block a user