GameLib.NET 1.4.1

dotnet add package GameLib.NET --version 1.4.1
NuGet\Install-Package GameLib.NET -Version 1.4.1
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.4.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add GameLib.NET --version 1.4.1
#r "nuget: GameLib.NET, 1.4.1"
#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.4.1

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

GameLib.NET GameLib.NET

<p> <a href="https://github.com/tekgator/GameLib.NET/blob/main/LICENSE" alt="License"> <img src="https://img.shields.io/github/license/tekgator/GameLib.NET" /> </a> <img src="https://img.shields.io/github/languages/top/tekgator/GameLib.NET" /> <a href="https://www.nuget.org/packages/GameLib.NET" alt="Nuget"> <img alt="Nuget" src="https://img.shields.io/nuget/dt/GameLib.NET"> </a> <a href="https://github.com/tekgator/GameLib.NET/actions/workflows/build-on-push.yml" alt="BuildStatus"> <img src="https://img.shields.io/github/actions/workflow/status/tekgator/GameLib.NET/build-on-push.yml?branch=main" /> </a> <a href="https://github.com/tekgator/GameLib.NET/releases" alt="Releases"> <img src="https://img.shields.io/github/v/release/tekgator/GameLib.NET" /> </a> <a href="https://github.com/tekgator/GameLib.NET/releases" alt="Releases"> <img alt="GitHub Release Date" src="https://img.shields.io/github/release-date/tekgator/GameLib.NET"> </a> <a href="https://github.com/tekgator/GameLib.NET/commit" alt="Commit"> <img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/tekgator/GameLib.NET"> </a> </p>

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.

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 and you like some of my work, feel free to buy me a coffee ☕ (or more likely a beer 🍺)

<a href='https://ko-fi.com/C0C7LO3V1' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi1.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>

Plugins

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.Games)
    {
        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)}");
        }
    }
}

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 Refresh() 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.

Demo application

Have a look at the Console Demo as well as the WPF GUI Demo within the repository. Both will run straight out of the box to give you a hint what the library can do for you.

WPF GUI Demo Launchers Screenshot

WPF GUI Demo Games Screenshot

Dependencies and Credits

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,472 7/30/2023
1.3.3 1,648 3/18/2023
1.3.2 1,623 9/16/2022
1.3.1 1,630 9/11/2022
1.3.0 1,594 9/11/2022
1.2.1 1,613 9/4/2022
1.1.2 1,598 9/1/2022
1.1.1 1,601 8/27/2022
1.0.6 1,563 8/24/2022
1.0.5 1,561 8/13/2022
1.0.4 1,580 8/12/2022
1.0.3 1,529 8/10/2022
1.0.2 1,632 7/10/2022

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

## [Unreleased]

## [1.4.1] - 2023-07-29
### Fixed
- Nuget Build to include new Plugin without releasing it as an own package


## [1.4.0] - 2023-07-29
### Added
- Riot Games Plugin by @ZenMaxe


## [1.3.3] - 2023-03-18
### Fixed
- Reading all executables in a directory crashed if directory doesn't exists


## [1.3.2] - 2022-09-16
### Added
- Add LauncherOption to also search for additional executables within a game install directory
- Add Executables property to IGame interface to list all additional executables within a game install directory

### Fixed
- Steam plugin was not processing manifest entries in parallel


## [1.3.1] - 2022-09-11
### Fixed
- Activate parallel processing of installed games for Battle.net and Rockstar Games

### Deleted
- Remove "ExecutablePath" from ILauncher interface
- Remove "ExecutablePath" from IGame interface

### Changed
- "Executable" on ILauncher interface returns the executable including the path
- "Executable" on IGame interface returns the executable including the path


## [1.3.0] - 2022-09-11
### Added
- Add Rockstar Games plugin for interacting with Rockstar Games launcher and games
- If Launcher cannot provide executable add option to search Windows GameConfigStore for the game executable


## [1.2.1] - 2022-09-04
### Fixed
- Mark BattleNet Plugin as private asset so it is not a dependency


## [1.2.0] - 2022-09-04
### Added
- Add Battle.net plugin for interacting with Battle.net launcher and games


## [1.1.2] - 2022-09-01
### Added
- Add ExecutableIcon property on IGame interface / implementations
- Add ExecutableIcon property on ILauncher interface / implementations
- Add WPF GUI demo application


## [1.1.1] - 2022-08-27
### Fixed
- Refresh caused an dead lock in UI applications due to incorrect async call
- Refresh on LauncherManager also returns the Launchers collection so no extra GetLaunchers call need to be made


## [1.1.0] - 2022-08-27
### Fixed
- disable 0649 to avoid compiler warning for MEF variables

### Added
- Add LauncherOptions to ILauncher interface to change settings on the fly for a single plugin
- Add Documentation to LauncherOptions
- Add Documentation to LauncherManager methods

### Changed
- Corrected Plugin documentation concerning referencing the Plugin ID
- Restructure of code
- Rename ClearCache method on LauncherManager and ILauncher Interface to Refresh
- LauncherManager will now always refresh all Plugins including the Games on initial GetLauncher call
- Remove GetGames method on ILauncher interface and instead add Games property


## [1.0.6] - 2022-08-24
### 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-08-13
### 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-08-12
### Added
- Add LargeLogo property on ILauncher interface

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


## [1.0.3] - 2022-08-10
### 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-07-10
### 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-07-10
### Added
- Add automatic version for Nuget publishing process


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


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



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