tooling: extract GDK MSBuild platform profiles #3288
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!3288
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3286"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@lambirou on GitHub · 2026-11-28 05:19 UTC · original
lambirou:gdk/platform-profiles→main· +507 −0 · 4 files · 3 commits · merged 2026-11-28 06:01 UTCThe GDK knowledge plan needs the exact MSBuild defines, include roots, libraries and flags per platform so fixtures can compile like a title without guessing. This adds an extractor and keeps the installation and the JSON profiles outside the repository.
tools/gdk_platform_profiles.py selects the VS2022/flatDeployment/v170 platform directory, reads Platform.default.props, Platform.Common.props, Platform.Edition.default.props, Platform.Edition.props, Platform.Edition.targets, Platform.Commandline.targets, Platform.props, Platform.targets and the toolset props, and writes a deterministic JSON profile. It keeps MSBuild conditions, joins incremental PreprocessorDefinitions entries, resolves simple variables, and leaves installation variables such as DurangoXdkInstallPath, DurangoGRDKInstallPath and XdkEdition visible instead of guessing them.
Measured from the 261000 payload:
Console profiles define _GAMING_XBOX, the Scarlett or XboxOne macro, WIN32_LEAN_AND_MEAN and WINAPI_FAMILY=WINAPI_FAMILY_GAMES, plus the ATL/WRL strict-COM macros. The desktop profile defines _GAMING_DESKTOP and WINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP. The console dependency list in Console_Libs is pixevt.lib, d3d12_xs.lib, gameinput.lib, xgameplatform.lib, xgameruntime.lib, xmem.lib and xg_xs.lib.
Commands:
python -B tests/gdk_platform_profiles_check.py
python -B tools/gdk_platform_profiles.py list --root D:\gdk-ref\261000\gxdk\Microsoft GDK\261000\GXDK
python -B tools/gdk_platform_profiles.py scan --root D:\gdk-ref\261000\gxdk\Microsoft GDK\261000\GXDK --platform Gaming.Xbox.Scarlett.x64 --json out\scarlett.json
The check passed on Windows and runs on Linux without the GDK. The real profiles were written to D:\gdk-oracle\knowledge\platform.
A profile is a build recipe, not a runtime fact. The unresolved installation variables are kept because their values differ per host.
@R0Y00 on GitHub · 2026-11-28 05:43 UTC · original · requested changes
The checked-in synthetic profile fixture passes on
f74ee3fe. A separate two-version synthetic tree exposes a mismatch:scan --sdk 999999reportssdk: "999999"but reads261000/Platform.Common.propsand emitsPROFILE_261000, although a999999/Platform.Common.propswithPROFILE_999999exists. The edition and command-line paths use the same hardcoded version. Please use the selected SDK for these versioned paths, or reject an unsupported SDK before producing output. A fixture with two sibling version directories should verify the reported SDK, file provenance and extracted value agree.@lambirou on GitHub · 2026-11-28 05:57 UTC · original
Corrigé sur la branche (commit
354b32ff). Les chemins versionnés utilisent maintenant--sdk:Platform.Common.props,Platform.Edition.*etPlatform.Commandline.targetssont lus sous<platform>/<sdk>/, et un SDK sans répertoire correspondant est rejeté avant l'écriture du JSON.Le test synthétique crée deux répertoires frères,
261000et999999:scan --sdk 999999rapportesdk: "999999", lit999999/Platform.Common.propset extraitPROFILE_999999, sans aucune provenance261000;scan --sdk 888888retourne 2 et n'écrit pas de sortie.python -B tests/gdk_platform_profiles_check.pypasse. Les trois profils réels 261000 ont été régénérés sans changement.@lambirou on GitHub · 2026-11-28 06:00 UTC · original
CI verte sur la tête
354b32ff: Windows, Linux et gfx1013 passent. Le test à deux répertoires de version vérifie le SDK rapporté, la provenance des fichiers et la valeur extraite ; le SDK inconnu est rejeté avant écriture. Prêt pour la re-revue.@R0Y00 on GitHub · 2026-11-28 06:01 UTC · original · approved these changes
Re-reviewed
354b32ff. The checked-in synthetic test passes on Windows. My separate two-version tree now reports SDK999999, reads its ownPlatform.Common.props, and emitsPROFILE_999999; the old261000inputs are absent from the source list. The suite also checks that a missing SDK returns 2 without writing a profile. The requested change is resolved.