From 09c70b0de450f95438d92ce07c11eb62dac67721 Mon Sep 17 00:00:00 2001 From: Nicole O'Connor Date: Sun, 22 Jun 2025 22:40:46 -0700 Subject: [PATCH] initial proton code --- .woodpecker/release.yaml | 13 +++++++++++++ include/internal/steam.hpp | 1 + src/steam/paths.cpp | 18 ++++++++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 .woodpecker/release.yaml diff --git a/.woodpecker/release.yaml b/.woodpecker/release.yaml new file mode 100644 index 0000000..f21d0f5 --- /dev/null +++ b/.woodpecker/release.yaml @@ -0,0 +1,13 @@ +when: + - event: tag + ref: refs/tags/v* +steps: + - name: Parse git metadata + image: build-runner + commands: + - git tag -n $CI_COMMIT_TAG --format "%(contents)" > ./.tag_message.txt + - name: Release + image: woodpeckerci/plugin-release + settings: + api_key: + from_secret: WOODPECKER_CI_TOKEN \ No newline at end of file diff --git a/include/internal/steam.hpp b/include/internal/steam.hpp index 669a901..c440689 100644 --- a/include/internal/steam.hpp +++ b/include/internal/steam.hpp @@ -9,5 +9,6 @@ namespace cellar { namespace steam { extern std::vector find_steam_libraries(); + extern std::map find_steam_protons(); } } \ No newline at end of file diff --git a/src/steam/paths.cpp b/src/steam/paths.cpp index 1f552a5..d05449c 100644 --- a/src/steam/paths.cpp +++ b/src/steam/paths.cpp @@ -1,9 +1,12 @@ #include +#include #include +#include #include #include #include +#include "nlohmann/json.hpp" #include "vdf_parser.hpp" #include "bottles.hpp" @@ -36,4 +39,19 @@ std::vector cellar::steam::find_steam_libraries() { } return result; +} + +/** + * @brief Gets available versions of Proton from Steam. + * + * @return std::vector Proton versions. + */ +std::map cellar::steam::find_steam_protons() { + std::map result; + + for (std::string str_library_path : find_steam_libraries()) { + std::filesystem::path pth_library(str_library_path); + + for () + } } \ No newline at end of file