Simple C++ library for parsing and updating steam shortcuts and controller configs.
cpp-steam-tools relies on QT6 being included in your project
The easiest way to include cpp-steam-tools
in your CMake project is to use FetchContent
include(FetchContent)
FetchContent_Declare(
cpp-steam-tools
GIT_REPOSITORY https://github.com/nikorag/cpp-steam-tools.git
GIT_TAG main #this can be any tag, revision or branch
)
FetchContent_GetProperties(cpp-steam-tools)
if(NOT cpp-steam-tools_POPULATED)
message(STATUS "Fetching cpp-steam-tools...")
FetchContent_Populate(cpp-steam-tools)
add_subdirectory(${cpp-steam-tools_SOURCE_DIR} ${cpp-steam-tools_BINARY_DIR})
endif()
target_link_libraries(<YOUR PROJECT NAME> PUBLIC cpp-steam-tools)
The SteamTools
object must be instantiated with lamba functions for logging info and error:
//Create steam tools
auto infoLambda = [this](const QString &infoMessage) {
std::cout << infoMessage.toStdString() << std::endl;
};
auto errorLambda = [this](const QString &errorMessage) {
std::cerr << errorMessage.toStdString() << std::endl;
};
SteamTools* steam_tools = new SteamTools(infoLambda, errorLambda);
The SteamTools
object provides methods for:
- Checking if Steam is installed
steamTools->steamExists()
- Reading a shortcuts.vdf file
steamTools->parseShortcuts()
- Creating new shortcut entries
steamTools->buildShortcutEntry("appName", "/path/to/my/exe", "launchOptions", mapOfArtwork)
- Writing entries back to shortcuts.vdf
steamTools->updateShortcuts(lsitOfShortcuts)
- Setting the neptune controller config for a shortcut
steamTools->updateControllerConfig("AppName", "ControllerConfigId")
- This project was originally developed for use in Chiaki4Deck. Thanks to the team there especially:
- This project includes crc algorithms generated at pycrc. This is licensed under the MIT license included in crc.h
- This project uses ValveFileVDF originally by TinyTinni. This is licensed under the MIT license included in vdf_parser.hpp