GameFinder.StoreHandlers.GOG
2.6.0
See the version list below for details.
dotnet add package GameFinder.StoreHandlers.GOG --version 2.6.0
NuGet\Install-Package GameFinder.StoreHandlers.GOG -Version 2.6.0
<PackageReference Include="GameFinder.StoreHandlers.GOG" Version="2.6.0" />
paket add GameFinder.StoreHandlers.GOG --version 2.6.0
#r "nuget: GameFinder.StoreHandlers.GOG, 2.6.0"
// Install GameFinder.StoreHandlers.GOG as a Cake Addin
#addin nuget:?package=GameFinder.StoreHandlers.GOG&version=2.6.0
// Install GameFinder.StoreHandlers.GOG as a Cake Tool
#tool nuget:?package=GameFinder.StoreHandlers.GOG&version=2.6.0
GameFinder
.NET library for finding games. The following launchers are supported:
The following launchers are not yet supported or support has been dropped:
If you are interested in understanding how GameFinder finds these games, check the wiki for more information.
Additionally, the following Linux tools are supported:
Supported Launchers
Steam
Steam is supported on Windows and Linux. Use SteamDB to find the ID of a game.
Usage:
// use the Windows registry on Windows
// Linux doesn't have a registry
var handler = RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
? new SteamHandler(new WindowsRegistry())
: new SteamHandler(registry: null);
// method 1: iterate over the game-error result
foreach (var (game, error) in handler.FindAllGames())
{
if (game is not null)
{
Console.WriteLine($"Found {game}");
}
else
{
Console.WriteLine($"Error: {error}");
}
}
// method 2: use the dictionary if you need to find games by id
Dictionary<SteamGame, int> games = handler.FindAllGamesById(out string[] errors);
// method 3: find a single game by id
SteamGame? game = handler.FindOneGameById(570940, out string[] errors);
GOG Galaxy
GOG Galaxy is only supported on Windows. Use the GOG Database to find the ID of a game.
Usage:
var handler = new GOGHandler();
// method 1: iterate over the game-error result
foreach (var (game, error) in handler.FindAllGames())
{
if (game is not null)
{
Console.WriteLine($"Found {game}");
}
else
{
Console.WriteLine($"Error: {error}");
}
}
// method 2: use the dictionary if you need to find games by id
Dictionary<GOGGame, long> games = handler.FindAllGamesById(out string[] errors);
// method 3: find a single game by id
GOGGame? game = handler.FindOneGameById(1971477531, out string[] errors);
Epic Games Store
Epic Games Store is only supported on Windows.
Usage:
var handler = new EGSHandler();
// method 1: iterate over the game-error result
foreach (var (game, error) in handler.FindAllGames())
{
if (game is not null)
{
Console.WriteLine($"Found {game}");
}
else
{
Console.WriteLine($"Error: {error}");
}
}
// method 2: use the dictionary if you need to find games by id
Dictionary<EGSGame, string> games = handler.FindAllGamesById(out string[] errors);
// method 3: find a single game by id
EGSGame? game = handler.FindOneGameById("3257e06c28764231acd93049f3774ed6", out string[] errors);
Origin
Origin is only supported on Windows. Note: EA is deprecating Origin and will replace it with EA Desktop.
Usage:
var handler = new OriginHandler();
// method 1: iterate over the game-error result
foreach (var (game, error) in handler.FindAllGames())
{
if (game is not null)
{
Console.WriteLine($"Found {game}");
}
else
{
Console.WriteLine($"Error: {error}");
}
}
// method 2: use the dictionary if you need to find games by id
Dictionary<OriginGame, string> games = handler.FindAllGamesById(out string[] errors);
// method 3: find a single game by id
OriginGame? game = handler.FindOneGameById("Origin.OFR.50.0001456", out string[] errors);
EA Desktop
EA Desktop is the replacement for Origin: See EA is deprecating Origin. This is by far, the most complicated Store Handler. You should read the wiki entry. My implementation decrypts the encrypted file, created by EA Desktop. You should be aware that the key used to encrypt the file is derived from hardware information. If the user changes their hardware, the decryption process might fail because they key has changed.
Usage:
var handler = new EADesktopHandler();
// method 1: iterate over the game-error result
foreach (var (game, error) in handler.FindAllGames())
{
if (game is not null)
{
Console.WriteLine($"Found {game}");
}
else
{
Console.WriteLine($"Error: {error}");
}
}
// method 2: use the dictionary if you need to find games by id
Dictionary<EADesktopGame, string> games = handler.FindAllGamesById(out string[] errors);
// method 3: find a single game by id
EADesktopGame? game = handler.FindOneGameById("Origin.SFT.50.0000532", out string[] errors);
Bethesda.net
As of May 11, 2022, the Bethesda.net launcher is no longer in use. The package GameFinder.StoreHandlers.BethNet has been deprecated and marked as legacy.
Xbox Game Pass
The package GameFinder.StoreHandlers.Xbox has been deprecated and marked as legacy. I no longer maintain this package because it never got used. I initially made GameFinder for Wabbajack and other modding tools however, you can't mod games installed with the Xbox App on Windows. These games are installed as UWP apps, which makes them protected and hard to modify. Another issue is the fact that you can't distinguish between normal UWP apps and Xbox games, meaning your calculator will show up as an Xbox game.
The final issue is related to actual code: in order to find all UWP apps I used the Windows SDK, which was a pain to integrate. The CI had to be on Windows, the .NET target framework had to be a Windows specific version (net6.0-windows-XXXXXXXXXX
), and it was overall not nice to use.
The package is still available on NuGet and should still work, but it's marked as deprecated and won't receive any updates.
Linux tools
Wine
GameFinder.Wine
implements a IWinePrefixManager
for finding Wineprefixes.
Usage:
var prefixManager = new DefaultWinePrefixManager(new FileSystem());
foreach (var result in prefixManager.FindPrefixes())
{
result.Switch(prefix =>
{
Console.WriteLine($"Found wine prefix at {prefix.ConfigurationDirectory}");
}, error =>
{
Console.WriteLine(error.Value);
});
}
Bottles
GameFinder.Wine
implements a IWinePrefixManager
for finding Wine prefixes managed by Bottles.
Usage:
var prefixManager = new BottlesWinePrefixManager(new FileSystem());
foreach (var result in prefixManager.FindPrefixes())
{
result.Switch(prefix =>
{
Console.WriteLine($"Found wine prefix at {prefix.ConfigurationDirectory}");
}, error =>
{
Console.WriteLine(error.Value);
});
}
Proton
Valve's Proton is a compatibility tool for Steam and is mostly based on Wine. The Wine prefixes managed by Proton are in the compatdata
directory of the steam library where the game itself is installed. Since the path is relative to the game itself and requires the app id, I've decided to put this functionality in GameFinder.StoreHandlers.Steam
:
SteamGame? steamGame = steamHandler.FindOneGameById(1237970, out var errors);
ProtonWinePrefix? protonPrefix = steamGame?.GetProtonPrefix();
var protonPrefixDirectory = protonPrefix?.ProtonDirectory;
if (protonDirectory is not null && Directory.Exists(protonDirectory))
{
Console.WriteLine($"Proton prefix is at {protonDirectory}");
}
Contributing
See CONTRIBUTING for more information.
License
See LICENSE for more information.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net7.0
- GameFinder.Common (>= 2.6.0)
- GameFinder.RegistryUtils (>= 2.6.0)
NuGet packages (6)
Showing the top 5 NuGet packages that depend on GameFinder.StoreHandlers.GOG:
Package | Downloads |
---|---|
Mutagen.Bethesda.Core
A C# library for manipulating, creating, and analyzing Bethesda mods. Contains only the core components without the generated records. |
|
Mutagen.Bethesda.Core.Windows
A C# library for Mutagen features that only work on windows |
|
GameFinder
Package Description |
|
PGCG.commonItems
Package Description |
|
Wabbajack.Downloaders.GameFile
Package Description |
GitHub repositories (2)
Showing the top 2 popular GitHub repositories that depend on GameFinder.StoreHandlers.GOG:
Repository | Stars |
---|---|
wabbajack-tools/wabbajack
An automated Modlist installer for various games.
|
|
Mutagen-Modding/Mutagen
A .NET library for analyzing, creating, and manipulating Bethesda mods
|
Version | Downloads | Last updated |
---|---|---|
4.2.0 | 7,332 | 1/28/2024 |
4.1.0 | 2,921 | 1/8/2024 |
4.0.0 | 7,345 | 9/3/2023 |
3.2.2 | 2,067 | 8/11/2023 |
3.2.1 | 1,305 | 7/25/2023 |
3.2.0 | 190 | 7/25/2023 |
3.1.0 | 2,215 | 5/23/2023 |
3.0.2 | 560 | 5/10/2023 |
3.0.1 | 153 | 5/10/2023 |
3.0.0 | 217 | 5/9/2023 |
2.6.0 | 1,499 | 3/7/2023 |
2.5.0 | 2,562 | 1/17/2023 |
2.4.0 | 76,070 | 1/13/2023 |
2.3.0 | 497 | 12/16/2022 |
2.2.2 | 6,325 | 11/11/2022 |
2.2.1 | 23,134 | 10/21/2022 |
2.2.0 | 450 | 10/21/2022 |
2.1.0 | 354 | 10/21/2022 |
2.0.1 | 380 | 10/19/2022 |
2.0.0 | 534 | 10/15/2022 |
1.8.0 | 5,748 | 6/27/2022 |
1.7.3 | 64,522 | 5/14/2022 |
1.7.2 | 50,310 | 11/10/2021 |
1.7.1 | 20,562 | 8/19/2021 |
1.7.0 | 26,174 | 8/9/2021 |
1.6.4 | 386 | 8/3/2021 |
1.6.3 | 1,250 | 7/30/2021 |
1.6.2 | 369 | 7/17/2021 |
1.6.1 | 755 | 7/10/2021 |
1.6.0 | 412 | 7/10/2021 |
1.5.3 | 21,929 | 6/13/2021 |
1.5.2 | 298 | 6/9/2021 |
1.5.1 | 309 | 6/6/2021 |
1.5.0 | 14,169 | 5/29/2021 |
1.4.1 | 31,044 | 3/26/2021 |
1.4.0 | 322 | 3/26/2021 |
1.3.1 | 311 | 3/14/2021 |
1.3.0 | 321 | 3/13/2021 |
1.2.0 | 376 | 3/13/2021 |