Package Exports
- @ciberus/find-steam-app
- @ciberus/find-steam-app/lib/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 (@ciberus/find-steam-app) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
ciberus/find-steam-app
Find location of an installed Steam app
Install
npm i @ciberus/find-steam-app -S
Steam has "Libraries" - locations on disks there games installed Steam "Libraries" has 2 versions, most users use v2, but this package support v1 also
- v1 - contain only path to library, we can identify where app installed only indirectly by searching apps manifests
appmanifest_%appId%.acfin Steam Libraries - v2 - contains complete info about library and apps inside it, that gives opportunity to detect where app installed exactly
Support
- windows ✅
- osx - ✅
- linux - ⚠️not tested
Usage
import {
ISteamLibraries,
IAppManifest,
ISteamLibrariesRaw,
findSteamPath,
findSteamAppById,
findSteamAppByName,
findSteamAppManifest,
findSteamLibraries,
getLibraryAppsManifestsFolder,
getLibraryAppsInstallFolder,
} from "find-steam-app";
await findSteamPath();
// => '/path/to/steam'
await findSteamAppById(570);
// => '/path/to/steam/steamapps/common/dota 2 beta'
await findSteamAppByName("dota 2 beta");
// => '/path/to/steam/steamapps/common/dota 2 beta'
const res: IAppManifest = await findSteamAppManifest(570);
// => { appid: 570, Universe: 1, name: 'Dota 2', ... }
// returns `AppManifest` more info below
const libs = await findSteamLibrariesPaths();
// => ['/path/to/steam', '/path/to/library']
// can be transformed like this
libs.map(getLibraryAppsManifestsFolder);
// => ['/path/to/steam/steamapps', '/path/to/library/steamapps']
libs.map(getLibraryAppsInstallFolder);
// => ['/path/to/steam/steamapps/common', '/path/to/library/steamapps/common']
const steamLibsRaw: ISteamLibrariesRaw = await findSteamLibraries();
// => [{ path: '/path/to/library/steamapps', totalsize: 41234, apps: ['570'], ... }, ...]
const steamLibs: ISteamLibraries = await findSteam();
// => {
// version: "v2",
// libraries: [{
// path: "/path/to/lib",
// apps: [{
// appId: 570,
// path: "/path/to/app",
// manifest: {
// appid: 570,
// installdir: "dota 2 beta"
// buildid: 340918349
// ...
// }
// }]
// }]
// }AppManifest - manifest.ts
Tests
__data__contain the files that will be used to mock the filesystem.__data__mimic the filesystem of the computer.- so if u know any edge cases, u can try to add those files and see if it works
Edge cases
- after uninstall app folder like "dota 2 beta" in "common" still exist
- after moving app folder in another library
manifeststill exists in old library but became encrypted and*.acf.tmp.savemanifest created near - dota 2 was installed on disk D, moved on disk F, and somehow in library on disk E in
/commonfolderdota 2 betafolder exist
disk D
- has appmanifest_570.acf
- has appmanifest_570.acf.tmp.save
- no folder
dota 2 betain/common
disk E
- no manifest
- has folder
dota 2 betain/common
disk F - right disk
- has appmanifest_570.acf
- dont have appmanifest *.acf.tmp.save
- has folder
dota 2 betain/common
TODO
- jsdoc/tsdoc