|
game_launcher 1.1.0
Modern Linux game launcher with Steam / Proton / Wine integration
|
Service for launching games via UMU (umu-run). More...
#include <umu_launcher.h>
Classes | |
| class | Impl |
Public Types | |
| using | ProgressCallback = std::function<void(int percent, const std::string& status)> |
Public Member Functions | |
| UMULauncher () | |
| UMULauncher (const UMULauncher &)=delete | |
| ~UMULauncher () | |
| std::string | buildLaunchCommand (const UMULaunchConfig &config) const |
| Build the full launch command for umu-run. | |
| void | buildLaunchComponents (const UMULaunchConfig &config, std::map< std::string, std::string > &envVars, std::vector< std::string > &command) const |
| Build launch command as separate components. | |
| bool | createPrefix (const std::string &prefixPath, const std::string &protonPath="") |
| Create a new Wine prefix via umu-run. | |
| bool | downloadGEProton (const ProgressCallback &progressCallback=nullptr) |
| Download latest GE-Proton for UMU. | |
| bool | downloadUMUProton (const ProgressCallback &progressCallback=nullptr) |
| Download latest UMU-Proton. | |
| std::vector< UMUProtonVersion > | getAvailableProtonVersions () const |
| Get available Proton versions for UMU. | |
| std::string | getDefaultPrefixPath (const std::string &gameId) const |
| Get the default Wine prefix path for a GAMEID. | |
| UMUInstallStatus | getInstallStatus () const |
| Get detailed installation status. | |
| std::string | getUMURunPath () const |
| Get path to umu-run binary. | |
| bool | hasProtonUpdates () const |
| Check if Proton updates are available. | |
| bool | isAvailable () const |
| Check if umu-run is available on the system. | |
| UMUGameInfo | lookupGame (const std::string &gameId) const |
| Look up a game in the umu database. | |
| UMULauncher & | operator= (const UMULauncher &)=delete |
| bool | prefixExists (const std::string &prefixPath) const |
| Check if a Wine prefix exists. | |
| void | refreshProtonVersions () |
| Refresh the list of available Proton versions. | |
| bool | runWinetricks (const std::string &prefixPath, const std::vector< std::string > &verbs, const std::string &protonPath="", const ProgressCallback &progressCallback=nullptr) |
| Run winetricks verbs in a prefix via umu. | |
| std::vector< UMUGameInfo > | searchGames (const std::string &query, std::optional< UMUStore > store=std::nullopt) const |
| Search for games in the umu database. | |
| std::string | suggestGameId (const std::string &gameName, UMUStore store=UMUStore::None) const |
| Get suggested GAMEID for a game name. | |
Static Public Member Functions | |
| static UMUStore | storeFromString (const std::string &str) |
| Parse store identifier from string. | |
| static std::string | storeToString (UMUStore store) |
| Get store identifier string from enum. | |
Service for launching games via UMU (umu-run).
Provides integration with the UMU Unified Linux Wine Game Launcher, allowing non-Steam games to run with Steam's Proton in the Steam Runtime container with automatic protonfixes application.
Definition at line 175 of file umu_launcher.h.
| using UMULauncher::ProgressCallback = std::function<void(int percent, const std::string& status)> |
Definition at line 178 of file umu_launcher.h.
| UMULauncher::UMULauncher | ( | ) |
Definition at line 456 of file umu_launcher.cpp.
Referenced by UMULauncher(), and operator=().
|
default |
|
delete |
References UMULauncher().
| std::string UMULauncher::buildLaunchCommand | ( | const UMULaunchConfig & | config | ) | const |
Build the full launch command for umu-run.
| config | Launch configuration |
Returns a command string that can be passed to system() or a process manager. Environment variables are prepended, then umu-run with args.
Definition at line 493 of file umu_launcher.cpp.
References UMULaunchConfig::arguments, Custom, UMULaunchConfig::customProtonPath, UMULaunchConfig::customStore, Default, UMULaunchConfig::enableProtonLog, UMULaunchConfig::enableUMULog, UMULaunchConfig::environmentVariables, Logger::error(), ShellUtils::escapeArg(), UMULaunchConfig::executable, UMULaunchConfig::gameId, GEProton, ShellUtils::isValidEnvName(), None, UMULaunchConfig::protonPathMode, UMULaunchConfig::protonVerb, UMULaunchConfig::store, storeToString(), SystemProton, Logger::warn(), and UMULaunchConfig::winePrefix.
| void UMULauncher::buildLaunchComponents | ( | const UMULaunchConfig & | config, |
| std::map< std::string, std::string > & | envVars, | ||
| std::vector< std::string > & | command ) const |
Build launch command as separate components.
| config | Launch configuration | |
| [out] | envVars | Environment variables to set |
| [out] | command | The umu-run command with arguments |
Useful when you need to set environment variables separately (e.g., with execve or QProcess).
Definition at line 603 of file umu_launcher.cpp.
References UMULaunchConfig::arguments, Custom, UMULaunchConfig::customProtonPath, UMULaunchConfig::customStore, UMULaunchConfig::enableProtonLog, UMULaunchConfig::enableUMULog, UMULaunchConfig::environmentVariables, UMULaunchConfig::executable, UMULaunchConfig::gameId, GEProton, ShellUtils::isValidEnvName(), None, UMULaunchConfig::protonPathMode, UMULaunchConfig::protonVerb, UMULaunchConfig::store, storeToString(), SystemProton, Logger::warn(), and UMULaunchConfig::winePrefix.
| bool UMULauncher::createPrefix | ( | const std::string & | prefixPath, |
| const std::string & | protonPath = "" ) |
Create a new Wine prefix via umu-run.
| prefixPath | Path for new prefix |
| protonPath | Proton version to use |
Definition at line 887 of file umu_launcher.cpp.
References Logger::error(), ShellUtils::escapeArg(), and Logger::info().
| bool UMULauncher::downloadGEProton | ( | const ProgressCallback & | progressCallback = nullptr | ) |
Download latest GE-Proton for UMU.
| progressCallback | Progress callback |
Downloads to ~/.local/share/Steam/compatibilitytools.d/
Definition at line 749 of file umu_launcher.cpp.
References Logger::error(), and ShellUtils::escapeArg().
| bool UMULauncher::downloadUMUProton | ( | const ProgressCallback & | progressCallback = nullptr | ) |
Download latest UMU-Proton.
| progressCallback | Progress callback |
Definition at line 780 of file umu_launcher.cpp.
References Logger::error(), and ShellUtils::escapeArg().
| std::vector< UMUProtonVersion > UMULauncher::getAvailableProtonVersions | ( | ) | const |
Get available Proton versions for UMU.
Definition at line 488 of file umu_launcher.cpp.
| std::string UMULauncher::getDefaultPrefixPath | ( | const std::string & | gameId | ) | const |
Get the default Wine prefix path for a GAMEID.
| gameId | Game ID |
Definition at line 872 of file umu_launcher.cpp.
| UMUInstallStatus UMULauncher::getInstallStatus | ( | ) | const |
Get detailed installation status.
Definition at line 465 of file umu_launcher.cpp.
References UMUInstallStatus::availableProton, UMUInstallStatus::hasGEProton, UMUInstallStatus::hasUMUProton, UMUInstallStatus::isInstalled, UMUInstallStatus::runtimePath, UMUInstallStatus::umuRunPath, and UMUInstallStatus::version.
| std::string UMULauncher::getUMURunPath | ( | ) | const |
Get path to umu-run binary.
Definition at line 478 of file umu_launcher.cpp.
| bool UMULauncher::hasProtonUpdates | ( | ) | const |
Check if Proton updates are available.
Definition at line 809 of file umu_launcher.cpp.
References Logger::warn().
| bool UMULauncher::isAvailable | ( | ) | const |
Check if umu-run is available on the system.
Definition at line 460 of file umu_launcher.cpp.
| UMUGameInfo UMULauncher::lookupGame | ( | const std::string & | gameId | ) | const |
Look up a game in the umu database.
| gameId | Game ID to look up |
Definition at line 696 of file umu_launcher.cpp.
References UMUGameInfo::found, UMUGameInfo::gameId, and UMUGameInfo::title.
|
delete |
References UMULauncher(), and None.
| bool UMULauncher::prefixExists | ( | const std::string & | prefixPath | ) | const |
Check if a Wine prefix exists.
| prefixPath | Path to Wine prefix |
Definition at line 882 of file umu_launcher.cpp.
| void UMULauncher::refreshProtonVersions | ( | ) |
Refresh the list of available Proton versions.
Definition at line 483 of file umu_launcher.cpp.
| bool UMULauncher::runWinetricks | ( | const std::string & | prefixPath, |
| const std::vector< std::string > & | verbs, | ||
| const std::string & | protonPath = "", | ||
| const ProgressCallback & | progressCallback = nullptr ) |
Run winetricks verbs in a prefix via umu.
| prefixPath | Wine prefix path |
| verbs | Winetricks verbs to install |
| protonPath | Proton version to use |
| progressCallback | Progress callback |
Definition at line 912 of file umu_launcher.cpp.
References ShellUtils::escapeArg(), and Logger::info().
| std::vector< UMUGameInfo > UMULauncher::searchGames | ( | const std::string & | query, |
| std::optional< UMUStore > | store = std::nullopt ) const |
Search for games in the umu database.
| query | Search query (game name) |
| store | Optional store filter |
Definition at line 713 of file umu_launcher.cpp.
|
static |
|
static |
Get store identifier string from enum.
| store | Store enum value |
Definition at line 962 of file umu_launcher.cpp.
References Amazon, Custom, EA, EGS, GOG, Humble, Itch, None, Steam, and Ubisoft.
Referenced by buildLaunchCommand(), buildLaunchComponents(), and UMULauncher::Impl::searchDatabase().
| std::string UMULauncher::suggestGameId | ( | const std::string & | gameName, |
| UMUStore | store = UMUStore::None ) const |
Get suggested GAMEID for a game name.
| gameName | Game name to match |
| store | Store the game is from |
Definition at line 719 of file umu_launcher.cpp.