[PR #166] [CLOSED] xgameruntime: XPackage enumeration, installation monitors and package-installed registration offline #219

Closed
opened 2026-11-26 20:17:10 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/166
Author: @Andretuta
Created: 11/24/2026
Status: ❌ Closed

Base: main ← Head: old-pr/9900


📝 Commits (1)

  • f14804d xgameruntime: XPackage enumeration, installation monitors and package-installed registration offline

📊 Changes

2 files changed (+310 additions, -22 deletions)

View changed files

📝 runtime/shims/xgameruntime.cpp (+209 -20)
📝 runtime/test/xgameruntime_test.cpp (+101 -2)

📄 Description

Carried over from old PR 9900 by tedin7 in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch old-pr/9900, exactly that PR's last commit. All carried-over PRs are listed in #17.
Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it.
tedin7: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one.


Original description (mentions and #N references are disabled; the numbers refer to the old repository):

@ItsNotRexed: an exe PR, as you asked.

What

Offline answers for the XPackage calls a title makes at boot to learn what is installed: XPackageEnumeratePackages (Game lists the process's package; Content lists the ids in LEONIDA_CONTENT_PACKAGES, in order; a callback returning false stops the walk), XPackageCreateInstallationMonitor and its progress, update, close and registration calls (installed, launchable, complete; a package that is not installed gets ERROR_NOT_FOUND), and XPackageRegisterPackageInstalled (hands out a distinct nonzero token). IXPackageImpl slots 5, 6, 9, 28, 29 forward to the same functions, so both ways in answer alike.

Why

Without them every one of these calls failed and a title took the not-installed path.

Tested

Built locally with clang-cl 19 + lld-link against the xwin SDK, run under Wine: xgameruntime_test.exe.

  • With the change: xgameruntime_test: OK (171 checks).
  • Negative control (same test, shim from origin/main): 1 of 159 checks failed, FAIL XPackageEnumeratePackages is exported, exit code 1.
  • New checks: about 100 lines in runtime/test/xgameruntime_test.cpp (enumeration of Game and Content, early stop, invalid kind/callback, slot 28, monitor open/close/progress/registration, missing package, double close, distinct package-installed tokens). Slot 5 moved from the E_NOTIMPL check to slot 27.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/166 **Author:** [@Andretuta](https://github.com/Andretuta) **Created:** 11/24/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `old-pr/9900` --- ### 📝 Commits (1) - [`f14804d`](https://github.com/ubiquitarianism/leonida/commit/f14804d04d2a454bd699d741d5a14ed96aed4281) xgameruntime: XPackage enumeration, installation monitors and package-installed registration offline ### 📊 Changes **2 files changed** (+310 additions, -22 deletions) <details> <summary>View changed files</summary> 📝 `runtime/shims/xgameruntime.cpp` (+209 -20) 📝 `runtime/test/xgameruntime_test.cpp` (+101 -2) </details> ### 📄 Description > Carried over from **old PR 9900** by `tedin7` in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch `old-pr/9900`, exactly that PR's last commit. All carried-over PRs are listed in #17. > Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it. > `tedin7`: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one. --- Original description (mentions and `#N` references are disabled; the numbers refer to the old repository): `@ItsNotRexed`: an exe PR, as you asked. ## What Offline answers for the XPackage calls a title makes at boot to learn what is installed: `XPackageEnumeratePackages` (Game lists the process's package; Content lists the ids in `LEONIDA_CONTENT_PACKAGES`, in order; a callback returning false stops the walk), `XPackageCreateInstallationMonitor` and its progress, update, close and registration calls (installed, launchable, complete; a package that is not installed gets `ERROR_NOT_FOUND`), and `XPackageRegisterPackageInstalled` (hands out a distinct nonzero token). `IXPackageImpl` slots 5, 6, 9, 28, 29 forward to the same functions, so both ways in answer alike. ## Why Without them every one of these calls failed and a title took the not-installed path. ## Tested Built locally with clang-cl 19 + lld-link against the xwin SDK, run under Wine: `xgameruntime_test.exe`. - With the change: `xgameruntime_test: OK (171 checks)`. - Negative control (same test, shim from origin/main): `1 of 159 checks failed`, `FAIL XPackageEnumeratePackages is exported`, exit code 1. - New checks: about 100 lines in `runtime/test/xgameruntime_test.cpp` (enumeration of Game and Content, early stop, invalid kind/callback, slot 28, monitor open/close/progress/registration, missing package, double close, distinct package-installed tokens). Slot 5 moved from the E_NOTIMPL check to slot 27. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:17:10 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#219
No description provided.