game_launcher 1.1.0
Modern Linux game launcher with Steam / Proton / Wine integration
Loading...
Searching...
No Matches
ACFParser Class Reference

Parser for Steam's KeyValues format ACF manifest files. More...

#include <steam_integration.h>

Static Public Member Functions

static std::string detectProtonVersion (uint32_t appId, const std::filesystem::path &libraryPath)
 Detect Proton version for a Steam game from appmanifest UserConfig.
static std::optional< SteamGame > parseManifest (const std::filesystem::path &acfFilePath, const std::filesystem::path &libraryPath)
 Parse ACF file to extract game metadata.

Detailed Description

Parser for Steam's KeyValues format ACF manifest files.

ACF files use a simple key-value format:

"AppState"
{
"appid" "440"
"name" "Team Fortress 2"
"installdir" "Team Fortress 2"
}

Definition at line 327 of file steam_integration.h.

Member Function Documentation

◆ detectProtonVersion()

std::string ACFParser::detectProtonVersion ( uint32_t appId,
const std::filesystem::path & libraryPath )
static

Detect Proton version for a Steam game from appmanifest UserConfig.

Parameters
appIdSteam App ID
libraryPathSteam library root path
Returns
Proton version string (e.g., "proton_8", "experimental"), or empty if not found/native

Definition at line 891 of file steam_integration.cpp.

References readVdfContent().

◆ parseManifest()

std::optional< SteamGame > ACFParser::parseManifest ( const std::filesystem::path & acfFilePath,
const std::filesystem::path & libraryPath )
static

Parse ACF file to extract game metadata.

Parameters
acfFilePathPath to appmanifest_\<AppID\>.acf.
libraryPathPath to the parent steamapps directory; used to resolve the installdir field into an absolute install path on the returned SteamGame.
Returns
Optional SteamGame if parsing succeeds, nullopt on error.

Definition at line 720 of file steam_integration.cpp.

References SteamGame::appId, SteamGame::bytesDownloaded, SteamGame::bytesStaged, SteamGame::bytesToDownload, SteamGame::bytesToStage, Logger::error(), SteamGame::gamePath, SteamGame::installDir, SteamGame::isDownloading, SteamGame::isProtonGame, SteamGame::isUpdatePending, SteamGame::lastUpdated, SteamGame::libraryPath, SteamGame::name, SteamGame::protonVersion, readVdfContent(), SteamGame::sizeOnDisk, SteamGame::stateFlags, and SteamGame::steamBuildId.


The documentation for this class was generated from the following files: