Merge pull request #101 from wabbajack-tools/wabbajack-dll

pull the core of Wabbajack into Wabbajack.Lib
This commit is contained in:
Timothy Baldridge
2019-10-15 21:26:57 -06:00
committed by GitHub
45 changed files with 371 additions and 113 deletions

View File

@ -567,5 +567,15 @@ namespace Wabbajack.Common
Log(msg); Log(msg);
throw new Exception(msg); throw new Exception(msg);
} }
public static Stream GetResourceStream(string name)
{
return (from assembly in AppDomain.CurrentDomain.GetAssemblies()
where !assembly.IsDynamic
from rname in assembly.GetManifestResourceNames()
where rname == name
select assembly.GetManifestResourceStream(name)).First();
}
} }
} }

View File

@ -13,15 +13,18 @@ using System.Text.RegularExpressions;
using System.Web; using System.Web;
using VFS; using VFS;
using Wabbajack.Common; using Wabbajack.Common;
using Wabbajack.Downloaders; using Wabbajack.Lib.Downloaders;
using Wabbajack.NexusApi; using Wabbajack.Lib.Downloaders;
using Wabbajack.Validation; using Wabbajack.Lib.NexusApi;
using Wabbajack.Lib.Validation;
using Wabbajack.Lib.NexusApi;
using Wabbajack.Lib.Validation;
using Directory = Alphaleonis.Win32.Filesystem.Directory; using Directory = Alphaleonis.Win32.Filesystem.Directory;
using File = Alphaleonis.Win32.Filesystem.File; using File = Alphaleonis.Win32.Filesystem.File;
using FileInfo = Alphaleonis.Win32.Filesystem.FileInfo; using FileInfo = Alphaleonis.Win32.Filesystem.FileInfo;
using Path = Alphaleonis.Win32.Filesystem.Path; using Path = Alphaleonis.Win32.Filesystem.Path;
namespace Wabbajack namespace Wabbajack.Lib
{ {
public class Compiler public class Compiler
{ {
@ -344,7 +347,7 @@ namespace Wabbajack
private void GenerateReport() private void GenerateReport()
{ {
string css = ""; string css = "";
using (Stream cssStream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Wabbajack.css-min.css")) using (Stream cssStream = Utils.GetResourceStream("Wabbajack.Lib.css-min.css"))
{ {
using (StreamReader reader = new StreamReader(cssStream)) using (StreamReader reader = new StreamReader(cssStream))
{ {

View File

@ -4,9 +4,9 @@ using System.Collections.Generic;
using Compression.BSA; using Compression.BSA;
using VFS; using VFS;
using Wabbajack.Common; using Wabbajack.Common;
using Wabbajack.Downloaders; using Wabbajack.Lib.Downloaders;
namespace Wabbajack namespace Wabbajack.Lib
{ {
public class RawSourceFile public class RawSourceFile
{ {

View File

@ -3,9 +3,9 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Wabbajack.Validation; using Wabbajack.Lib.Validation;
namespace Wabbajack.Downloaders namespace Wabbajack.Lib.Downloaders
{ {
/// <summary> /// <summary>
/// Base for all abstract downloaders /// Base for all abstract downloaders

View File

@ -5,7 +5,7 @@ using System.Security.Policy;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Wabbajack.Downloaders namespace Wabbajack.Lib.Downloaders
{ {
public static class DownloadDispatcher public static class DownloadDispatcher
{ {

View File

@ -5,7 +5,7 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Web; using System.Web;
namespace Wabbajack.Downloaders namespace Wabbajack.Lib.Downloaders
{ {
public class DropboxDownloader : IDownloader public class DropboxDownloader : IDownloader
{ {

View File

@ -7,9 +7,9 @@ using System.Text;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Threading.Tasks; using System.Threading.Tasks;
using Wabbajack.Common; using Wabbajack.Common;
using Wabbajack.Validation; using Wabbajack.Lib.Validation;
namespace Wabbajack.Downloaders namespace Wabbajack.Lib.Downloaders
{ {
public class GoogleDriveDownloader : IDownloader public class GoogleDriveDownloader : IDownloader
{ {

View File

@ -2,15 +2,12 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Net.Http; using System.Net.Http;
using System.ServiceModel.Configuration;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json; using Newtonsoft.Json;
using Wabbajack.Common; using Wabbajack.Common;
using Wabbajack.Validation; using Wabbajack.Lib.Validation;
using File = Alphaleonis.Win32.Filesystem.File; using File = Alphaleonis.Win32.Filesystem.File;
namespace Wabbajack.Downloaders namespace Wabbajack.Lib.Downloaders
{ {
public class HTTPDownloader : IDownloader public class HTTPDownloader : IDownloader
{ {

View File

@ -3,9 +3,9 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Wabbajack.Validation; using Wabbajack.Lib.Validation;
namespace Wabbajack.Downloaders namespace Wabbajack.Lib.Downloaders
{ {
public interface IDownloader public interface IDownloader
{ {

View File

@ -9,9 +9,9 @@ using System.Threading.Tasks;
using Alphaleonis.Win32.Filesystem; using Alphaleonis.Win32.Filesystem;
using CG.Web.MegaApiClient; using CG.Web.MegaApiClient;
using Wabbajack.Common; using Wabbajack.Common;
using Wabbajack.Validation; using Wabbajack.Lib.Validation;
namespace Wabbajack.Downloaders namespace Wabbajack.Lib.Downloaders
{ {
public class MegaDownloader : IDownloader public class MegaDownloader : IDownloader
{ {

View File

@ -4,9 +4,9 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Wabbajack.Common; using Wabbajack.Common;
using Wabbajack.Validation; using Wabbajack.Lib.Validation;
namespace Wabbajack.Downloaders namespace Wabbajack.Lib.Downloaders
{ {
class ManualDownloader : IDownloader class ManualDownloader : IDownloader
{ {

View File

@ -6,9 +6,9 @@ using System.Text;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Threading.Tasks; using System.Threading.Tasks;
using Wabbajack.Common; using Wabbajack.Common;
using Wabbajack.Validation; using Wabbajack.Lib.Validation;
namespace Wabbajack.Downloaders namespace Wabbajack.Lib.Downloaders
{ {
public class ModDBDownloader : IDownloader public class ModDBDownloader : IDownloader
{ {

View File

@ -4,10 +4,10 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Wabbajack.Common; using Wabbajack.Common;
using Wabbajack.NexusApi; using Wabbajack.Lib.NexusApi;
using Wabbajack.Validation; using Wabbajack.Lib.Validation;
namespace Wabbajack.Downloaders namespace Wabbajack.Lib.Downloaders
{ {
public class NexusDownloader : IDownloader public class NexusDownloader : IDownloader
{ {

View File

@ -11,15 +11,18 @@ using System.Text.RegularExpressions;
using System.Windows; using System.Windows;
using VFS; using VFS;
using Wabbajack.Common; using Wabbajack.Common;
using Wabbajack.Downloaders; using Wabbajack.Lib.Downloaders;
using Wabbajack.NexusApi; using Wabbajack.Lib.Downloaders;
using Wabbajack.Validation; using Wabbajack.Lib.NexusApi;
using Wabbajack.Lib.Validation;
using Wabbajack.Lib.NexusApi;
using Wabbajack.Lib.Validation;
using Directory = Alphaleonis.Win32.Filesystem.Directory; using Directory = Alphaleonis.Win32.Filesystem.Directory;
using File = Alphaleonis.Win32.Filesystem.File; using File = Alphaleonis.Win32.Filesystem.File;
using FileInfo = Alphaleonis.Win32.Filesystem.FileInfo; using FileInfo = Alphaleonis.Win32.Filesystem.FileInfo;
using Path = Alphaleonis.Win32.Filesystem.Path; using Path = Alphaleonis.Win32.Filesystem.Path;
namespace Wabbajack namespace Wabbajack.Lib
{ {
public class Installer public class Installer
{ {

View File

@ -6,12 +6,12 @@ using System.Net.Http;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Wabbajack.Common; using Wabbajack.Common;
using Wabbajack.Validation; using Wabbajack.Lib.Validation;
using YamlDotNet.Serialization; using YamlDotNet.Serialization;
using YamlDotNet.Serialization.NamingConventions; using YamlDotNet.Serialization.NamingConventions;
using Game = Wabbajack.Common.Game; using Game = Wabbajack.Common.Game;
namespace Wabbajack.ModListRegistry namespace Wabbajack.Lib.ModListRegistry
{ {
public class ModlistMetadata public class ModlistMetadata
{ {

View File

@ -1,6 +1,6 @@
using System; using System;
namespace Wabbajack.NexusApi namespace Wabbajack.Lib.NexusApi
{ {
public class UserStatus public class UserStatus
{ {

View File

@ -14,11 +14,11 @@ using System.Security.Authentication;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Wabbajack.Common; using Wabbajack.Common;
using Wabbajack.Downloaders; using Wabbajack.Lib.Downloaders;
using WebSocketSharp; using WebSocketSharp;
using static Wabbajack.NexusApi.NexusApiUtils; using static Wabbajack.Lib.NexusApi.NexusApiUtils;
namespace Wabbajack.NexusApi namespace Wabbajack.Lib.NexusApi
{ {
public class NexusApiClient : ViewModel public class NexusApiClient : ViewModel
{ {

View File

@ -1,6 +1,6 @@
using Wabbajack.Common; using Wabbajack.Common;
namespace Wabbajack.NexusApi namespace Wabbajack.Lib.NexusApi
{ {
public sealed class NexusApiUtils public sealed class NexusApiUtils
{ {

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
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

@ -3,11 +3,11 @@ using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using Wabbajack.Common; using Wabbajack.Common;
using Wabbajack.NexusApi; using Wabbajack.Lib.NexusApi;
using File = Alphaleonis.Win32.Filesystem.File; using File = Alphaleonis.Win32.Filesystem.File;
using Path = Alphaleonis.Win32.Filesystem.Path; using Path = Alphaleonis.Win32.Filesystem.Path;
namespace Wabbajack namespace Wabbajack.Lib
{ {
public class ReportBuilder : IDisposable public class ReportBuilder : IDisposable
{ {

33
Wabbajack.Lib/UI/Slide.cs Normal file
View File

@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media.Imaging;
namespace Wabbajack.Lib
{
public class Slide
{
public Slide(string modName, string modID, string modDescription, string modAuthor, bool isNSFW, string modUrl, string imageURL)
{
ModName = modName;
ModDescription = modDescription;
ModAuthor = modAuthor;
IsNSFW = isNSFW;
ModURL = modUrl;
ModID = modID;
ImageURL = imageURL;
}
public string ModName { get; }
public string ModDescription { get; }
public string ModAuthor { get; }
public bool IsNSFW { get; }
public string ModURL { get; }
public string ModID { get; }
public BitmapImage Image { get; set; }
public string ImageURL { get; }
}
}

View File

@ -1,13 +1,16 @@
using Microsoft.WindowsAPICodePack.Dialogs; using Microsoft.WindowsAPICodePack.Dialogs;
using System; using System;
using System.IO;
using System.Linq;
using System.Reflection; using System.Reflection;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using System.Windows.Media.Imaging; using System.Windows.Media.Imaging;
using System.Windows.Threading; using System.Windows.Threading;
using Wabbajack.Common;
namespace Wabbajack namespace Wabbajack.Lib
{ {
public static class UIUtils public static class UIUtils
{ {
@ -63,7 +66,7 @@ namespace Wabbajack
{ {
var img = new BitmapImage(); var img = new BitmapImage();
img.BeginInit(); img.BeginInit();
img.StreamSource = Assembly.GetExecutingAssembly().GetManifestResourceStream(name); img.StreamSource = Utils.GetResourceStream(name);
img.EndInit(); img.EndInit();
return img; return img;
} }

View File

@ -1,7 +1,7 @@
using System.Linq; using System.Linq;
using Wabbajack.Common; using Wabbajack.Common;
namespace Wabbajack.Updater namespace Wabbajack.Lib.Updater
{ {
public class CheckForUpdates public class CheckForUpdates
{ {

View File

@ -1,6 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
namespace Wabbajack.Validation namespace Wabbajack.Lib.Validation
{ {
public class Permissions public class Permissions
{ {

View File

@ -5,12 +5,13 @@ using System.IO;
using System.Linq; using System.Linq;
using System.Net.Http; using System.Net.Http;
using Wabbajack.Common; using Wabbajack.Common;
using Wabbajack.Downloaders; using Wabbajack.Lib.Downloaders;
using Wabbajack.Lib.Downloaders;
using YamlDotNet.Serialization; using YamlDotNet.Serialization;
using YamlDotNet.Serialization.NamingConventions; using YamlDotNet.Serialization.NamingConventions;
using Path = Alphaleonis.Win32.Filesystem.Path; using Path = Alphaleonis.Win32.Filesystem.Path;
namespace Wabbajack.Validation namespace Wabbajack.Lib.Validation
{ {
/// <summary> /// <summary>
/// Core class for rights management. Given a Wabbajack modlist this class will return a list of all the /// Core class for rights management. Given a Wabbajack modlist this class will return a list of all the

View File

@ -8,7 +8,7 @@ using System.Runtime.CompilerServices;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Wabbajack namespace Wabbajack.Lib
{ {
public class ViewModel : ReactiveObject, IDisposable public class ViewModel : ReactiveObject, IDisposable
{ {

View File

@ -0,0 +1,162 @@
<?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.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</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>
</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>
</PropertyGroup>
<ItemGroup>
<Reference Include="AlphaFS, Version=2.2.0.0, Culture=neutral, PublicKeyToken=4d31a58f7d7ad5c9, processorArchitecture=MSIL">
<HintPath>..\packages\AlphaFS.2.2.6\lib\net452\AlphaFS.dll</HintPath>
</Reference>
<Reference Include="CommonMark, Version=0.1.0.0, Culture=neutral, PublicKeyToken=001ef8810438905d, processorArchitecture=MSIL">
<HintPath>..\packages\CommonMark.NET.0.15.1\lib\net45\CommonMark.dll</HintPath>
</Reference>
<Reference Include="DynamicData, Version=6.13.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DynamicData.6.13.18\lib\net461\DynamicData.dll</HintPath>
</Reference>
<Reference Include="MegaApiClient, Version=1.7.1.495, Culture=neutral, PublicKeyToken=0480d311efbeb4e2, processorArchitecture=MSIL">
<HintPath>..\packages\MegaApiClient.1.7.1\lib\net46\MegaApiClient.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAPICodePack, Version=1.1.3.3, Culture=neutral, PublicKeyToken=8985beaab7ea3f04, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft-WindowsAPICodePack-Core.1.1.3.3\lib\net452\Microsoft.WindowsAPICodePack.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAPICodePack.Shell, Version=1.1.3.3, Culture=neutral, PublicKeyToken=8985beaab7ea3f04, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft-WindowsAPICodePack-Shell.1.1.3.3\lib\net452\Microsoft.WindowsAPICodePack.Shell.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="ReactiveUI, Version=10.5.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ReactiveUI.10.5.7\lib\net461\ReactiveUI.dll</HintPath>
</Reference>
<Reference Include="SharpCompress, Version=0.23.0.0, Culture=neutral, PublicKeyToken=afb0a02973931d96, processorArchitecture=MSIL">
<HintPath>..\packages\SharpCompress.0.23.0\lib\net45\SharpCompress.dll</HintPath>
</Reference>
<Reference Include="Splat, Version=9.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Splat.9.1.1\lib\net461\Splat.dll</HintPath>
</Reference>
<Reference Include="Splat.Drawing, Version=9.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Splat.Drawing.9.1.1\lib\net461\Splat.Drawing.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Drawing.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Drawing.Primitives.4.3.0\lib\net45\System.Drawing.Primitives.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.IO.Compression" />
<Reference Include="System.Reactive, Version=4.2.0.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
<HintPath>..\packages\System.Reactive.4.2.0\lib\net46\System.Reactive.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.3\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.Transactions" />
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
</Reference>
<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="websocket-sharp, Version=1.0.4.0, Culture=neutral, PublicKeyToken=5660b08a1845a91e, processorArchitecture=MSIL">
<HintPath>..\packages\WebSocketSharpFork.1.0.4.0\lib\net35\websocket-sharp.dll</HintPath>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="YamlDotNet, Version=7.0.0.0, Culture=neutral, PublicKeyToken=ec19458f3c15af5e, processorArchitecture=MSIL">
<HintPath>..\packages\YamlDotNet.7.0.0\lib\net45\YamlDotNet.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Compiler.cs" />
<Compile Include="Data.cs" />
<Compile Include="Downloaders\AbstractDownloadState.cs" />
<Compile Include="Downloaders\DownloadDispatcher.cs" />
<Compile Include="Downloaders\DropboxDownloader.cs" />
<Compile Include="Downloaders\GoogleDriveDownloader.cs" />
<Compile Include="Downloaders\HTTPDownloader.cs" />
<Compile Include="Downloaders\IDownloader.cs" />
<Compile Include="Downloaders\ManualDownloader.cs" />
<Compile Include="Downloaders\MEGADownloader.cs" />
<Compile Include="Downloaders\ModDBDownloader.cs" />
<Compile Include="Downloaders\NexusDownloader.cs" />
<Compile Include="Installer.cs" />
<Compile Include="ModListRegistry\ModListMetadata.cs" />
<Compile Include="NexusApi\Dtos.cs" />
<Compile Include="NexusApi\NexusApi.cs" />
<Compile Include="NexusApi\NexusApiUtils.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ReportBuilder.cs" />
<Compile Include="UI\Slide.cs" />
<Compile Include="UI\UIUtils.cs" />
<Compile Include="Updater\CheckForUpdates.cs" />
<Compile Include="Validation\DTOs.cs" />
<Compile Include="Validation\ValidateModlist.cs" />
<Compile Include="ViewModel.cs" />
<Compile Include="zEditIntegration.cs" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Compression.BSA\Compression.BSA.csproj">
<Project>{ff5d892f-8ff4-44fc-8f7f-cd58f307ad1b}</Project>
<Name>Compression.BSA</Name>
</ProjectReference>
<ProjectReference Include="..\VirtualFileSystem\VirtualFileSystem.csproj">
<Project>{5128b489-bc28-4f66-9f0b-b4565af36cbc}</Project>
<Name>VirtualFileSystem</Name>
</ProjectReference>
<ProjectReference Include="..\Wabbajack.Common\Wabbajack.Common.csproj">
<Project>{b3f3fb6e-b9eb-4f49-9875-d78578bc7ae5}</Project>
<Name>Wabbajack.Common</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="css-min.css" />
</ItemGroup>
<ItemGroup>
<None Include="css.css" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

11
Wabbajack.Lib/app.config Normal file
View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AlphaFS" version="2.2.6" targetFramework="net472" />
<package id="CommonMark.NET" version="0.15.1" targetFramework="net472" />
<package id="DynamicData" version="6.13.18" targetFramework="net472" />
<package id="MegaApiClient" version="1.7.1" targetFramework="net472" />
<package id="Microsoft-WindowsAPICodePack-Core" version="1.1.3.3" targetFramework="net472" />
<package id="Microsoft-WindowsAPICodePack-Shell" version="1.1.3.3" targetFramework="net472" />
<package id="Newtonsoft.Json" version="12.0.2" targetFramework="net472" />
<package id="ReactiveUI" version="10.5.7" targetFramework="net472" />
<package id="SharpCompress" version="0.23.0" targetFramework="net472" />
<package id="Splat" version="9.1.1" targetFramework="net472" />
<package id="Splat.Drawing" version="9.1.1" targetFramework="net472" />
<package id="System.Drawing.Primitives" version="4.3.0" targetFramework="net472" />
<package id="System.Reactive" version="4.2.0" targetFramework="net472" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" targetFramework="net472" />
<package id="System.Threading.Tasks.Extensions" version="4.5.3" targetFramework="net472" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net472" />
<package id="WebSocketSharpFork" version="1.0.4.0" targetFramework="net472" />
<package id="YamlDotNet" version="7.0.0" targetFramework="net472" />
</packages>

View File

@ -8,7 +8,7 @@ using Directory = Alphaleonis.Win32.Filesystem.Directory;
using File = Alphaleonis.Win32.Filesystem.File; using File = Alphaleonis.Win32.Filesystem.File;
using Path = Alphaleonis.Win32.Filesystem.Path; using Path = Alphaleonis.Win32.Filesystem.Path;
namespace Wabbajack namespace Wabbajack.Lib
{ {
public class zEditIntegration public class zEditIntegration
{ {

View File

@ -4,8 +4,11 @@ using System.Linq;
using System.Security.Policy; using System.Security.Policy;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using Wabbajack.Common; using Wabbajack.Common;
using Wabbajack.Downloaders; using Wabbajack.Lib.Downloaders;
using Wabbajack.Validation; using Wabbajack.Lib;
using Wabbajack.Lib.Downloaders;
using Wabbajack.Lib.Validation;
using Wabbajack.Lib.Validation;
using Game = Wabbajack.Common.Game; using Game = Wabbajack.Common.Game;
namespace Wabbajack.Test namespace Wabbajack.Test

View File

@ -5,8 +5,9 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using Wabbajack.Common; using Wabbajack.Common;
using Wabbajack.Downloaders; using Wabbajack.Lib;
using Wabbajack.Validation; using Wabbajack.Lib.Downloaders;
using Wabbajack.Lib.Validation;
using File = Alphaleonis.Win32.Filesystem.File; using File = Alphaleonis.Win32.Filesystem.File;
namespace Wabbajack.Test namespace Wabbajack.Test

View File

@ -4,7 +4,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using Wabbajack.ModListRegistry; using Wabbajack.Lib.ModListRegistry;
namespace Wabbajack.Test namespace Wabbajack.Test
{ {

View File

@ -7,6 +7,7 @@ using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting.Logging; using Microsoft.VisualStudio.TestTools.UnitTesting.Logging;
using VFS; using VFS;
using Wabbajack.Common; using Wabbajack.Common;
using Wabbajack.Lib;
namespace Wabbajack.Test namespace Wabbajack.Test
{ {

View File

@ -95,6 +95,10 @@
<Project>{b3f3fb6e-b9eb-4f49-9875-d78578bc7ae5}</Project> <Project>{b3f3fb6e-b9eb-4f49-9875-d78578bc7ae5}</Project>
<Name>Wabbajack.Common</Name> <Name>Wabbajack.Common</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\Wabbajack.Lib\Wabbajack.Lib.csproj">
<Project>{0a820830-a298-497d-85e0-e9a89efef5fe}</Project>
<Name>Wabbajack.Lib</Name>
</ProjectReference>
<ProjectReference Include="..\Wabbajack\Wabbajack.csproj"> <ProjectReference Include="..\Wabbajack\Wabbajack.csproj">
<Project>{33602679-8484-40c7-a10c-774dff5d8314}</Project> <Project>{33602679-8484-40c7-a10c-774dff5d8314}</Project>
<Name>Wabbajack</Name> <Name>Wabbajack</Name>

View File

@ -30,6 +30,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wabbajack.WebAutomation.Tes
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wabbajack.Test", "Wabbajack.Test\Wabbajack.Test.csproj", "{A47FFF32-782B-4D9F-8704-C98FB32FA8CC}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wabbajack.Test", "Wabbajack.Test\Wabbajack.Test.csproj", "{A47FFF32-782B-4D9F-8704-C98FB32FA8CC}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wabbajack.Lib", "Wabbajack.Lib\Wabbajack.Lib.csproj", "{0A820830-A298-497D-85E0-E9A89EFEF5FE}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug (no commandargs)|Any CPU = Debug (no commandargs)|Any CPU Debug (no commandargs)|Any CPU = Debug (no commandargs)|Any CPU
@ -148,6 +150,18 @@ Global
{A47FFF32-782B-4D9F-8704-C98FB32FA8CC}.Release|Any CPU.Build.0 = Release|Any CPU {A47FFF32-782B-4D9F-8704-C98FB32FA8CC}.Release|Any CPU.Build.0 = Release|Any CPU
{A47FFF32-782B-4D9F-8704-C98FB32FA8CC}.Release|x64.ActiveCfg = Release|Any CPU {A47FFF32-782B-4D9F-8704-C98FB32FA8CC}.Release|x64.ActiveCfg = Release|Any CPU
{A47FFF32-782B-4D9F-8704-C98FB32FA8CC}.Release|x64.Build.0 = Release|Any CPU {A47FFF32-782B-4D9F-8704-C98FB32FA8CC}.Release|x64.Build.0 = Release|Any CPU
{0A820830-A298-497D-85E0-E9A89EFEF5FE}.Debug (no commandargs)|Any CPU.ActiveCfg = Debug|Any CPU
{0A820830-A298-497D-85E0-E9A89EFEF5FE}.Debug (no commandargs)|Any CPU.Build.0 = Debug|Any CPU
{0A820830-A298-497D-85E0-E9A89EFEF5FE}.Debug (no commandargs)|x64.ActiveCfg = Debug|Any CPU
{0A820830-A298-497D-85E0-E9A89EFEF5FE}.Debug (no commandargs)|x64.Build.0 = Debug|Any CPU
{0A820830-A298-497D-85E0-E9A89EFEF5FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0A820830-A298-497D-85E0-E9A89EFEF5FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0A820830-A298-497D-85E0-E9A89EFEF5FE}.Debug|x64.ActiveCfg = Debug|Any CPU
{0A820830-A298-497D-85E0-E9A89EFEF5FE}.Debug|x64.Build.0 = Debug|Any CPU
{0A820830-A298-497D-85E0-E9A89EFEF5FE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0A820830-A298-497D-85E0-E9A89EFEF5FE}.Release|Any CPU.Build.0 = Release|Any CPU
{0A820830-A298-497D-85E0-E9A89EFEF5FE}.Release|x64.ActiveCfg = Release|Any CPU
{0A820830-A298-497D-85E0-E9A89EFEF5FE}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

View File

@ -1,7 +1,7 @@
using System; using System;
using System.Windows; using System.Windows;
using Wabbajack.Common; using Wabbajack.Common;
using Wabbajack.Updater; using Wabbajack.Lib.Updater;
namespace Wabbajack namespace Wabbajack
{ {

View File

@ -19,13 +19,14 @@ using System.Windows.Input;
using System.Windows.Media.Imaging; using System.Windows.Media.Imaging;
using System.Windows.Threading; using System.Windows.Threading;
using Wabbajack.Common; using Wabbajack.Common;
using Wabbajack.Downloaders; using Wabbajack.Lib.Downloaders;
using Wabbajack.NexusApi; using Wabbajack.Lib.NexusApi;
using Wabbajack.UI; using Wabbajack.UI;
using DynamicData; using DynamicData;
using DynamicData.Binding; using DynamicData.Binding;
using System.Reactive; using System.Reactive;
using System.Text; using System.Text;
using Wabbajack.Lib;
namespace Wabbajack namespace Wabbajack
{ {

View File

@ -4,6 +4,7 @@ using System.ComponentModel;
using System.Threading; using System.Threading;
using System.Windows; using System.Windows;
using Wabbajack.Common; using Wabbajack.Common;
using Wabbajack.Lib;
using Application = System.Windows.Application; using Application = System.Windows.Application;
using MessageBox = System.Windows.MessageBox; using MessageBox = System.Windows.MessageBox;

View File

@ -3,6 +3,7 @@ using System.Diagnostics;
using System.Windows; using System.Windows;
using System.Windows.Input; using System.Windows.Input;
using Wabbajack.Common; using Wabbajack.Common;
using Wabbajack.Lib;
using static Wabbajack.MainWindow; using static Wabbajack.MainWindow;
namespace Wabbajack namespace Wabbajack

View File

@ -2,6 +2,7 @@
using System.ComponentModel; using System.ComponentModel;
using System.Windows; using System.Windows;
using System.Windows.Media.Imaging; using System.Windows.Media.Imaging;
using Wabbajack.Lib;
namespace Wabbajack namespace Wabbajack
{ {

View File

@ -12,34 +12,11 @@ using System.Reactive.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Media.Imaging; using System.Windows.Media.Imaging;
using Wabbajack.Common; using Wabbajack.Common;
using Wabbajack.NexusApi; using Wabbajack.Lib;
using Wabbajack.Lib.NexusApi;
namespace Wabbajack namespace Wabbajack
{ {
public class Slide
{
public Slide(string modName, string modID, string modDescription, string modAuthor, bool isNSFW, string modUrl, string imageURL)
{
ModName = modName;
ModDescription = modDescription;
ModAuthor = modAuthor;
IsNSFW = isNSFW;
ModURL = modUrl;
ModID = modID;
ImageURL = imageURL;
}
public string ModName { get; }
public string ModDescription { get; }
public string ModAuthor { get; }
public bool IsNSFW { get; }
public string ModURL { get; }
public string ModID { get; }
public BitmapImage Image { get; set; }
public string ImageURL { get; }
}
public class SlideShow : ViewModel public class SlideShow : ViewModel
{ {
private readonly Random _random; private readonly Random _random;

View File

@ -225,44 +225,23 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
</ApplicationDefinition> </ApplicationDefinition>
<Compile Include="Converters\IsNotNullVisibilityConverter.cs" /> <Compile Include="Converters\IsNotNullVisibilityConverter.cs" />
<Compile Include="Data.cs" />
<Compile Include="Downloaders\AbstractDownloadState.cs" />
<Compile Include="Downloaders\GoogleDriveDownloader.cs" />
<Compile Include="Downloaders\HTTPDownloader.cs" />
<Compile Include="Downloaders\DownloadDispatcher.cs" />
<Compile Include="Downloaders\DropboxDownloader.cs" />
<Compile Include="Downloaders\IDownloader.cs" />
<Compile Include="Downloaders\ManualDownloader.cs" />
<Compile Include="Downloaders\MegaDownloader.cs" />
<Compile Include="Downloaders\ModDBDownloader.cs" />
<Compile Include="Downloaders\NexusDownloader.cs" />
<Compile Include="Enums\RunMode.cs" /> <Compile Include="Enums\RunMode.cs" />
<Compile Include="Extensions\ReactiveUIExt.cs" /> <Compile Include="Extensions\ReactiveUIExt.cs" />
<Compile Include="ModListRegistry\ModListMetadata.cs" />
<Compile Include="UI\SlideshowView.xaml.cs"> <Compile Include="UI\SlideshowView.xaml.cs">
<DependentUpon>SlideshowView.xaml</DependentUpon> <DependentUpon>SlideshowView.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="UI\ModlistPropertiesWindow.xaml.cs"> <Compile Include="UI\ModlistPropertiesWindow.xaml.cs">
<DependentUpon>ModlistPropertiesWindow.xaml</DependentUpon> <DependentUpon>ModlistPropertiesWindow.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="NexusApi\Dtos.cs" />
<Compile Include="NexusApi\NexusApiUtils.cs" />
<Compile Include="UI\ModeSelectionWindow.xaml.cs"> <Compile Include="UI\ModeSelectionWindow.xaml.cs">
<DependentUpon>ModeSelectionWindow.xaml</DependentUpon> <DependentUpon>ModeSelectionWindow.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="ReportBuilder.cs" />
<Compile Include="Themes\LeftMarginMultiplierConverter.cs" /> <Compile Include="Themes\LeftMarginMultiplierConverter.cs" />
<Compile Include="Themes\TreeViewItemExtensions.cs" /> <Compile Include="Themes\TreeViewItemExtensions.cs" />
<Compile Include="UI\SlideShow.cs" /> <Compile Include="UI\SlideShow.cs" />
<Compile Include="UI\TextViewer.xaml.cs"> <Compile Include="UI\TextViewer.xaml.cs">
<DependentUpon>TextViewer.xaml</DependentUpon> <DependentUpon>TextViewer.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="UI\UIUtils.cs" />
<Compile Include="Updater\CheckForUpdates.cs" />
<Compile Include="Validation\DTOs.cs" />
<Compile Include="Validation\ValidateModlist.cs" />
<Compile Include="ViewModel.cs" />
<Compile Include="zEditIntegration.cs" />
<Page Include="UI\SlideshowView.xaml"> <Page Include="UI\SlideshowView.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
@ -277,8 +256,6 @@
</Compile> </Compile>
<Compile Include="AppState.cs" /> <Compile Include="AppState.cs" />
<Compile Include="AutoScrollBehavior.cs" /> <Compile Include="AutoScrollBehavior.cs" />
<Compile Include="Compiler.cs" />
<Compile Include="Installer.cs" />
<Compile Include="UI\MainWindow.xaml.cs"> <Compile Include="UI\MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon> <DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType> <SubType>Code</SubType>
@ -301,7 +278,6 @@
</Page> </Page>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="NexusApi\NexusApi.cs" />
<Compile Include="Properties\AssemblyInfo.cs"> <Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
@ -341,6 +317,10 @@
<Project>{b3f3fb6e-b9eb-4f49-9875-d78578bc7ae5}</Project> <Project>{b3f3fb6e-b9eb-4f49-9875-d78578bc7ae5}</Project>
<Name>Wabbajack.Common</Name> <Name>Wabbajack.Common</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\Wabbajack.Lib\Wabbajack.Lib.csproj">
<Project>{0a820830-a298-497d-85e0-e9a89efef5fe}</Project>
<Name>Wabbajack.Lib</Name>
</ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.7.2"> <BootstrapperPackage Include=".NETFramework,Version=v4.7.2">
@ -357,12 +337,6 @@
<ItemGroup> <ItemGroup>
<Resource Include="UI\Icons\wabbajack.ico" /> <Resource Include="UI\Icons\wabbajack.ico" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Include="css.css" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="css-min.css" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="UI\banner.png" /> <EmbeddedResource Include="UI\banner.png" />
</ItemGroup> </ItemGroup>