Package Exports
- @elschnagoo/local-games
- @elschnagoo/local-games/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@elschnagoo/local-games) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Local-Games
Read local game launcher config files and launch games
Features
- Read local game launcher config files
- Get game info
- Get game image
- Get game executable
Currently supported launchers
- Steam [win32, darwin, linux]
- Epic Games [win32]
- Battle.net [win32]
- Ubisoft Connect [win32] (Uplay)
Docs
Quickstart
Install
Install the package via npm
npm install @elschnagoo/local-gamesimport { LocalGames, BattleNetLauncher } from '@elschnagoo/local-games';
const localGames = new LocalGames();
// Register a launcher [Battle.net, Epic Games, Steam] @see docs for more info
localGames.registerLauncher(new BattleNetLauncher())
const games = await localGames.getGames();
const [game] = games;
// Returns the executable path
const cmd = await localGames.getLaunchGameCMD(game);
// Returns the game image as base64 encoded string
const images = await localGames.getGameImageBase64(game);
console.log(images.portrait)