Merge pull request #371 from wabbajack-tools/standard-wabbajack-lib-again

Wabbajack.Lib is now .NET Standard 2.0
This commit is contained in:
Timothy Baldridge 2020-01-07 07:01:35 -08:00 committed by GitHub
commit 45a77425ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
26 changed files with 188 additions and 333 deletions

View File

@ -4,7 +4,6 @@ using System.Linq;
using System.Linq.Expressions;
using System.Security.Policy;
using System.Threading.Tasks;
using Windows.Media.Playback;
using MongoDB.Driver;
using MongoDB.Driver.Linq;
using Nancy;

View File

@ -1,4 +1,5 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data.HashFunction.xxHash;
using System.Diagnostics;
@ -1122,6 +1123,20 @@ namespace Wabbajack.Common
return path.ToLower().TrimEnd('\\').StartsWith(parent.ToLower().TrimEnd('\\') + "\\");
}
public static HashSet<T> ToHashSet<T>(this IEnumerable<T> coll)
{
var hs = new HashSet<T>();
coll.Do(v => hs.Add(v));
return hs;
}
public static HashSet<T> ToHashSet<T>(this T[] coll)
{
var hs = new HashSet<T>();
coll.Do(v => hs.Add(v));
return hs;
}
public class NexusErrorResponse
{
public int code;

View File

@ -5,35 +5,35 @@
<Platforms>AnyCPU;x64</Platforms>
</PropertyGroup>
<ItemGroup>
<None Remove="7z.dll.gz" />
<None Remove="7z.exe.gz" />
<None Remove="innounp.exe.gz" />
<None Remove="7z.dll.gz" />
<None Remove="7z.exe.gz" />
<None Remove="innounp.exe.gz" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="7z.dll.gz" />
<EmbeddedResource Include="7z.exe.gz" />
<EmbeddedResource Include="innounp.exe.gz" />
<EmbeddedResource Include="7z.dll.gz" />
<EmbeddedResource Include="7z.exe.gz" />
<EmbeddedResource Include="innounp.exe.gz" />
</ItemGroup>
<ItemGroup>
<Folder Include="KnownFolders\" />
<Folder Include="Properties\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Ceras" Version="4.1.7" />
<PackageReference Include="Genbox.AlphaFS" Version="2.2.2.1" />
<PackageReference Include="ini-parser-netstandard" Version="2.5.2" />
<PackageReference Include="Microsoft.Win32.Registry" Version="4.7.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="ReactiveUI" Version="11.1.1" />
<PackageReference Include="SharpZipLib" Version="1.2.0" />
<PackageReference Include="System.Data.HashFunction.xxHash" Version="2.0.0" />
<PackageReference Include="System.Security.Cryptography.ProtectedData" Version="4.7.0" />
<PackageReference Include="System.Security.Principal.Windows" Version="4.7.0" />
<PackageReference Include="YamlDotNet" Version="8.0.0" />
<PackageReference Include="Ceras" Version="4.1.7" />
<PackageReference Include="Genbox.AlphaFS" Version="2.2.2.1" />
<PackageReference Include="ini-parser-netstandard" Version="2.5.2" />
<PackageReference Include="Microsoft.Win32.Registry" Version="4.7.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="ReactiveUI" Version="11.1.1" />
<PackageReference Include="SharpZipLib" Version="1.2.0" />
<PackageReference Include="System.Data.HashFunction.xxHash" Version="2.0.0" />
<PackageReference Include="System.Security.Cryptography.ProtectedData" Version="4.7.0" />
<PackageReference Include="System.Security.Principal.Windows" Version="4.7.0" />
<PackageReference Include="YamlDotNet" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Compression.BSA\Compression.BSA.csproj" />
<ProjectReference Include="..\OMODExtractor\OMODExtractor.csproj" />
<ProjectReference Include="..\Wabbajack.Common.CSP\Wabbajack.Common.CSP.csproj" />
<ProjectReference Include="..\Compression.BSA\Compression.BSA.csproj" />
<ProjectReference Include="..\OMODExtractor\OMODExtractor.csproj" />
<ProjectReference Include="..\Wabbajack.Common.CSP\Wabbajack.Common.CSP.csproj" />
</ItemGroup>
</Project>

View File

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Alphaleonis.Win32.Filesystem;
using Wabbajack.Common;
@ -28,12 +29,15 @@ namespace Wabbajack.Lib
public ModList ModList { get; private set; }
public Dictionary<string, string> HashedArchives { get; set; }
public AInstaller(string archive, ModList modList, string outputFolder, string downloadFolder)
public SystemParameters SystemParameters { get; set; }
public AInstaller(string archive, ModList modList, string outputFolder, string downloadFolder, SystemParameters parameters)
{
ModList = modList;
ModListArchive = archive;
OutputFolder = outputFolder;
DownloadFolder = downloadFolder;
SystemParameters = parameters;
}
public void Info(string msg)
@ -108,7 +112,7 @@ namespace Wabbajack.Lib
Info("Building Folder Structure");
ModList.Directives
.Select(d => Path.Combine(OutputFolder, Path.GetDirectoryName(d.To)))
.ToHashSet()
.Distinct()
.Do(f =>
{
if (Directory.Exists(f)) return;

View File

@ -15,7 +15,7 @@ namespace Wabbajack.Lib.CompilationSteps
public IgnoreDisabledMods(ACompiler compiler) : base(compiler)
{
_mo2Compiler = (MO2Compiler) compiler;
var alwaysEnabled = _mo2Compiler.ModInis.Where(f => IsAlwaysEnabled(f.Value)).Select(f => f.Key).ToHashSet();
var alwaysEnabled = _mo2Compiler.ModInis.Where(f => IsAlwaysEnabled(f.Value)).Select(f => f.Key).Distinct();
_allEnabledMods = _mo2Compiler.SelectedProfiles
.SelectMany(p => File.ReadAllLines(Path.Combine(_mo2Compiler.MO2Folder, "profiles", p, "modlist.txt")))

View File

@ -1,8 +1,8 @@
using System.Net.Http;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Web;
using Wabbajack.Common;
using Wabbajack.Lib.Exceptions;
using Wabbajack.Lib.Validation;
namespace Wabbajack.Lib.Downloaders

View File

@ -7,11 +7,10 @@ using System.Net.Http;
using System.Net.Http.Headers;
using System.Reflection.Emit;
using System.Threading.Tasks;
using System.Web;
using Windows.Networking.BackgroundTransfer;
using Ceras;
using SharpCompress.Common;
using Wabbajack.Common;
using Wabbajack.Lib.Exceptions;
using Wabbajack.Lib.Validation;
using File = Alphaleonis.Win32.Filesystem.File;

View File

@ -5,8 +5,8 @@ using System.Linq;
using System.Reactive.Linq;
using System.Reactive.Subjects;
using System.Threading.Tasks;
using Syroot.Windows.IO;
using Wabbajack.Common;
using Wabbajack.Common.IO;
using Wabbajack.Lib.Validation;
using File = System.IO.File;

View File

@ -0,0 +1,17 @@
using System;
namespace Wabbajack.Lib.Exceptions
{
public class HttpException : Exception
{
public string Reason { get; set; }
public int Code { get; set; }
public HttpException(int code, string reason) : base($"Http Error {code} - {reason}")
{
Code = code;
Reason = reason;
}
}
}

View File

@ -30,12 +30,13 @@ namespace Wabbajack.Lib
public string GameFolder { get; set; }
public MO2Installer(string archive, ModList modList, string outputFolder, string downloadFolder)
public MO2Installer(string archive, ModList modList, string outputFolder, string downloadFolder, SystemParameters parameters)
: base(
archive: archive,
modList: modList,
outputFolder: outputFolder,
downloadFolder: downloadFolder)
downloadFolder: downloadFolder,
parameters: parameters)
{
}
@ -280,8 +281,8 @@ namespace Wabbajack.Lib
if (data.Sections["Display"]["iSize W"] != null && data.Sections["Display"]["iSize H"] != null)
{
data.Sections["Display"]["iSize W"] = SystemParameters.PrimaryScreenWidth.ToString(CultureInfo.CurrentCulture);
data.Sections["Display"]["iSize H"] = SystemParameters.PrimaryScreenHeight.ToString(CultureInfo.CurrentCulture);
data.Sections["Display"]["iSize W"] = SystemParameters.ScreenWidth.ToString(CultureInfo.CurrentCulture);
data.Sections["Display"]["iSize H"] = SystemParameters.ScreenHeight.ToString(CultureInfo.CurrentCulture);
}
parser.WriteFile(file, data);

View File

@ -1,9 +1,9 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
using System.Windows.Media.Imaging;
using Newtonsoft.Json;
using Wabbajack.Common;
using File = System.IO.File;
@ -45,7 +45,7 @@ namespace Wabbajack.Lib.ModListRegistry
public string ImageUri { get; set; }
[JsonIgnore]
public BitmapImage Image { get; set; }
public Bitmap Image { get; set; }
[JsonProperty("readme")]
public string Readme { get; set; }

View File

@ -8,17 +8,12 @@ using System.Net.Http;
using System.Net.Http.Headers;
using System.Reflection;
using System.Security.Authentication;
using System.Text;
using System.Threading.Tasks;
using Wabbajack.Common;
using Wabbajack.Lib.Downloaders;
using Wabbajack.Lib.LibCefHelpers;
using WebSocketSharp;
using static Wabbajack.Lib.NexusApi.NexusApiUtils;
using System.Threading;
using CefSharp;
using CefSharp.Handler;
using Newtonsoft.Json;
using Wabbajack.Lib.WebAutomation;
namespace Wabbajack.Lib.NexusApi

View File

@ -1,35 +0,0 @@
using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Wabbajack.Lib")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Wabbajack.Lib")]
[assembly: AssemblyCopyright("Copyright © 2019")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("0a820830-a298-497d-85e0-e9a89efef5fe")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -129,7 +129,7 @@ namespace Wabbajack.Lib
.Concat(lst.Directives
.OfType<PatchedFromArchive>()
.Select(f => (f.To, "patched", SizeForID(f.PatchID))))
.ToHashSet()
.Distinct()
.OrderByDescending(f => f.Item3);
NoWrapText("\n\n### Summary of inlined files in this installer");

View File

@ -0,0 +1,8 @@
namespace Wabbajack.Lib
{
public class SystemParameters
{
public int ScreenHeight { get; set; }
public int ScreenWidth { get; set; }
}
}

View File

@ -7,8 +7,8 @@ using System.Text;
using System.Threading.Tasks;
using System.Threading;
using Newtonsoft.Json;
using Syroot.Windows.IO;
using Wabbajack.Common;
using Wabbajack.Common.IO;
using Wabbajack.Common.StoreHandlers;
using Wabbajack.Lib.CompilationSteps;
using Wabbajack.Lib.NexusApi;

View File

@ -20,12 +20,13 @@ namespace Wabbajack.Lib
public override ModManager ModManager => ModManager.Vortex;
public VortexInstaller(string archive, ModList modList, string outputFolder, string downloadFolder)
public VortexInstaller(string archive, ModList modList, string outputFolder, string downloadFolder, SystemParameters parameters)
: base(
archive: archive,
modList: modList,
outputFolder: outputFolder,
downloadFolder: downloadFolder)
downloadFolder: downloadFolder,
parameters: parameters)
{
#if DEBUG
// TODO: only for testing

View File

@ -1,250 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{0A820830-A298-497D-85E0-E9A89EFEF5FE}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Wabbajack.Lib</RootNamespace>
<AssemblyName>Wabbajack.Lib</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x64</PlatformTarget>
<NoWarn>CS1998</NoWarn>
<WarningsAsErrors>CS4014</WarningsAsErrors>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoWarn>CS1998</NoWarn>
<WarningsAsErrors>CS4014</WarningsAsErrors>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningsAsErrors>CS4014</WarningsAsErrors>
<NoWarn>CS1998</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<WarningsAsErrors>CS4014</WarningsAsErrors>
<NoWarn>CS1998</NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="MongoDB.Bson">
<HintPath>..\..\..\Users\tbald\.nuget\packages\mongodb.bson\2.10.0\lib\net452\MongoDB.Bson.dll</HintPath>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Design" />
<Reference Include="System.Drawing" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Net" />
<Reference Include="System.Security" />
<Reference Include="System.Transactions" />
<Reference Include="System.Web" />
<Reference Include="System.Windows" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xaml" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="ABatchProcessor.cs" />
<Compile Include="ACompiler.cs" />
<Compile Include="AInstaller.cs" />
<Compile Include="CerasConfig.cs" />
<Compile Include="CompilationSteps\ACompilationStep.cs" />
<Compile Include="CompilationSteps\CompilationErrors\InvalidGameESMError.cs" />
<Compile Include="CompilationSteps\DeconstructBSAs.cs" />
<Compile Include="CompilationSteps\DirectMatch.cs" />
<Compile Include="CompilationSteps\DropAll.cs" />
<Compile Include="CompilationSteps\IgnoreDisabledMods.cs" />
<Compile Include="CompilationSteps\IgnoreDisabledVortexMods.cs" />
<Compile Include="CompilationSteps\IgnoreEndsWith.cs" />
<Compile Include="CompilationSteps\IgnoreGameFiles.cs" />
<Compile Include="CompilationSteps\IgnoreGameFilesIfGameFolderFilesExist.cs" />
<Compile Include="CompilationSteps\IgnorePathContains.cs" />
<Compile Include="CompilationSteps\IgnoreRegex.cs" />
<Compile Include="CompilationSteps\IgnoreStartsWith.cs" />
<Compile Include="CompilationSteps\IgnoreVortex.cs" />
<Compile Include="CompilationSteps\IgnoreWabbajackInstallCruft.cs" />
<Compile Include="CompilationSteps\IncludeAll.cs" />
<Compile Include="CompilationSteps\IncludeAllConfigs.cs" />
<Compile Include="CompilationSteps\IncludeDummyESPs.cs" />
<Compile Include="CompilationSteps\IncludeLootFiles.cs" />
<Compile Include="CompilationSteps\IncludeModIniData.cs" />
<Compile Include="CompilationSteps\IncludeOtherProfiles.cs" />
<Compile Include="CompilationSteps\IncludePatches.cs" />
<Compile Include="CompilationSteps\IncludePropertyFiles.cs" />
<Compile Include="CompilationSteps\IncludeRegex.cs" />
<Compile Include="CompilationSteps\IncludeSteamWorkshopItems.cs" />
<Compile Include="CompilationSteps\IncludeStubbedConfigFiles.cs" />
<Compile Include="CompilationSteps\IncludeTaggedMods.cs" />
<Compile Include="CompilationSteps\IncludeThisProfile.cs" />
<Compile Include="CompilationSteps\IncludeVortexDeployment.cs" />
<Compile Include="CompilationSteps\IStackStep.cs" />
<Compile Include="CompilationSteps\PatchStockESMs.cs" />
<Compile Include="CompilationSteps\Serialization.cs" />
<Compile Include="Downloaders\AbstractIPS4Downloader.cs" />
<Compile Include="Downloaders\AbstractNeedsLoginDownloader.cs" />
<Compile Include="Downloaders\DeadlyStreamDownloader.cs" />
<Compile Include="Downloaders\GameFileSourceDownloader.cs" />
<Compile Include="Downloaders\INeedsLogin.cs" />
<Compile Include="Downloaders\LoversLabDownloader.cs" />
<Compile Include="Downloaders\SteamWorkshopDownloader.cs" />
<Compile Include="Downloaders\VectorPlexusDownloader.cs" />
<Compile Include="Extensions\ReactiveUIExt.cs" />
<Compile Include="LibCefHelpers\Init.cs" />
<Compile Include="MO2Compiler.cs" />
<Compile Include="Data.cs" />
<Compile Include="Downloaders\AbstractDownloadState.cs" />
<Compile Include="Downloaders\DownloadDispatcher.cs" />
<Compile Include="Downloaders\DownloaderUtils.cs" />
<Compile Include="Downloaders\DropboxDownloader.cs" />
<Compile Include="Downloaders\GoogleDriveDownloader.cs" />
<Compile Include="Downloaders\HTTPDownloader.cs" />
<Compile Include="Downloaders\IDownloader.cs" />
<Compile Include="Downloaders\IUrlDownloader.cs" />
<Compile Include="Downloaders\ManualDownloader.cs" />
<Compile Include="Downloaders\MediaFireDownloader.cs" />
<Compile Include="Downloaders\MEGADownloader.cs" />
<Compile Include="Downloaders\ModDBDownloader.cs" />
<Compile Include="Downloaders\NexusDownloader.cs" />
<Compile Include="IBatchProcessor.cs" />
<Compile Include="MO2Installer.cs" />
<Compile Include="ModListRegistry\ModListMetadata.cs" />
<Compile Include="NexusApi\Dtos.cs" />
<Compile Include="NexusApi\NexusApi.cs" />
<Compile Include="NexusApi\NexusApiUtils.cs" />
<Compile Include="NexusApi\RequestNexusAuthorization.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ReportBuilder.cs" />
<Compile Include="StatusMessages\ConfirmUpdateOfExistingInstall.cs" />
<Compile Include="StatusMessages\CriticalFailureIntervention.cs" />
<Compile Include="StatusMessages\YesNoIntervention.cs" />
<Compile Include="Validation\DTOs.cs" />
<Compile Include="Validation\ValidateModlist.cs" />
<Compile Include="ViewModel.cs" />
<Compile Include="VortexCompiler.cs" />
<Compile Include="VortexInstaller.cs" />
<Compile Include="WebAutomation\CefSharpWrapper.cs" />
<Compile Include="WebAutomation\IWebDriver.cs" />
<Compile Include="WebAutomation\WebAutomation.cs" />
<Compile Include="zEditIntegration.cs" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<EmbeddedResource Include="LibCefHelpers\cefsharp.7z" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(SolutionDir)\Compression.BSA\Compression.BSA.csproj">
<Project>{ff5d892f-8ff4-44fc-8f7f-cd58f307ad1b}</Project>
<Name>Compression.BSA</Name>
</ProjectReference>
<ProjectReference Include="$(SolutionDir)\Wabbajack.Common\Wabbajack.Common.csproj">
<Project>{b3f3fb6e-b9eb-4f49-9875-d78578bc7ae5}</Project>
<Name>Wabbajack.Common</Name>
</ProjectReference>
<ProjectReference Include="$(SolutionDir)\Wabbajack.VirtualFileSystem\Wabbajack.VirtualFileSystem.csproj">
<Project>{5D6A2EAF-6604-4C51-8AE2-A746B4BC5E3E}</Project>
<Name>Wabbajack.VirtualFileSystem</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="css-min.css" />
</ItemGroup>
<ItemGroup>
<None Include="css.css" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="AlphaFS">
<Version>2.2.6</Version>
</PackageReference>
<PackageReference Include="CefSharp.OffScreen">
<Version>75.1.143</Version>
</PackageReference>
<PackageReference Include="Ceras">
<Version>4.1.7</Version>
</PackageReference>
<PackageReference Include="CommonMark.NET">
<Version>0.15.1</Version>
</PackageReference>
<PackageReference Include="HtmlAgilityPack">
<Version>1.11.17</Version>
</PackageReference>
<PackageReference Include="MegaApiClient">
<Version>1.7.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.Toolkit.Wpf.UI.Controls.WebView">
<Version>6.0.0</Version>
</PackageReference>
<PackageReference Include="ModuleInit.Fody">
<Version>2.1.0</Version>
</PackageReference>
<PackageReference Include="Newtonsoft.Json">
<Version>12.0.3</Version>
</PackageReference>
<PackageReference Include="ReactiveUI">
<Version>11.1.1</Version>
</PackageReference>
<PackageReference Include="ReactiveUI.Fody">
<Version>11.1.1</Version>
</PackageReference>
<PackageReference Include="SharpCompress">
<Version>0.24.0</Version>
</PackageReference>
<PackageReference Include="Syroot.Windows.IO.KnownFolders">
<Version>1.2.1</Version>
</PackageReference>
<PackageReference Include="System.Reactive">
<Version>4.3.2</Version>
</PackageReference>
<PackageReference Include="WebSocketSharpFork">
<Version>1.0.4</Version>
</PackageReference>
<PackageReference Include="YamlDotNet">
<Version>8.0.0</Version>
</PackageReference>
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Platforms>AnyCPU;x64</Platforms>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="CefSharp.Common">
<Version>75.1.143</Version>
</PackageReference>
<PackageReference Include="CefSharp.OffScreen">
<Version>75.1.143</Version>
</PackageReference>
<PackageReference Include="Ceras">
<Version>4.1.7</Version>
</PackageReference>
<PackageReference Include="CommonMark.NET">
<Version>0.15.1</Version>
</PackageReference>
<PackageReference Include="Fody">
<Version>6.0.6</Version>
</PackageReference>
<PackageReference Include="Genbox.AlphaFS">
<Version>2.2.2.1</Version>
</PackageReference>
<PackageReference Include="HtmlAgilityPack">
<Version>1.11.17</Version>
</PackageReference>
<PackageReference Include="MegaApiClient">
<Version>1.7.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.CSharp">
<Version>4.7.0</Version>
</PackageReference>
<PackageReference Include="ModuleInit.Fody">
<Version>2.1.0</Version>
</PackageReference>
<PackageReference Include="ReactiveUI">
<Version>11.1.6</Version>
</PackageReference>
<PackageReference Include="ReactiveUI.Fody">
<Version>11.1.6</Version>
</PackageReference>
<PackageReference Include="SharpCompress">
<Version>0.24.0</Version>
</PackageReference>
<PackageReference Include="System.Collections.Immutable">
<Version>1.7.0</Version>
</PackageReference>
<PackageReference Include="System.Drawing.Common">
<Version>4.7.0</Version>
</PackageReference>
<PackageReference Include="System.Net.Http">
<Version>4.3.4</Version>
</PackageReference>
<PackageReference Include="WebSocketSharp-netstandard">
<Version>1.0.1</Version>
</PackageReference>
<PackageReference Include="YamlDotNet.NetCore">
<Version>1.0.0</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Compression.BSA\Compression.BSA.csproj" />
<ProjectReference Include="..\Wabbajack.Common\Wabbajack.Common.csproj" />
<ProjectReference Include="..\Wabbajack.VirtualFileSystem\Wabbajack.VirtualFileSystem.csproj" />
</ItemGroup>
<ItemGroup>
<None Remove="LibCefHelpers\cefsharp.7z" />
<EmbeddedResource Include="LibCefHelpers\cefsharp.7z" />
<None Remove="css-min.css" />
<EmbeddedResource Include="css-min.css" />
</ItemGroup>
</Project>

View File

@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Remoting.Channels;
using System.Text;
using System.Threading.Tasks;
using CefSharp;

View File

@ -5,6 +5,7 @@ using Microsoft.VisualStudio.TestTools.UnitTesting;
using Wabbajack.Common;
using Wabbajack.Lib;
using Wabbajack.Lib.LibCefHelpers;
using Wabbajack.Util;
namespace Wabbajack.Test
{
@ -57,7 +58,8 @@ namespace Wabbajack.Test
archive: compiler.ModListOutputFile,
modList: modlist,
outputFolder: utils.InstallFolder,
downloadFolder: utils.DownloadsFolder);
downloadFolder: utils.DownloadsFolder,
parameters: SystemParametersConstructor.Create());
installer.WarnOnOverwrite = false;
installer.GameFolder = utils.GameFolder;
await installer.Begin();

View File

@ -4,6 +4,7 @@ using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Wabbajack.Common;
using Wabbajack.Lib;
using Wabbajack.Util;
namespace Wabbajack.Test
{
@ -67,7 +68,8 @@ namespace Wabbajack.Test
archive: vortexCompiler.ModListOutputFile,
modList: modList,
outputFolder: utils.InstallFolder,
downloadFolder: utils.DownloadsFolder)
downloadFolder: utils.DownloadsFolder,
parameters: SystemParametersConstructor.Create())
{
GameFolder = utils.GameFolder,
};

View File

@ -8,6 +8,7 @@ using Wabbajack.Common;
using Wabbajack.Lib;
using Wabbajack.Lib.Downloaders;
using Wabbajack.Lib.NexusApi;
using Wabbajack.Util;
namespace Wabbajack.Test
{
@ -153,7 +154,8 @@ namespace Wabbajack.Test
archive: compiler.ModListOutputFile,
modList: modlist,
outputFolder: utils.InstallFolder,
downloadFolder: utils.DownloadsFolder);
downloadFolder: utils.DownloadsFolder,
parameters: SystemParametersConstructor.Create());
installer.GameFolder = utils.GameFolder;
await installer.Begin();
}

View File

@ -0,0 +1,17 @@
using MahApps.Metro.Controls;
using Wabbajack.Lib;
namespace Wabbajack.Util
{
public static class SystemParametersConstructor
{
public static SystemParameters Create()
{
return new SystemParameters
{
ScreenWidth = (int)System.Windows.SystemParameters.PrimaryScreenWidth,
ScreenHeight = (int)System.Windows.SystemParameters.PrimaryScreenHeight
};
}
}
}

View File

@ -12,6 +12,7 @@ using ReactiveUI.Fody.Helpers;
using Wabbajack.Common;
using Wabbajack.Lib;
using Wabbajack.UI;
using Wabbajack.Util;
namespace Wabbajack
{
@ -149,7 +150,8 @@ namespace Wabbajack
archive: Parent.ModListLocation.TargetPath,
modList: Parent.ModList.SourceModList,
outputFolder: Location.TargetPath,
downloadFolder: DownloadLocation.TargetPath);
downloadFolder: DownloadLocation.TargetPath,
parameters: SystemParametersConstructor.Create());
await Task.Run(async () =>
{

View File

@ -8,6 +8,7 @@ using ReactiveUI;
using ReactiveUI.Fody.Helpers;
using Wabbajack.Common;
using Wabbajack.Lib;
using Wabbajack.Util;
namespace Wabbajack
{
@ -66,7 +67,8 @@ namespace Wabbajack
archive: Parent.ModListLocation.TargetPath,
modList: Parent.ModList.SourceModList,
outputFolder: staging,
downloadFolder: download);
downloadFolder: download,
parameters: SystemParametersConstructor.Create());
await Task.Run(async () =>
{

View File

@ -174,6 +174,7 @@
</ApplicationDefinition>
<Compile Include="UI\FilePickerVM.cs" />
<Compile Include="UI\UIUtils.cs" />
<Compile Include="Util\SystemParametersConstructor.cs" />
<Compile Include="View Models\BackNavigatingVM.cs" />
<Compile Include="View Models\Settings\SettingsVM.cs" />
<Compile Include="Views\Settings\SettingsView.xaml.cs">
@ -536,7 +537,7 @@
<Version>11.1.1</Version>
</PackageReference>
<PackageReference Include="ReactiveUI.Fody">
<Version>11.1.1</Version>
<Version>11.1.6</Version>
</PackageReference>
<PackageReference Include="ReactiveUI.WPF">
<Version>11.1.1</Version>