98 void addError(
const std::string& source,
const std::string& message)
100 errors.push_back(
"[" + source +
"] " + message);
104 void addWarning(
const std::string& source,
const std::string& message)
106 warnings.push_back(
"[" + source +
"] " + message);
209 const std::vector<Game>& library);
216 static std::vector<ScannedGame>
removeDuplicates(std::vector<ScannedGame> games);
267 static std::vector<std::string> customScanDirs_;
268 static std::mutex customScanDirsMutex_;
270 static std::vector<ScannedGame> parseLutrisConfig(
const std::string& configPath);
271 static std::vector<ScannedGame> parseBottleConfig(
const std::string& bottlePath);
272 static std::vector<ScannedGame> parseHeroicInstalledJson(
const std::string& jsonPath,
274 static std::vector<ScannedGame> parseLegendaryInstalledJson(
const std::string& jsonPath);
275 static std::vector<ScannedGame> parseDesktopFile(
const std::string& desktopPath);
278 static std::string expandPath(
const std::string& path);
279 static std::string getHomeDir();
280 static uint64_t getDirectorySize(
const std::string& path);
281 static time_t getLastModified(
const std::string& path);
284 static std::string extractJsonString(
const std::string&
json,
const std::string& key);
285 static int extractJsonInt(
const std::string&
json,
const std::string& key);
286 static bool extractJsonBool(
const std::string&
json,
const std::string& key);
Scans for installed games from various sources.
static bool isHeroicInstalled()
Check if Heroic Launcher is installed.
static std::vector< ScannedGame > scanLegendary()
Scan Legendary (Epic Games CLI) for installed games.
std::function< void(const std::vector< ScannedGame > &)> CompletionCallback
static bool isLegendaryInstalled()
Check if Legendary is installed.
static std::string getSourceIcon(GameSource source)
Get icon name for a game source.
static std::vector< ScannedGame > scanWinePrefixes()
Scan generic Wine prefixes for games.
static std::string getSourceDisplayName(GameSource source)
Get display name for a game source.
static std::vector< ScannedGame > scanBottles()
Scan Bottles for installed games.
static bool isLutrisInstalled()
Check if Lutris is installed.
static bool isBottlesInstalled()
Check if Bottles is installed.
static std::vector< ScannedGame > removeDuplicates(std::vector< ScannedGame > games)
Remove duplicate games from the list.
static void setCustomScanDirectories(const std::vector< std::string > &dirs)
Set custom scan directories for native game scanning.
static std::vector< ScannedGame > scanNativeGames()
Scan for native Linux games.
static std::vector< ScannedGame > scanAll(ProgressCallback progressCallback=nullptr)
Scan all available sources for games.
static void scanAllAsync(const CompletionCallback &onComplete, const ProgressCallback &onProgress=nullptr)
Scan all sources asynchronously.
static std::vector< ScannedGame > scanLutris()
Scan Lutris for installed games.
static std::vector< ScannedGame > scanHeroic()
Scan Heroic Launcher for Epic and GOG games.
static void markAlreadyImported(std::vector< ScannedGame > &games, const std::vector< Game > &library)
Mark games that are already in the library.
std::function< void(const ScanProgress &)> ProgressCallback
Complete representation of a game in the library.
GameSource
Where the game was acquired from (store/service/local).
GameRunner
Runner/compatibility layer for executing the game.
void addError(const std::string &source, const std::string &message)
std::vector< std::string > warnings
void addWarning(const std::string &source, const std::string &message)
std::vector< std::string > errors
std::string currentOperation
std::string currentSource
std::string runnerVersion
std::map< std::string, std::string > environmentVars
std::vector< std::string > excludeProcesses
std::string existingGameId
std::string executablePath
std::map< std::string, std::string > dllOverrides