mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Merge pull request #940 from wabbajack-tools/add-witcher3-to-games
Add witcher 3 to the games metadata (prep for ZeroManagerInstaller)
This commit is contained in:
commit
08ab701861
@ -8,6 +8,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
|
||||||
<PackageReference Include="xunit" Version="2.4.1" />
|
<PackageReference Include="xunit" Version="2.4.1" />
|
||||||
<PackageReference Include="xunit.runner.console" Version="2.4.1" />
|
<PackageReference Include="xunit.runner.console" Version="2.4.1" />
|
||||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.2" />
|
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.2" />
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
|
||||||
<PackageReference Include="xunit" Version="2.4.1" />
|
<PackageReference Include="xunit" Version="2.4.1" />
|
||||||
<PackageReference Include="xunit.runner.console" Version="2.4.1" />
|
<PackageReference Include="xunit.runner.console" Version="2.4.1" />
|
||||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.2" />
|
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.2" />
|
||||||
|
@ -30,7 +30,8 @@ namespace Wabbajack.Common
|
|||||||
Fallout4VR,
|
Fallout4VR,
|
||||||
//MO2 Non-BGS Games
|
//MO2 Non-BGS Games
|
||||||
[Description("Darkest Dungeon")]
|
[Description("Darkest Dungeon")]
|
||||||
DarkestDungeon
|
DarkestDungeon,
|
||||||
|
Witcher3
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class GameExtensions
|
public static class GameExtensions
|
||||||
@ -433,7 +434,22 @@ namespace Wabbajack.Common
|
|||||||
},
|
},
|
||||||
MainExecutable = "_windows\\Darkest.exe"
|
MainExecutable = "_windows\\Darkest.exe"
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
Game.Witcher3, new GameMetaData
|
||||||
|
{
|
||||||
|
Game = Game.Witcher3,
|
||||||
|
NexusName = "witcher3",
|
||||||
|
NexusGameId = 952,
|
||||||
|
SteamIDs = new List<int>{292030, 499450}, // normal and GotY
|
||||||
|
GOGIDs = new List<int>{1207664643, 1495134320, 1207664663, 1640424747}, // normal, GotY and both in packages
|
||||||
|
RequiredFiles = new List<string>
|
||||||
|
{
|
||||||
|
"bin\\x64\\witcher3.exe"
|
||||||
|
},
|
||||||
|
MainExecutable = @"bin\x64\witcher3.exe"
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -149,7 +149,7 @@ namespace Wabbajack.BuildServer.Test
|
|||||||
private readonly IDisposable _unsubErr;
|
private readonly IDisposable _unsubErr;
|
||||||
protected Wabbajack.Lib.Http.Client _authedClient;
|
protected Wabbajack.Lib.Http.Client _authedClient;
|
||||||
protected WorkQueue _queue;
|
protected WorkQueue _queue;
|
||||||
private Random _random;
|
protected Random Random;
|
||||||
|
|
||||||
|
|
||||||
public ABuildServerSystemTest(ITestOutputHelper output, SingletonAdaptor<BuildServerFixture> fixture) : base(output)
|
public ABuildServerSystemTest(ITestOutputHelper output, SingletonAdaptor<BuildServerFixture> fixture) : base(output)
|
||||||
@ -165,7 +165,7 @@ namespace Wabbajack.BuildServer.Test
|
|||||||
AuthorAPI.ApiKeyOverride = Fixture.APIKey;
|
AuthorAPI.ApiKeyOverride = Fixture.APIKey;
|
||||||
_queue = new WorkQueue();
|
_queue = new WorkQueue();
|
||||||
Queue = new WorkQueue();
|
Queue = new WorkQueue();
|
||||||
_random = new Random();
|
Random = new Random();
|
||||||
|
|
||||||
Consts.ModlistSummaryURL = MakeURL("lists/status.json");
|
Consts.ModlistSummaryURL = MakeURL("lists/status.json");
|
||||||
Consts.ServerWhitelistURL = MakeURL("ServerWhitelist.yaml");
|
Consts.ServerWhitelistURL = MakeURL("ServerWhitelist.yaml");
|
||||||
@ -184,8 +184,8 @@ namespace Wabbajack.BuildServer.Test
|
|||||||
|
|
||||||
protected byte[] RandomData(long? size = null)
|
protected byte[] RandomData(long? size = null)
|
||||||
{
|
{
|
||||||
var arr = new byte[size ?? _random.Next(1024)];
|
var arr = new byte[size ?? Random.Next(1024)];
|
||||||
_random.NextBytes(arr);
|
Random.NextBytes(arr);
|
||||||
return arr;
|
return arr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Wabbajack.Common;
|
||||||
using Wabbajack.Lib;
|
using Wabbajack.Lib;
|
||||||
using Wabbajack.Lib.Downloaders;
|
using Wabbajack.Lib.Downloaders;
|
||||||
using Wabbajack.Server.DataLayer;
|
using Wabbajack.Server.DataLayer;
|
||||||
@ -39,6 +40,29 @@ namespace Wabbajack.BuildServer.Test
|
|||||||
Assert.Contains(state.PrimaryKeyString, allStates.Select(s => s.PrimaryKeyString));
|
Assert.Contains(state.PrimaryKeyString, allStates.Select(s => s.PrimaryKeyString));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task DontReenqueueDownloadedfiles()
|
||||||
|
{
|
||||||
|
var hash = Hash.FromLong(Random.Next(int.MinValue, int.MaxValue));
|
||||||
|
await ClearDownloaderQueue();
|
||||||
|
var _sql = Fixture.GetService<SqlService>();
|
||||||
|
var archive = new Archive(new HTTPDownloader.State("http://www.google.com")) {Size = 42, Hash = hash,};
|
||||||
|
await _sql.EnqueueDownload(archive);
|
||||||
|
|
||||||
|
var download = await _sql.GetNextPendingDownload();
|
||||||
|
await download.Finish(_sql);
|
||||||
|
Assert.Null(await _sql.GetNextPendingDownload());
|
||||||
|
|
||||||
|
var found = await _sql.GetArchiveDownload(archive.State.PrimaryKeyString, archive.Hash, archive.Size);
|
||||||
|
Assert.NotNull(found);
|
||||||
|
|
||||||
|
var next = await _sql.GetOrEnqueueArchive(archive);
|
||||||
|
Assert.Null(await _sql.GetNextPendingDownload());
|
||||||
|
|
||||||
|
await ClearDownloaderQueue();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private async Task ClearDownloaderQueue()
|
private async Task ClearDownloaderQueue()
|
||||||
{
|
{
|
||||||
var service = Fixture.GetService<SqlService>();
|
var service = Fixture.GetService<SqlService>();
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="CefSharp.Common" Version="83.3.120-pre" />
|
<PackageReference Include="CefSharp.Common" Version="83.3.120-pre" />
|
||||||
<PackageReference Include="CefSharp.OffScreen" Version="83.3.120-pre" />
|
<PackageReference Include="CefSharp.OffScreen" Version="83.3.120-pre" />
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.0-preview-20200519-01" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
|
||||||
<PackageReference Include="xunit" Version="2.4.1" />
|
<PackageReference Include="xunit" Version="2.4.1" />
|
||||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.2" />
|
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.2" />
|
||||||
<PackageReference Include="coverlet.collector" Version="1.3.0" />
|
<PackageReference Include="coverlet.collector" Version="1.3.0" />
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
|
||||||
<PackageReference Include="xunit" Version="2.4.1" />
|
<PackageReference Include="xunit" Version="2.4.1" />
|
||||||
<PackageReference Include="xunit.runner.console" Version="2.4.1" />
|
<PackageReference Include="xunit.runner.console" Version="2.4.1" />
|
||||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.2" />
|
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.2" />
|
||||||
|
Loading…
Reference in New Issue
Block a user