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

Variables

constexpr int API_TIMEOUT_SEC = 5
 Timeout for Steam Web API HTTP requests.
constexpr const char * APPMANIFEST_PREFIX = "appmanifest_"
 Prefix for game manifest files.
constexpr const char * CMD_CHECK_STEAM = "pgrep -x steam > /dev/null 2>&1"
 Command to check if Steam process is running.
constexpr const char * CMD_FIND_STEAM_GAMES = "pgrep -a -f '/reaper SteamLaunch AppId=' 2>/dev/null"
 Command to find running Steam games by reaper process.
constexpr const char * CMD_LAUNCH_STEAM_GAME = "steam -applaunch"
 Command prefix for launching Steam games.
constexpr const char * CMD_SHUTDOWN_STEAM = "steam -shutdown"
 Command to gracefully shutdown Steam.
constexpr const char * CMD_START_STEAM_SILENT = "steam -silent"
 Command to start Steam silently (no window).
constexpr const char * COMMON_DIR = "common"
 Directory containing installed games (within steamapps).
constexpr const char * COMPAT_TOOLS_DIR = "compatibilitytools.d"
 Directory containing compatibility tools.
constexpr const char * COMPATDATA_DIR = "compatdata"
 Directory containing Proton compatibility data.
constexpr const char * CONFIG_DIR = "config"
 Directory containing global Steam configuration.
constexpr const char * CONFIG_VDF = "config.vdf"
 File containing global Steam configuration (Proton mappings).
constexpr int COVER_ART_TIMEOUT_SEC = 5
 Timeout for cover art image downloads.
constexpr int CURL_TIMEOUT_SEC = 5
 Timeout for general curl operations.
constexpr const char * FLATPAK_STEAM_PATH = ".var/app/com.valvesoftware.Steam/.local/share/Steam"
 Flatpak Steam installation path.
constexpr int GAME_DETECTION_INTERVAL_SEC = 2
 Interval between game process detection scans.
constexpr int GAME_GRACE_PERIOD_SEC = 60
 Grace period for newly launched games before tracking them.
constexpr int GAME_VERIFY_POLL_MS = 500
 Polling interval when verifying game has started.
constexpr int GAME_VERIFY_TIMEOUT_SEC = 30
 Maximum time to wait for game process to appear after launch.
constexpr int LIBRARY_CACHE_VALIDITY_SEC = 60
 Validity period for library scan cache (seconds).
constexpr const char * LIBRARY_FOLDERS_VDF = "libraryfolders.vdf"
 File containing library folder paths.
constexpr const char * LOCAL_CONFIG_VDF = "localconfig.vdf"
 File containing per-user game settings (launch options, playtime).
constexpr const char * LOGIN_USERS_VDF = "loginusers.vdf"
 File containing user login information.
constexpr int MAX_UNINSTALLED_GAMES = 100
 Maximum number of uninstalled games to show in library.
constexpr int POST_LAUNCH_WAIT_SEC = 2
 Wait time after launching game before checking process status.
constexpr int POST_SHUTDOWN_DELAY_MS = 1000
 Delay after Steam shutdown before attempting restart.
constexpr int PROCESS_POLL_INTERVAL_MS = 500
 Interval between Steam process status checks.
constexpr int PROTON_CACHE_VALIDITY_SEC = 300
 Validity period for Proton version cache (seconds).
constexpr int RESTART_MAX_ITERATIONS = 20
 Maximum iterations for restart polling (total time = iterations * interval).
constexpr int RESTART_POLL_INTERVAL_MS = 500
 Polling interval when waiting for Steam restart.
constexpr int SHUTDOWN_TIMEOUT_SEC = 15
 Maximum time to wait for Steam to shutdown before timeout.
constexpr const char * SNAP_STEAM_PATH = "snap/steam/common/.local/share/Steam"
 Snap Steam installation path.
constexpr int START_TIMEOUT_SEC = 15
 Maximum time to wait for Steam to start before timeout.
constexpr int STEAM_INIT_WAIT_SEC = 2
 Wait time after Steam starts before launching games.
constexpr const char * STEAM_ROOT_ALT1 = ".steam/root"
 Alternative Steam installation (symlink).
constexpr const char * STEAM_ROOT_ALT2 = ".steam/steam"
 Alternative Steam installation (legacy).
constexpr const char * STEAM_ROOT_PATH = ".local/share/Steam"
 Primary Steam installation directory.
constexpr int STEAM_START_CHECK_INTERVAL_MS = 500
 Delay when waiting for Steam to start during game launch.
constexpr int STEAM_START_MAX_WAIT_SEC = 10
 Maximum time to wait for Steam to start when launching game.
constexpr const char * STEAMAPPS_DIR = "steamapps"
 Directory containing installed games.
constexpr const char * SYSTEM_COMPAT_TOOLS_PATH1 = "/usr/share/steam/compatibilitytools.d"
 System compatibility tools directory (distro-provided).
constexpr const char * SYSTEM_COMPAT_TOOLS_PATH2 = "/opt/steam/compatibilitytools.d"
 Alternative system compatibility tools directory.
constexpr const char * USERDATA_DIR = "userdata"
 Directory containing user-specific data.
constexpr const char * VDF_BACKUP_SUFFIX = ".backup"
 Suffix for backup configuration files.
constexpr const char * VDF_CLOSE_BRACE = "}"
constexpr size_t VDF_MAX_FILE_SIZE = 10 * 1024 * 1024
 Maximum VDF file size to read (safety limit: 10 MB).
constexpr int VDF_MAX_NESTING_DEPTH = 32
 Maximum nesting depth for VDF file parsing (prevents infinite loops).
constexpr const char * VDF_OPEN_BRACE = "{"
 Characters that indicate VDF section boundaries.
constexpr size_t VDF_READ_BUFFER_SIZE = 4096
 Buffer size for reading VDF configuration files.

Variable Documentation

◆ API_TIMEOUT_SEC

int SteamConstants::API_TIMEOUT_SEC = 5
constexpr

Timeout for Steam Web API HTTP requests.

Definition at line 77 of file steam_constants.h.

◆ APPMANIFEST_PREFIX

const char* SteamConstants::APPMANIFEST_PREFIX = "appmanifest_"
constexpr

Prefix for game manifest files.

Definition at line 166 of file steam_constants.h.

Referenced by SteamPaths::getAppManifestPath().

◆ CMD_CHECK_STEAM

const char* SteamConstants::CMD_CHECK_STEAM = "pgrep -x steam > /dev/null 2>&1"
constexpr

Command to check if Steam process is running.

Definition at line 176 of file steam_constants.h.

◆ CMD_FIND_STEAM_GAMES

const char* SteamConstants::CMD_FIND_STEAM_GAMES = "pgrep -a -f '/reaper SteamLaunch AppId=' 2>/dev/null"
constexpr

Command to find running Steam games by reaper process.

Definition at line 179 of file steam_constants.h.

◆ CMD_LAUNCH_STEAM_GAME

const char* SteamConstants::CMD_LAUNCH_STEAM_GAME = "steam -applaunch"
constexpr

Command prefix for launching Steam games.

Definition at line 188 of file steam_constants.h.

◆ CMD_SHUTDOWN_STEAM

const char* SteamConstants::CMD_SHUTDOWN_STEAM = "steam -shutdown"
constexpr

Command to gracefully shutdown Steam.

Definition at line 182 of file steam_constants.h.

◆ CMD_START_STEAM_SILENT

const char* SteamConstants::CMD_START_STEAM_SILENT = "steam -silent"
constexpr

Command to start Steam silently (no window).

Definition at line 185 of file steam_constants.h.

◆ COMMON_DIR

const char* SteamConstants::COMMON_DIR = "common"
constexpr

Directory containing installed games (within steamapps).

Definition at line 144 of file steam_constants.h.

Referenced by SteamPaths::getGameInstallPath(), SteamPaths::getProtonInstallPaths(), and SteamLibraryScanner::scanProtonVersions().

◆ COMPAT_TOOLS_DIR

const char* SteamConstants::COMPAT_TOOLS_DIR = "compatibilitytools.d"
constexpr

Directory containing compatibility tools.

Definition at line 135 of file steam_constants.h.

Referenced by SteamPaths::getCompatToolsPaths(), and SteamLibraryScanner::scanProtonVersions().

◆ COMPATDATA_DIR

const char* SteamConstants::COMPATDATA_DIR = "compatdata"
constexpr

Directory containing Proton compatibility data.

Definition at line 147 of file steam_constants.h.

Referenced by SteamPaths::getCompatDataPath().

◆ CONFIG_DIR

const char* SteamConstants::CONFIG_DIR = "config"
constexpr

Directory containing global Steam configuration.

Definition at line 141 of file steam_constants.h.

Referenced by SteamPaths::getConfigPath(), SteamPaths::getLocalConfigPath(), SteamPaths::getLoginUsersPath(), and SteamLibraryScanner::scanProtonVersions().

◆ CONFIG_VDF

const char* SteamConstants::CONFIG_VDF = "config.vdf"
constexpr

File containing global Steam configuration (Proton mappings).

Definition at line 160 of file steam_constants.h.

Referenced by SteamPaths::getConfigPath().

◆ COVER_ART_TIMEOUT_SEC

int SteamConstants::COVER_ART_TIMEOUT_SEC = 5
constexpr

Timeout for cover art image downloads.

Definition at line 80 of file steam_constants.h.

◆ CURL_TIMEOUT_SEC

int SteamConstants::CURL_TIMEOUT_SEC = 5
constexpr

Timeout for general curl operations.

Definition at line 83 of file steam_constants.h.

◆ FLATPAK_STEAM_PATH

const char* SteamConstants::FLATPAK_STEAM_PATH = ".var/app/com.valvesoftware.Steam/.local/share/Steam"
constexpr

Flatpak Steam installation path.

Definition at line 112 of file steam_constants.h.

Referenced by SteamPaths::getAllSteamRoots(), SteamPaths::getCompatToolsPaths(), and SteamPaths::isFlatpakSteam().

◆ GAME_DETECTION_INTERVAL_SEC

int SteamConstants::GAME_DETECTION_INTERVAL_SEC = 2
constexpr

Interval between game process detection scans.

Definition at line 56 of file steam_constants.h.

◆ GAME_GRACE_PERIOD_SEC

int SteamConstants::GAME_GRACE_PERIOD_SEC = 60
constexpr

Grace period for newly launched games before tracking them.

Must be >= GAME_VERIFY_TIMEOUT_SEC to avoid premature removal. Steam games take variable time to start (Proton shader compilation, etc.)

Definition at line 61 of file steam_constants.h.

◆ GAME_VERIFY_POLL_MS

int SteamConstants::GAME_VERIFY_POLL_MS = 500
constexpr

Polling interval when verifying game has started.

Definition at line 48 of file steam_constants.h.

◆ GAME_VERIFY_TIMEOUT_SEC

int SteamConstants::GAME_VERIFY_TIMEOUT_SEC = 30
constexpr

Maximum time to wait for game process to appear after launch.

Steam games need extra time because the steam command exits immediately and the actual game process (reaper) takes several seconds to appear.

Definition at line 53 of file steam_constants.h.

◆ LIBRARY_CACHE_VALIDITY_SEC

int SteamConstants::LIBRARY_CACHE_VALIDITY_SEC = 60
constexpr

Validity period for library scan cache (seconds).

Definition at line 209 of file steam_constants.h.

◆ LIBRARY_FOLDERS_VDF

const char* SteamConstants::LIBRARY_FOLDERS_VDF = "libraryfolders.vdf"
constexpr

File containing library folder paths.

Definition at line 154 of file steam_constants.h.

Referenced by SteamPaths::getLibraryFoldersPath(), and SteamLibraryScanner::scanProtonVersions().

◆ LOCAL_CONFIG_VDF

const char* SteamConstants::LOCAL_CONFIG_VDF = "localconfig.vdf"
constexpr

File containing per-user game settings (launch options, playtime).

Definition at line 157 of file steam_constants.h.

Referenced by SteamPaths::getLocalConfigPath().

◆ LOGIN_USERS_VDF

const char* SteamConstants::LOGIN_USERS_VDF = "loginusers.vdf"
constexpr

File containing user login information.

Definition at line 163 of file steam_constants.h.

Referenced by SteamPaths::getLoginUsersPath().

◆ MAX_UNINSTALLED_GAMES

int SteamConstants::MAX_UNINSTALLED_GAMES = 100
constexpr

Maximum number of uninstalled games to show in library.

Definition at line 90 of file steam_constants.h.

◆ POST_LAUNCH_WAIT_SEC

int SteamConstants::POST_LAUNCH_WAIT_SEC = 2
constexpr

Wait time after launching game before checking process status.

Definition at line 45 of file steam_constants.h.

◆ POST_SHUTDOWN_DELAY_MS

int SteamConstants::POST_SHUTDOWN_DELAY_MS = 1000
constexpr

Delay after Steam shutdown before attempting restart.

Definition at line 38 of file steam_constants.h.

◆ PROCESS_POLL_INTERVAL_MS

int SteamConstants::PROCESS_POLL_INTERVAL_MS = 500
constexpr

Interval between Steam process status checks.

Definition at line 23 of file steam_constants.h.

◆ PROTON_CACHE_VALIDITY_SEC

int SteamConstants::PROTON_CACHE_VALIDITY_SEC = 300
constexpr

Validity period for Proton version cache (seconds).

Definition at line 206 of file steam_constants.h.

◆ RESTART_MAX_ITERATIONS

int SteamConstants::RESTART_MAX_ITERATIONS = 20
constexpr

Maximum iterations for restart polling (total time = iterations * interval).

Definition at line 35 of file steam_constants.h.

◆ RESTART_POLL_INTERVAL_MS

int SteamConstants::RESTART_POLL_INTERVAL_MS = 500
constexpr

Polling interval when waiting for Steam restart.

Definition at line 32 of file steam_constants.h.

◆ SHUTDOWN_TIMEOUT_SEC

int SteamConstants::SHUTDOWN_TIMEOUT_SEC = 15
constexpr

Maximum time to wait for Steam to shutdown before timeout.

Definition at line 29 of file steam_constants.h.

◆ SNAP_STEAM_PATH

const char* SteamConstants::SNAP_STEAM_PATH = "snap/steam/common/.local/share/Steam"
constexpr

Snap Steam installation path.

Definition at line 115 of file steam_constants.h.

Referenced by SteamPaths::getAllSteamRoots(), SteamPaths::getCompatToolsPaths(), and SteamPaths::isSnapSteam().

◆ START_TIMEOUT_SEC

int SteamConstants::START_TIMEOUT_SEC = 15
constexpr

Maximum time to wait for Steam to start before timeout.

Definition at line 26 of file steam_constants.h.

◆ STEAM_INIT_WAIT_SEC

int SteamConstants::STEAM_INIT_WAIT_SEC = 2
constexpr

Wait time after Steam starts before launching games.

Definition at line 64 of file steam_constants.h.

◆ STEAM_ROOT_ALT1

const char* SteamConstants::STEAM_ROOT_ALT1 = ".steam/root"
constexpr

Alternative Steam installation (symlink).

Definition at line 106 of file steam_constants.h.

Referenced by SteamPaths::getAllSteamRoots().

◆ STEAM_ROOT_ALT2

const char* SteamConstants::STEAM_ROOT_ALT2 = ".steam/steam"
constexpr

Alternative Steam installation (legacy).

Definition at line 109 of file steam_constants.h.

Referenced by SteamPaths::getAllSteamRoots().

◆ STEAM_ROOT_PATH

const char* SteamConstants::STEAM_ROOT_PATH = ".local/share/Steam"
constexpr

Primary Steam installation directory.

Definition at line 103 of file steam_constants.h.

Referenced by SteamPaths::getAllSteamRoots().

◆ STEAM_START_CHECK_INTERVAL_MS

int SteamConstants::STEAM_START_CHECK_INTERVAL_MS = 500
constexpr

Delay when waiting for Steam to start during game launch.

Definition at line 67 of file steam_constants.h.

◆ STEAM_START_MAX_WAIT_SEC

int SteamConstants::STEAM_START_MAX_WAIT_SEC = 10
constexpr

Maximum time to wait for Steam to start when launching game.

Definition at line 70 of file steam_constants.h.

◆ STEAMAPPS_DIR

const char* SteamConstants::STEAMAPPS_DIR = "steamapps"
constexpr

◆ SYSTEM_COMPAT_TOOLS_PATH1

const char* SteamConstants::SYSTEM_COMPAT_TOOLS_PATH1 = "/usr/share/steam/compatibilitytools.d"
constexpr

System compatibility tools directory (distro-provided).

Definition at line 122 of file steam_constants.h.

Referenced by SteamPaths::getCompatToolsPaths().

◆ SYSTEM_COMPAT_TOOLS_PATH2

const char* SteamConstants::SYSTEM_COMPAT_TOOLS_PATH2 = "/opt/steam/compatibilitytools.d"
constexpr

Alternative system compatibility tools directory.

Definition at line 125 of file steam_constants.h.

Referenced by SteamPaths::getCompatToolsPaths().

◆ USERDATA_DIR

const char* SteamConstants::USERDATA_DIR = "userdata"
constexpr

Directory containing user-specific data.

Definition at line 138 of file steam_constants.h.

Referenced by SteamPaths::getUserDataDirectory().

◆ VDF_BACKUP_SUFFIX

const char* SteamConstants::VDF_BACKUP_SUFFIX = ".backup"
constexpr

Suffix for backup configuration files.

Definition at line 169 of file steam_constants.h.

Referenced by SteamLibraryScanner::writeSteamProtonVersion().

◆ VDF_CLOSE_BRACE

const char* SteamConstants::VDF_CLOSE_BRACE = "}"
constexpr

Definition at line 199 of file steam_constants.h.

◆ VDF_MAX_FILE_SIZE

size_t SteamConstants::VDF_MAX_FILE_SIZE = 10 * 1024 * 1024
constexpr

Maximum VDF file size to read (safety limit: 10 MB).

Definition at line 96 of file steam_constants.h.

Referenced by readVdfContent().

◆ VDF_MAX_NESTING_DEPTH

int SteamConstants::VDF_MAX_NESTING_DEPTH = 32
constexpr

Maximum nesting depth for VDF file parsing (prevents infinite loops).

Definition at line 195 of file steam_constants.h.

◆ VDF_OPEN_BRACE

const char* SteamConstants::VDF_OPEN_BRACE = "{"
constexpr

Characters that indicate VDF section boundaries.

Definition at line 198 of file steam_constants.h.

◆ VDF_READ_BUFFER_SIZE

size_t SteamConstants::VDF_READ_BUFFER_SIZE = 4096
constexpr

Buffer size for reading VDF configuration files.

Definition at line 93 of file steam_constants.h.