GameLib.NET 1.0.6

There is a newer version of this package available.
See the version list below for details.
dotnet add package GameLib.NET --version 1.0.6                
NuGet\Install-Package GameLib.NET -Version 1.0.6                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="GameLib.NET" Version="1.0.6" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add GameLib.NET --version 1.0.6                
#r "nuget: GameLib.NET, 1.0.6"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install GameLib.NET as a Cake Addin
#addin nuget:?package=GameLib.NET&version=1.0.6

// Install GameLib.NET as a Cake Tool
#tool nuget:?package=GameLib.NET&version=1.0.6                

GameLib.NET GameLib.NET

GameLib.NET is a library to give .NET developers easy access to the users installed game launchers and installed games. The motivation for the library is a tool I'm currently working on which requires access to all game executables on a PC.

While this repository is providing already the plugins to gather the games from the most popular game launchers, it easily extendible via the MEF Framework. A developer guide will follow, but I'm pretty sure the geeks will find out themselfes on how to do it.

Following plugins are already bundled with GameLib.NET to detect the game launchers including their installed games:

Installing

Multiple options are available to install within your project:

  1. Install, using the Nuget Gallery

  2. Install using the Package Manager Console:

    Install-Package GameLib.NET 
    
  3. Install using .NET CLI

    dotnet add package GameLib.NET
    

Usage

GameLib.NET provides a LauncherManager class which has to be instantiated, optionally LauncherOptions can be supplied. Each Plugin will provide an interface instance for the launcher ILauncher as well an interface instance for IEnumerable<Game>.

using GameLib;

var launcherManager = new LauncherManager(new LauncherOptions() { QueryOnlineData = true });

foreach (var launcher in launcherManager.GetLaunchers())
{
    Console.WriteLine($"Launcher name: {launcher.Name}");
    Console.WriteLine("Games:");

    foreach (var game in launcher.GetGames())
    {
        Console.WriteLine($"Game ID: {game.GameId}");
        foreach (var item in game.GetType().GetProperties().Where(p => p.Name != "GameId"))
        {
            Console.WriteLine($"\t{item.Name}: {item.GetValue(game)}");
        }
    }
}

Also have a look at the Console Demo within the repository. It will run straight out of the box to give you a hint what the library can do for you.

Please note: All values are cached within each launcher to save computing time on the next call. If you like to get refreshed values (e.g. new game installed while the lib is running) the ClearCache() Method on the LauncherManager or on the actual ILauncher has to be called.

What launcher / game information is the library providing?

To make a long story short have a look at the ILauncher interface as well as the IGame interface to see what values are returned by default. Each plugin can provide more information, which can be found in the README.md the corresponding plugin.

Please note: Not all launchers will fill all properties in the IGame interface instance. Further information are provided in the README.md of each plugin.

Support

I try to be responsive to Stack Overflow questions in the gamelib-net tag and issues logged on this GitHub repository.

If I've helped you, feel free to buy me a coffee or see the Sponsor link at the top right of the GitHub page.

<a href="https://www.buymeacoffee.com/tekgator" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" ></a>

Dependencies and Credits

  • Teneko's Teronis.DotNet which allows project reference content to be added to the NuGet-package during pack process

  • Thanks to Josef Nemec and contributers of Playnite for the inspiration of decoding the proprietary manifest and catalog data of each launcher

  • The team of SteamDB providing Valve's KeyValue for .NET for reading Steam's proprietary key value format files

  • protobuf-net for decoding Ubisoft's local catalog data

  • JSON deserializing by Json.NET

  • YAML deserializing by YamlDotNet

  • The main GameLib.NET icon is created by Flat Icons

Product Compatible and additional computed target framework versions.
.NET net6.0-windows7.0 is compatible.  net7.0-windows was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on GameLib.NET:

Repository Stars
project-sbc/Handheld-Control-Panel
Version Downloads Last updated
1.4.1 1,643 7/30/2023
1.3.3 1,694 3/18/2023
1.3.2 1,656 9/16/2022
1.3.1 1,663 9/11/2022
1.3.0 1,621 9/11/2022
1.2.1 1,658 9/4/2022
1.1.2 1,623 9/1/2022
1.1.1 1,628 8/27/2022
1.0.6 1,589 8/24/2022
1.0.5 1,599 8/13/2022
1.0.4 1,605 8/12/2022
1.0.3 1,558 8/10/2022
1.0.2 1,668 7/10/2022

# Changelog
All notable changes to this project will be documented in this file.

## [Unreleased]

## [1.0.6] - 2022-24-08
### Fixed
- Origin plugin did not return working directory and executable name for online queries

### Changed
- Launchers property replaced with GetLaunchers method on LauncherManager as a property should not be an expensive call. As on first call the plugins are loaded the property can be executing for a bit depending on the system.


## [1.0.5] - 2022-13-08
### Added
- Add ID property on ILauncher interface
- Add Launcher ID property on IGame interface in order to know what launcher the game belongs to

### Changed
- Rename LargeLogo property to Logo on ILauncher interface
- Simplify console demo by writing every property of the ILauncher interface

### Deleted
- Remove SmallLogo property on ILauncher interface


## [1.0.4] - 2022-12-08
### Added
- Add LargeLogo property on ILauncher interface

### Changed
- Rename Icon property to SmallLogo on ILauncher interface


## [1.0.3] - 2022-10-08
### Added
- Changelog file
- Add changelog file to Nuget
- 32px game launcher icons
- Provide Icon property on ILauncher interface

### Changed
- Restructioring of the project by removing SRC folder
- Demo executable icon is loaded from Ressource folder instead of keeping it with the project
- Add game launcher icons to ReadMe
- Rearrange resource files from solution into plugin resource folders


## [1.0.2] - 2022-10-07
### Added
- Add reference to Teronis.DotNet to be able to add project reference content to be added to the NuGet-package during pack process

### Changed
- Plugins will not create own Nuget anymore
- Plugins are now bundled with the core library


## [1.0.1] - 2022-10-07
### Added
- Add automatic version for Nuget publishing process


## [1.0.0] - 2022-10-06
### Added
- Add automtic creation of Nuget


## [0.9.0] - 2022-10-05
### Added
- First working version



This project is MIT Licensed // Created & maintained by Patrick Weiss