[PR #12546] [CLOSED] Microsoft GDK automatic command line profile generation #29100

Open
opened 2026-01-31 09:32:48 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/12546
Author: @memcpy-rand-rand-rand
Created: 2/21/2022
Status: Closed

Base: mainHead: gdk_prompt_gen_using_vsgensystem


📝 Commits (3)

📊 Changes

5 files changed (+187 additions, -5 deletions)

View changed files

📝 src/cascadia/TerminalSettingsModel/Microsoft.Terminal.Settings.ModelLib.vcxproj (+3 -4)
📝 src/cascadia/TerminalSettingsModel/Microsoft.Terminal.Settings.ModelLib.vcxproj.filters (+7 -1)
📝 src/cascadia/TerminalSettingsModel/VisualStudioGenerator.cpp (+3 -0)
src/cascadia/TerminalSettingsModel/VsDevGDKCmdGenerator.cpp (+128 -0)
src/cascadia/TerminalSettingsModel/VsDevGDKCmdGenerator.h (+46 -0)

📄 Description

Automatically detect Visual Studio command prompts from the Microsoft Game Development Kit (GDK)

The Microsoft GDK (https://aka.ms/gdkinfo) installs shortcuts to open Visual Studio command prompts which when run also set some GDK environment variables. These are available in the start menu.

This proposed change will allow Terminal to detect those shortcuts and add them to the list of available shells automatically.

Game developers who use Terminal with the GDK installed would have the GDK command prompts available at their fingertips.

DRAFT PR opened for discussion

PR Checklist

  • Closes #xxx
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed
  • Documentation updated. If checked, please file a pull request on our docs repo and link it here: #xxx
  • Schema updated.
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

Detailed Description of the Pull Request / Additional comments

This change piggy-backs on the VisualStudioGenerator to detect the installed VS versions and implements a "VisualStudioGenerator::IVisualStudioProfileGenerator" which looks for the .lnk files in the GDK's command prompts directory. It does some string matching to match the year in the .lnk filename to the installed VS version.

It then uses some COM goodness with IPersistFile to pull out info from the shortcut .lnk files ahead of adding them to the list.

The code currently is still just mvp to test this out and could use some tidying up.

Validation Steps Performed

Currently tested with:

  • No GDK install
  • PC-only GDK installed
  • PC+Xbox console GDK installed

🔄 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/microsoft/terminal/pull/12546 **Author:** [@memcpy-rand-rand-rand](https://github.com/memcpy-rand-rand-rand) **Created:** 2/21/2022 **Status:** ❌ Closed **Base:** `main` ← **Head:** `gdk_prompt_gen_using_vsgensystem` --- ### 📝 Commits (3) - [`49a2af6`](https://github.com/microsoft/terminal/commit/49a2af6848d11d3c44e10baf83588719c0eed823) First test of MS GDK cmd prompt detection - [`7109dba`](https://github.com/microsoft/terminal/commit/7109dba6ee583cb7ccb1a48018c8ebea5964030b) Merge branch 'gdk_prompt_gen_using_vsgensystem' of https://github.com/memcpy-rand-rand-rand/terminal into gdk_prompt_gen_using_vsgensystem - [`807f22e`](https://github.com/microsoft/terminal/commit/807f22e3ba074778d2fae37d72e036634703eba5) Update from main ### 📊 Changes **5 files changed** (+187 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalSettingsModel/Microsoft.Terminal.Settings.ModelLib.vcxproj` (+3 -4) 📝 `src/cascadia/TerminalSettingsModel/Microsoft.Terminal.Settings.ModelLib.vcxproj.filters` (+7 -1) 📝 `src/cascadia/TerminalSettingsModel/VisualStudioGenerator.cpp` (+3 -0) ➕ `src/cascadia/TerminalSettingsModel/VsDevGDKCmdGenerator.cpp` (+128 -0) ➕ `src/cascadia/TerminalSettingsModel/VsDevGDKCmdGenerator.h` (+46 -0) </details> ### 📄 Description <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Automatically detect Visual Studio command prompts from the Microsoft Game Development Kit (GDK) The Microsoft GDK (https://aka.ms/gdkinfo) installs shortcuts to open Visual Studio command prompts which when run also set some GDK environment variables. These are available in the start menu. This proposed change will allow Terminal to detect those shortcuts and add them to the list of available shells automatically. Game developers who use Terminal with the GDK installed would have the GDK command prompts available at their fingertips. __DRAFT PR opened for discussion__ <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [ ] Closes #xxx * [ ] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [ ] Tests added/passed * [ ] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx * [ ] Schema updated. * [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx <!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments This change piggy-backs on the VisualStudioGenerator to detect the installed VS versions and implements a "VisualStudioGenerator::IVisualStudioProfileGenerator" which looks for the .lnk files in the GDK's command prompts directory. It does some string matching to match the year in the .lnk filename to the installed VS version. It then uses some COM goodness with IPersistFile to pull out info from the shortcut .lnk files ahead of adding them to the list. The code currently is still just mvp to test this out and could use some tidying up. <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed Currently tested with: * No GDK install * PC-only GDK installed * PC+Xbox console GDK installed --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:32:48 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#29100