mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Update GameFinder to 4.0.0
This commit is contained in:
parent
a64e70d9ab
commit
84e55cedef
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.2-mauipre.1.22102.15" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.2-mauipre.1.22102.15" />
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.2-mauipre.1.22102.15" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.2-mauipre.1.22102.15" />
|
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.2-mauipre.1.22102.15" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.2-mauipre.1.22102.15" />
|
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.2-mauipre.1.22102.15" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.3" />
|
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.3" />
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.2-mauipre.1.22102.15" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.2-mauipre.1.22102.15" />
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.2-mauipre.1.22102.15" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.2-mauipre.1.22102.15" />
|
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.2-mauipre.1.22102.15" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.2-mauipre.1.22102.15" />
|
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.2-mauipre.1.22102.15" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.3" />
|
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.3" />
|
||||||
|
@ -21,7 +21,7 @@ public class GameMetaData
|
|||||||
public int[] SteamIDs { get; internal init; } = Array.Empty<int>();
|
public int[] SteamIDs { get; internal init; } = Array.Empty<int>();
|
||||||
|
|
||||||
// to get gog ids: https://www.gogdb.org
|
// to get gog ids: https://www.gogdb.org
|
||||||
public int[] GOGIDs { get; internal init; } = Array.Empty<int>();
|
public long[] GOGIDs { get; internal init; } = Array.Empty<long>();
|
||||||
|
|
||||||
// to get these ids, split the numbers from the letters in file names found in
|
// to get these ids, split the numbers from the letters in file names found in
|
||||||
// C:\ProgramData\Origin\LocalContent\{game name)\*.mfst
|
// C:\ProgramData\Origin\LocalContent\{game name)\*.mfst
|
||||||
|
@ -14,7 +14,7 @@ public static class GameRegistry
|
|||||||
{
|
{
|
||||||
Game = Game.Morrowind,
|
Game = Game.Morrowind,
|
||||||
SteamIDs = new[] {22320},
|
SteamIDs = new[] {22320},
|
||||||
GOGIDs = new[] {1440163901, 1435828767},
|
GOGIDs = new long[] {1440163901, 1435828767},
|
||||||
NexusName = "morrowind",
|
NexusName = "morrowind",
|
||||||
NexusGameId = 100,
|
NexusGameId = 100,
|
||||||
MO2Name = "Morrowind",
|
MO2Name = "Morrowind",
|
||||||
@ -38,7 +38,7 @@ public static class GameRegistry
|
|||||||
MO2Name = "Oblivion",
|
MO2Name = "Oblivion",
|
||||||
MO2ArchiveName = "oblivion",
|
MO2ArchiveName = "oblivion",
|
||||||
SteamIDs = new[] {22330},
|
SteamIDs = new[] {22330},
|
||||||
GOGIDs = new[] {1458058109},
|
GOGIDs = new long[] {1458058109},
|
||||||
RequiredFiles = new[]
|
RequiredFiles = new[]
|
||||||
{
|
{
|
||||||
"oblivion.exe".ToRelativePath()
|
"oblivion.exe".ToRelativePath()
|
||||||
@ -56,7 +56,7 @@ public static class GameRegistry
|
|||||||
MO2Name = "Fallout 3",
|
MO2Name = "Fallout 3",
|
||||||
MO2ArchiveName = "fallout3",
|
MO2ArchiveName = "fallout3",
|
||||||
SteamIDs = new[] {22300, 22370}, // base game and GotY
|
SteamIDs = new[] {22300, 22370}, // base game and GotY
|
||||||
GOGIDs = new[] {1454315831}, // GotY edition
|
GOGIDs = new long[] {1454315831}, // GotY edition
|
||||||
RequiredFiles = new[]
|
RequiredFiles = new[]
|
||||||
{
|
{
|
||||||
"Fallout3.exe".ToRelativePath()
|
"Fallout3.exe".ToRelativePath()
|
||||||
@ -73,7 +73,7 @@ public static class GameRegistry
|
|||||||
MO2Name = "New Vegas",
|
MO2Name = "New Vegas",
|
||||||
MO2ArchiveName = "falloutnv",
|
MO2ArchiveName = "falloutnv",
|
||||||
SteamIDs = new[] {22380, 22490}, // normal and RU version
|
SteamIDs = new[] {22380, 22490}, // normal and RU version
|
||||||
GOGIDs = new[] {1454587428},
|
GOGIDs = new long[] {1454587428},
|
||||||
RequiredFiles = new[]
|
RequiredFiles = new[]
|
||||||
{
|
{
|
||||||
"FalloutNV.exe".ToRelativePath()
|
"FalloutNV.exe".ToRelativePath()
|
||||||
@ -107,7 +107,7 @@ public static class GameRegistry
|
|||||||
MO2Name = "Skyrim Special Edition",
|
MO2Name = "Skyrim Special Edition",
|
||||||
MO2ArchiveName = "skyrimse",
|
MO2ArchiveName = "skyrimse",
|
||||||
SteamIDs = new[] {489830},
|
SteamIDs = new[] {489830},
|
||||||
GOGIDs = new[]
|
GOGIDs = new long[]
|
||||||
{
|
{
|
||||||
1711230643,// The Elder Scrolls V: Skyrim Special Edition AKA Base Game
|
1711230643,// The Elder Scrolls V: Skyrim Special Edition AKA Base Game
|
||||||
1801825368,// The Elder Scrolls V: Skyrim Anniversary Edition AKA The Store Bundle
|
1801825368,// The Elder Scrolls V: Skyrim Anniversary Edition AKA The Store Bundle
|
||||||
@ -130,7 +130,7 @@ public static class GameRegistry
|
|||||||
MO2Name = "Fallout 4",
|
MO2Name = "Fallout 4",
|
||||||
MO2ArchiveName = "fallout4",
|
MO2ArchiveName = "fallout4",
|
||||||
SteamIDs = new[] {377160},
|
SteamIDs = new[] {377160},
|
||||||
GOGIDs = new []{1998527297},
|
GOGIDs = new long[]{1998527297},
|
||||||
RequiredFiles = new[]
|
RequiredFiles = new[]
|
||||||
{
|
{
|
||||||
"Fallout4.exe".ToRelativePath()
|
"Fallout4.exe".ToRelativePath()
|
||||||
@ -183,7 +183,7 @@ public static class GameRegistry
|
|||||||
MO2Name = "Enderal Special Edition",
|
MO2Name = "Enderal Special Edition",
|
||||||
MO2ArchiveName = "enderalse",
|
MO2ArchiveName = "enderalse",
|
||||||
SteamIDs = new[] {976620},
|
SteamIDs = new[] {976620},
|
||||||
GOGIDs = new [] {1708684988},
|
GOGIDs = new long[] {1708684988},
|
||||||
RequiredFiles = new[]
|
RequiredFiles = new[]
|
||||||
{
|
{
|
||||||
"SkyrimSE.exe".ToRelativePath()
|
"SkyrimSE.exe".ToRelativePath()
|
||||||
@ -217,7 +217,7 @@ public static class GameRegistry
|
|||||||
MO2Name = "Darkest Dungeon",
|
MO2Name = "Darkest Dungeon",
|
||||||
NexusGameId = 804,
|
NexusGameId = 804,
|
||||||
SteamIDs = new[] {262060},
|
SteamIDs = new[] {262060},
|
||||||
GOGIDs = new[] {1450711444},
|
GOGIDs = new long[] {1450711444},
|
||||||
EpicGameStoreIDs = new[] {"b4eecf70e3fe4e928b78df7855a3fc2d"},
|
EpicGameStoreIDs = new[] {"b4eecf70e3fe4e928b78df7855a3fc2d"},
|
||||||
IsGenericMO2Plugin = true,
|
IsGenericMO2Plugin = true,
|
||||||
RequiredFiles = new[]
|
RequiredFiles = new[]
|
||||||
@ -236,7 +236,7 @@ public static class GameRegistry
|
|||||||
MO2ArchiveName = "dishonored",
|
MO2ArchiveName = "dishonored",
|
||||||
NexusGameId = 802,
|
NexusGameId = 802,
|
||||||
SteamIDs = new[] {205100},
|
SteamIDs = new[] {205100},
|
||||||
GOGIDs = new[] {1701063787},
|
GOGIDs = new long[] {1701063787},
|
||||||
RequiredFiles = new[]
|
RequiredFiles = new[]
|
||||||
{
|
{
|
||||||
@"Binaries\Win32\Dishonored.exe".ToRelativePath()
|
@"Binaries\Win32\Dishonored.exe".ToRelativePath()
|
||||||
@ -253,7 +253,7 @@ public static class GameRegistry
|
|||||||
MO2Name = "The Witcher: Enhanced Edition",
|
MO2Name = "The Witcher: Enhanced Edition",
|
||||||
MO2ArchiveName = "witcher",
|
MO2ArchiveName = "witcher",
|
||||||
SteamIDs = new[] {20900}, // normal and GotY
|
SteamIDs = new[] {20900}, // normal and GotY
|
||||||
GOGIDs = new[] {1207658924}, // normal, GotY and both in packages
|
GOGIDs = new long[] {1207658924}, // normal, GotY and both in packages
|
||||||
RequiredFiles = new[]
|
RequiredFiles = new[]
|
||||||
{
|
{
|
||||||
@"System\witcher.exe".ToRelativePath()
|
@"System\witcher.exe".ToRelativePath()
|
||||||
@ -270,7 +270,7 @@ public static class GameRegistry
|
|||||||
MO2Name = "The Witcher 3: Wild Hunt",
|
MO2Name = "The Witcher 3: Wild Hunt",
|
||||||
MO2ArchiveName = "witcher3",
|
MO2ArchiveName = "witcher3",
|
||||||
SteamIDs = new[] {292030, 499450}, // normal and GotY
|
SteamIDs = new[] {292030, 499450}, // normal and GotY
|
||||||
GOGIDs = new[]
|
GOGIDs = new long[]
|
||||||
{1207664643, 1495134320, 1207664663, 1640424747}, // normal, GotY and both in packages
|
{1207664643, 1495134320, 1207664663, 1640424747}, // normal, GotY and both in packages
|
||||||
RequiredFiles = new[]
|
RequiredFiles = new[]
|
||||||
{
|
{
|
||||||
@ -288,7 +288,7 @@ public static class GameRegistry
|
|||||||
MO2ArchiveName = "stardewvalley",
|
MO2ArchiveName = "stardewvalley",
|
||||||
NexusGameId = 1303,
|
NexusGameId = 1303,
|
||||||
SteamIDs = new[] {413150},
|
SteamIDs = new[] {413150},
|
||||||
GOGIDs = new[] {1453375253},
|
GOGIDs = new long[] {1453375253},
|
||||||
IsGenericMO2Plugin = true,
|
IsGenericMO2Plugin = true,
|
||||||
RequiredFiles = new[]
|
RequiredFiles = new[]
|
||||||
{
|
{
|
||||||
@ -306,7 +306,7 @@ public static class GameRegistry
|
|||||||
MO2ArchiveName = "kingdomcomedeliverance",
|
MO2ArchiveName = "kingdomcomedeliverance",
|
||||||
NexusGameId = 2298,
|
NexusGameId = 2298,
|
||||||
SteamIDs = new[] {379430},
|
SteamIDs = new[] {379430},
|
||||||
GOGIDs = new[] {1719198803},
|
GOGIDs = new long[] {1719198803},
|
||||||
IsGenericMO2Plugin = true,
|
IsGenericMO2Plugin = true,
|
||||||
RequiredFiles = new[]
|
RequiredFiles = new[]
|
||||||
{
|
{
|
||||||
@ -340,7 +340,7 @@ public static class GameRegistry
|
|||||||
NexusGameId = 1634,
|
NexusGameId = 1634,
|
||||||
MO2Name = "No Man's Sky",
|
MO2Name = "No Man's Sky",
|
||||||
SteamIDs = new[] {275850},
|
SteamIDs = new[] {275850},
|
||||||
GOGIDs = new[] {1446213994},
|
GOGIDs = new long[] {1446213994},
|
||||||
RequiredFiles = new[]
|
RequiredFiles = new[]
|
||||||
{
|
{
|
||||||
@"Binaries\NMS.exe".ToRelativePath()
|
@"Binaries\NMS.exe".ToRelativePath()
|
||||||
@ -357,7 +357,7 @@ public static class GameRegistry
|
|||||||
MO2Name = "Dragon Age: Origins",
|
MO2Name = "Dragon Age: Origins",
|
||||||
SteamIDs = new[] {47810},
|
SteamIDs = new[] {47810},
|
||||||
OriginIDs = new[] {"DR:169789300", "DR:208591800"},
|
OriginIDs = new[] {"DR:169789300", "DR:208591800"},
|
||||||
GOGIDs = new[] {1949616134},
|
GOGIDs = new long[] {1949616134},
|
||||||
RequiredFiles = new[]
|
RequiredFiles = new[]
|
||||||
{
|
{
|
||||||
@"bin_ship\daorigins.exe".ToRelativePath()
|
@"bin_ship\daorigins.exe".ToRelativePath()
|
||||||
@ -405,7 +405,7 @@ public static class GameRegistry
|
|||||||
MO2Name = "Kerbal Space Program",
|
MO2Name = "Kerbal Space Program",
|
||||||
NexusGameId = 272,
|
NexusGameId = 272,
|
||||||
SteamIDs = new[] {220200},
|
SteamIDs = new[] {220200},
|
||||||
GOGIDs = new[] {1429864849},
|
GOGIDs = new long[] {1429864849},
|
||||||
IsGenericMO2Plugin = true,
|
IsGenericMO2Plugin = true,
|
||||||
RequiredFiles = new[]
|
RequiredFiles = new[]
|
||||||
{
|
{
|
||||||
@ -433,7 +433,7 @@ public static class GameRegistry
|
|||||||
{
|
{
|
||||||
Game = Game.Cyberpunk2077,
|
Game = Game.Cyberpunk2077,
|
||||||
SteamIDs = new[] {1091500},
|
SteamIDs = new[] {1091500},
|
||||||
GOGIDs = new [] {2093619782, 1423049311},
|
GOGIDs = new long[] {2093619782, 1423049311},
|
||||||
EpicGameStoreIDs = new[] {"5beededaad9743df90e8f07d92df153f"},
|
EpicGameStoreIDs = new[] {"5beededaad9743df90e8f07d92df153f"},
|
||||||
MO2Name = "Cyberpunk 2077",
|
MO2Name = "Cyberpunk 2077",
|
||||||
NexusName = "cyberpunk2077",
|
NexusName = "cyberpunk2077",
|
||||||
@ -467,7 +467,7 @@ public static class GameRegistry
|
|||||||
{
|
{
|
||||||
Game = Game.DragonsDogma,
|
Game = Game.DragonsDogma,
|
||||||
SteamIDs = new[] {367500 },
|
SteamIDs = new[] {367500 },
|
||||||
GOGIDs = new []{1242384383},
|
GOGIDs = new long[]{1242384383},
|
||||||
MO2Name = "Dragon's Dogma: Dark Arisen",
|
MO2Name = "Dragon's Dogma: Dark Arisen",
|
||||||
MO2ArchiveName = "dragonsdogma",
|
MO2ArchiveName = "dragonsdogma",
|
||||||
NexusName = "dragonsdogma",
|
NexusName = "dragonsdogma",
|
||||||
@ -521,7 +521,7 @@ public static class GameRegistry
|
|||||||
MO2Name = "Mount & Blade II: Bannerlord",
|
MO2Name = "Mount & Blade II: Bannerlord",
|
||||||
MO2ArchiveName = "mountandblade2bannerlord",
|
MO2ArchiveName = "mountandblade2bannerlord",
|
||||||
SteamIDs = new[] { 261550 },
|
SteamIDs = new[] { 261550 },
|
||||||
GOGIDs = new [] {
|
GOGIDs = new long[] {
|
||||||
1564781494, //Mount & Blade II: Bannerlord : Game
|
1564781494, //Mount & Blade II: Bannerlord : Game
|
||||||
1681929523, //Mount & Blade II: Bannerlord - Digital Deluxe : Package
|
1681929523, //Mount & Blade II: Bannerlord - Digital Deluxe : Package
|
||||||
1802539526, //Mount & Blade II: Bannerlord : Package
|
1802539526, //Mount & Blade II: Bannerlord : Package
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.2-mauipre.1.22102.15" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0-preview-20221003-04" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0-preview-20221003-04" />
|
||||||
<PackageReference Include="xunit" Version="2.4.2" />
|
<PackageReference Include="xunit" Version="2.4.2" />
|
||||||
<PackageReference Include="Xunit.DependencyInjection.Logging" Version="8.0.1" />
|
<PackageReference Include="Xunit.DependencyInjection.Logging" Version="8.0.1" />
|
||||||
|
@ -5,6 +5,8 @@ using GameFinder.StoreHandlers.EGS;
|
|||||||
using GameFinder.StoreHandlers.GOG;
|
using GameFinder.StoreHandlers.GOG;
|
||||||
using GameFinder.StoreHandlers.Origin;
|
using GameFinder.StoreHandlers.Origin;
|
||||||
using GameFinder.StoreHandlers.Steam;
|
using GameFinder.StoreHandlers.Steam;
|
||||||
|
using GameFinder.StoreHandlers.Steam.Models;
|
||||||
|
using GameFinder.StoreHandlers.Steam.Models.ValueTypes;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Wabbajack.DTOs;
|
using Wabbajack.DTOs;
|
||||||
using Wabbajack.Paths;
|
using Wabbajack.Paths;
|
||||||
@ -19,10 +21,10 @@ public class GameLocator : IGameLocator
|
|||||||
private readonly EGSHandler? _egs;
|
private readonly EGSHandler? _egs;
|
||||||
private readonly OriginHandler? _origin;
|
private readonly OriginHandler? _origin;
|
||||||
|
|
||||||
private readonly Dictionary<int, AbsolutePath> _steamGames = new();
|
private readonly Dictionary<AppId, AbsolutePath> _steamGames = new();
|
||||||
private readonly Dictionary<long, AbsolutePath> _gogGames = new();
|
private readonly Dictionary<GOGGameId, AbsolutePath> _gogGames = new();
|
||||||
private readonly Dictionary<string, AbsolutePath> _egsGames = new(StringComparer.OrdinalIgnoreCase);
|
private readonly Dictionary<EGSGameId, AbsolutePath> _egsGames = new();
|
||||||
private readonly Dictionary<string, AbsolutePath> _originGames = new(StringComparer.OrdinalIgnoreCase);
|
private readonly Dictionary<OriginGameId, AbsolutePath> _originGames = new();
|
||||||
|
|
||||||
private readonly Dictionary<Game, AbsolutePath> _locationCache;
|
private readonly Dictionary<Game, AbsolutePath> _locationCache;
|
||||||
private readonly ILogger<GameLocator> _logger;
|
private readonly ILogger<GameLocator> _logger;
|
||||||
@ -30,19 +32,20 @@ public class GameLocator : IGameLocator
|
|||||||
public GameLocator(ILogger<GameLocator> logger)
|
public GameLocator(ILogger<GameLocator> logger)
|
||||||
{
|
{
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
|
var fileSystem = NexusMods.Paths.FileSystem.Shared;
|
||||||
|
|
||||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||||
{
|
{
|
||||||
var windowsRegistry = new WindowsRegistry();
|
var windowsRegistry = new WindowsRegistry();
|
||||||
|
|
||||||
_steam = new SteamHandler(windowsRegistry);
|
_steam = new SteamHandler(fileSystem, windowsRegistry);
|
||||||
_gog = new GOGHandler(windowsRegistry);
|
_gog = new GOGHandler(windowsRegistry, fileSystem);
|
||||||
_egs = new EGSHandler(windowsRegistry);
|
_egs = new EGSHandler(windowsRegistry, fileSystem);
|
||||||
_origin = new OriginHandler();
|
_origin = new OriginHandler(fileSystem);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_steam = new SteamHandler(null);
|
_steam = new SteamHandler(fileSystem, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
_locationCache = new Dictionary<Game, AbsolutePath>();
|
_locationCache = new Dictionary<Game, AbsolutePath>();
|
||||||
@ -54,7 +57,7 @@ public class GameLocator : IGameLocator
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
FindStoreGames(_steam, _steamGames, game => game.Path);
|
FindStoreGames(_steam, _steamGames, game => (AbsolutePath)game.Path.GetFullPath());
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
@ -63,7 +66,7 @@ public class GameLocator : IGameLocator
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
FindStoreGames(_gog, _gogGames, game => game.Path);
|
FindStoreGames(_gog, _gogGames, game => (AbsolutePath)game.Path.GetFullPath());
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
@ -72,7 +75,7 @@ public class GameLocator : IGameLocator
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
FindStoreGames(_egs, _egsGames, game => game.InstallLocation);
|
FindStoreGames(_egs, _egsGames, game => (AbsolutePath)game.InstallLocation.GetFullPath());
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
@ -81,7 +84,7 @@ public class GameLocator : IGameLocator
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
FindStoreGames(_origin, _originGames, game => game.InstallPath);
|
FindStoreGames(_origin, _originGames, game => (AbsolutePath)game.InstallPath.GetFullPath());
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
@ -92,8 +95,9 @@ public class GameLocator : IGameLocator
|
|||||||
private void FindStoreGames<TGame, TId>(
|
private void FindStoreGames<TGame, TId>(
|
||||||
AHandler<TGame, TId>? handler,
|
AHandler<TGame, TId>? handler,
|
||||||
Dictionary<TId, AbsolutePath> paths,
|
Dictionary<TId, AbsolutePath> paths,
|
||||||
Func<TGame, string> getPath)
|
Func<TGame, AbsolutePath> getPath)
|
||||||
where TGame : class
|
where TGame : class, IGame
|
||||||
|
where TId : notnull
|
||||||
{
|
{
|
||||||
if (handler is null) return;
|
if (handler is null) return;
|
||||||
|
|
||||||
@ -103,7 +107,7 @@ public class GameLocator : IGameLocator
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var path = getPath(game).ToAbsolutePath();
|
var path = getPath(game);
|
||||||
if (!path.DirectoryExists())
|
if (!path.DirectoryExists())
|
||||||
{
|
{
|
||||||
_logger.LogError("Game does not exist: {Game}", game);
|
_logger.LogError("Game does not exist: {Game}", game);
|
||||||
@ -160,28 +164,28 @@ public class GameLocator : IGameLocator
|
|||||||
|
|
||||||
foreach (var id in metaData.SteamIDs)
|
foreach (var id in metaData.SteamIDs)
|
||||||
{
|
{
|
||||||
if (!_steamGames.TryGetValue(id, out var found)) continue;
|
if (!_steamGames.TryGetValue(AppId.From((uint)id), out var found)) continue;
|
||||||
path = found;
|
path = found;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var id in metaData.GOGIDs)
|
foreach (var id in metaData.GOGIDs)
|
||||||
{
|
{
|
||||||
if (!_gogGames.TryGetValue(id, out var found)) continue;
|
if (!_gogGames.TryGetValue(GOGGameId.From(id), out var found)) continue;
|
||||||
path = found;
|
path = found;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var id in metaData.EpicGameStoreIDs)
|
foreach (var id in metaData.EpicGameStoreIDs)
|
||||||
{
|
{
|
||||||
if (!_egsGames.TryGetValue(id, out var found)) continue;
|
if (!_egsGames.TryGetValue(EGSGameId.From(id), out var found)) continue;
|
||||||
path = found;
|
path = found;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var id in metaData.OriginIDs)
|
foreach (var id in metaData.OriginIDs)
|
||||||
{
|
{
|
||||||
if (!_originGames.TryGetValue(id, out var found)) continue;
|
if (!_originGames.TryGetValue(OriginGameId.From(id), out var found)) continue;
|
||||||
path = found;
|
path = found;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -18,10 +18,10 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="GameFinder.StoreHandlers.EGS" Version="2.2.2" />
|
<PackageReference Include="GameFinder.StoreHandlers.EGS" Version="4.0.0" />
|
||||||
<PackageReference Include="GameFinder.StoreHandlers.GOG" Version="2.2.2" />
|
<PackageReference Include="GameFinder.StoreHandlers.GOG" Version="4.0.0" />
|
||||||
<PackageReference Include="GameFinder.StoreHandlers.Origin" Version="2.2.2" />
|
<PackageReference Include="GameFinder.StoreHandlers.Origin" Version="4.0.0" />
|
||||||
<PackageReference Include="GameFinder.StoreHandlers.Steam" Version="2.2.2" />
|
<PackageReference Include="GameFinder.StoreHandlers.Steam" Version="4.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="HtmlAgilityPack" Version="1.11.46" />
|
<PackageReference Include="HtmlAgilityPack" Version="1.11.46" />
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.2-mauipre.1.22102.15" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.3" />
|
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.3" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.2-mauipre.1.22102.15" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.3" />
|
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.3" />
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0-preview-20221003-04" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0-preview-20221003-04" />
|
||||||
<PackageReference Include="xunit" Version="2.4.2" />
|
<PackageReference Include="xunit" Version="2.4.2" />
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.2-mauipre.1.22102.15" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0-preview-20221003-04" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0-preview-20221003-04" />
|
||||||
<PackageReference Include="xunit" Version="2.4.2" />
|
<PackageReference Include="xunit" Version="2.4.2" />
|
||||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
|
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.2-mauipre.1.22102.15" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.3" />
|
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.3" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.2-mauipre.1.22102.15" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0-preview-20221003-04" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0-preview-20221003-04" />
|
||||||
<PackageReference Include="xunit" Version="2.4.2" />
|
<PackageReference Include="xunit" Version="2.4.2" />
|
||||||
<PackageReference Include="Xunit.DependencyInjection" Version="8.6.1" />
|
<PackageReference Include="Xunit.DependencyInjection" Version="8.6.1" />
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.2-mauipre.1.22102.15" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.2-mauipre.1.22102.15" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.3" />
|
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.3" />
|
||||||
<PackageReference Include="System.Data.SQLite.Core" Version="1.0.116" />
|
<PackageReference Include="System.Data.SQLite.Core" Version="1.0.116" />
|
||||||
<PackageReference Include="Xunit.DependencyInjection" Version="8.6.1" />
|
<PackageReference Include="Xunit.DependencyInjection" Version="8.6.1" />
|
||||||
|
Loading…
Reference in New Issue
Block a user