Skip to content

Play your Steam library's Windows games on a jailbroken PS5.

C++

Name the runtime kit in use and its version in About

Leonardo Lobato6a910980382f
diff --git a/src/homebrew/controller.cpp b/src/homebrew/controller.cpp
index 35d3e91..a62c830 100644
--- a/src/homebrew/controller.cpp
+++ b/src/homebrew/controller.cpp
@@ -1444,9 +1444,13 @@ void Controller::TickRuntime() {
model_.UpdateRuntime(state, games);
model_.SetRuntimeLeftovers(snapshot.leftover_requests);
LiveKitInfo kit;
- if (snapshot.kit)
+ if (snapshot.kit) {
kit = {snapshot.kit->view.kit_id, snapshot.kit->manifest_sha256, snapshot.kit->expected_manifest_sha256,
- snapshot.kit->prospero_win_revision, snapshot.kit->source_dirty, {}};
+ snapshot.kit->prospero_win_revision, snapshot.kit->source_dirty, {}, {}};
+ // The artifact is "<wine revision>-kit-<version>"; kits before 0.10 name no version.
+ const auto& artifact = snapshot.kit->view.runtime.artifact_revision;
+ if (update::KitVersionFromArtifact(artifact)) kit.version = artifact.substr(artifact.find("-kit-") + 5);
+ }
else
kit.unavailable_reason = snapshot.status == RuntimeHostStatus::kReady ? snapshot.kit_reason : std::string{};
model_.SetKitInfo(std::move(kit));
diff --git a/src/homebrew/simulation.cpp b/src/homebrew/simulation.cpp
index 28faee6..9d9e9f7 100644
--- a/src/homebrew/simulation.cpp
+++ b/src/homebrew/simulation.cpp
@@ -516,7 +516,7 @@ std::string action_label(const std::string& key) {
{"kit-install", "Download"}, {"kit-cancel", "Cancel download"},
{"self-update-back-confirm", "Go back"}, {"release-notes-ok", "OK"},
{"about-build", "Build"},
- {"about-kit", "Runtime kit"}, {"about-kit-source", "Kit built from"},
+ {"about-kit", "Runtime kit in use"}, {"about-kit-source", "Kit built from"},
{"about-back", "Back"}, {"inject-library-refresh", "Refresh library fixture"},
{"inject-startup-loading", "Show startup loading"}};
if (const auto found = labels.find(key); found != labels.end()) return found->second;
@@ -4696,19 +4696,18 @@ void Simulation::rebuild_view() {
else if (action_key == "about-version") { item.kind = RowKind::Status; item.value = live() ? "Playden " + version_label(state_.self_update.current) : "Simulated"; item.enabled = false; }
else if (action_key == "about-build") { item.kind = RowKind::Status; item.value = live() ? build_label(state_.self_update.current, state_.self_update.commit) : "UI comparison fixture"; item.enabled = false; }
else if (action_key == "about-kit" || action_key == "about-kit-source") {
- // The kit in use, and the one this build was tested with when they differ.
+ // The kit in use, and the one this version of Playden expects when they differ.
LiveKitInfo kit = state_.kit;
- if (!live()) kit = {"playden-kit", std::string(64, 'b'), std::string(64, 'b'), std::string(40, '2'), false, {}};
+ if (!live()) kit = {"playden-kit", std::string(64, 'b'), std::string(64, 'b'), std::string(40, '2'), false, {}, "0.13"};
const auto short_hash = [](const std::string& hash) { return hash.substr(0, 10); };
item.kind = RowKind::Status; item.enabled = false;
if (kit.kit_id.empty()) {
item.value = action_key == "about-kit" ? "None" : "—";
if (action_key == "about-kit") item.subtitle = kit.unavailable_reason.empty() ? "Checking" : kit.unavailable_reason;
} else if (action_key == "about-kit") {
- item.value = kit.kit_id + " · " + short_hash(kit.manifest_sha256);
- item.subtitle = kit.manifest_sha256 == kit.expected_manifest_sha256
- ? "The kit this version of Playden was tested with"
- : "Not the kit this version was tested with (" + short_hash(kit.expected_manifest_sha256) + ")";
+ item.value = kit.kit_id + (kit.version.empty() ? "" : " " + kit.version) + " · " + short_hash(kit.manifest_sha256);
+ if (kit.manifest_sha256 != kit.expected_manifest_sha256)
+ item.subtitle = "This version of Playden expects " + short_hash(kit.expected_manifest_sha256);
} else {
item.value = "prospero-win " + kit.prospero_win_revision.substr(0, 7);
if (kit.source_dirty) item.subtitle = "Includes uncommitted changes";
diff --git a/src/homebrew/simulation.hpp b/src/homebrew/simulation.hpp
index 36d4548..fac0316 100644
--- a/src/homebrew/simulation.hpp
+++ b/src/homebrew/simulation.hpp
@@ -118,6 +118,7 @@ struct LiveKitInfo {
std::string prospero_win_revision; // what the kit's PS5 titles were built from
bool source_dirty = false; // built from uncommitted changes
std::string unavailable_reason; // why no kit is in use
+ std::string version; // "0.13", from its runtime's artifact name; empty for older kits
};
// Live: Playden's own update (update/update_service.h), projected for Settings, Downloads and prompts.
struct LiveSelfUpdate {
diff --git a/tests/homebrew_library_graphical_test.cpp b/tests/homebrew_library_graphical_test.cpp
index 4184031..1a93f98 100644
--- a/tests/homebrew_library_graphical_test.cpp
+++ b/tests/homebrew_library_graphical_test.cpp
@@ -162,9 +162,11 @@ int main(int argc,char** argv) {
while(!updating.state().navigation.modals.empty()) assert(updating.action("circle"));
fresh.current="0.8.0-nightly.20261027.2"; fresh.commit="e7a30f21e8";
updating.UpdateSelfUpdate(fresh);
- updating.SetKitInfo({"playden-kit",std::string(64,'d'),std::string(64,'e'),std::string(40,'f'),true,{}});
+ updating.SetKitInfo({"playden-kit",std::string(64,'d'),std::string(64,'e'),std::string(40,'f'),true,{},"0.13-dev.20261024.3"});
assert(updating.action("focus:settings-about") && updating.action("cross"));
assert(updating.view().surface=="about" && updating.view().rows.size()==5);
+ assert(updating.view().rows[2].value=="playden-kit 0.13-dev.20261024.3 · dddddddddd" &&
+ updating.view().rows[2].subtitle=="This version of Playden expects eeeeeeeeee");
assert(updating.action("down") && updating.action("down") && updating.action("down"));
assert(updating.view().rows[static_cast<std::size_t>(updating.view().focused_row)].key=="about-kit-source");
capture_update("about.png");
diff --git a/tests/homebrew_simulation_test.cpp b/tests/homebrew_simulation_test.cpp
index ed57612..2b9ed01 100644
--- a/tests/homebrew_simulation_test.cpp
+++ b/tests/homebrew_simulation_test.cpp
@@ -698,9 +698,9 @@ void t11_preferences_failure_and_controller_modal_recovery(const std::filesystem
{
const auto& rows = restored.view().rows;
const auto kit = std::find_if(rows.begin(), rows.end(), [](const auto& row) { return row.key == "about-kit"; });
- check(kit != rows.end() && kit->value.rfind("playden-kit · ", 0) == 0 &&
- kit->subtitle == "The kit this version of Playden was tested with",
- "T11 About names the runtime kit and whether it is the tested one");
+ check(kit != rows.end() && kit->title == "Runtime kit in use" && kit->value.rfind("playden-kit 0.13 · ", 0) == 0 &&
+ kit->subtitle.empty(),
+ "T11 About names the runtime kit in use, with no note when it is the one Playden expects");
}
}