We might need another dependency for MIDI support #17659

Closed
opened 2026-01-31 05:49:15 +00:00 by claunia · 10 comments
Owner

Originally created by @zadjii-msft on GitHub (Jun 8, 2022).

~Promoted from a Teams thread. Tracking here so we don't lose it. ~

Notes from @DHowett:

@j4james handled this for us, by adding a package dependency on GmDls. We need to make sure that when Terminal is installed, users get access to it. I am somewhat concerned about what this means for Inbox Terminal, though: It costs us 3MB on disk which will be aggressively counted against us by Windows Perf Gates
I looked at the code that loads gm.dls and it seems like it was never updated to consider Centennial apps. If a process has "strong identity" (a package), it forces a catalog enumeration to find the GmDls package. We might be able to defray the cost of pulling in a second copy of gm.dls to the Windows image by giving it the ability to "fail over" to the system32 one.

Originally created by @zadjii-msft on GitHub (Jun 8, 2022). ~Promoted from a Teams thread. Tracking here so we don't lose it. ~ Notes from @DHowett: > @j4james handled this for us, by adding a package dependency on `GmDls`. We need to make sure that when Terminal is installed, users get access to it. I am somewhat concerned about what this means for Inbox Terminal, though: It costs us 3MB on disk which will be aggressively counted against us by Windows Perf Gates > I looked at the code that loads gm.dls and it seems like it was never updated to consider Centennial apps. If a process has "strong identity" (a package), it forces a catalog enumeration to find the GmDls package. We might be able to defray the cost of pulling in a second copy of gm.dls to the Windows image by giving it the ability to "fail over" to the system32 one.
Author
Owner

@j4james commented on GitHub (Jun 9, 2022):

Btw, if you want to revert PR #13208 until we can figure out a solution for this, that's fine by me. It's not exactly an essential feature.

And if in turns out that we can't use the MIDI API, I could try and come up with another way to produce the sound. I just chose MIDI because it seemed easiest.

@j4james commented on GitHub (Jun 9, 2022): Btw, if you want to revert PR #13208 until we can figure out a solution for this, that's fine by me. It's not exactly an essential feature. And if in turns out that we can't use the MIDI API, I could try and come up with another way to produce the sound. I just chose MIDI because it seemed easiest.
Author
Owner

@zadjii-msft commented on GitHub (Jun 9, 2022):

Plan of record right now is to stash this behind velocity, so it only ships in Preview (and critically, not in the OS-side build). That way we can get a little longer window on figuring out how we want to resolve this.

@zadjii-msft commented on GitHub (Jun 9, 2022): Plan of record right now is to stash this behind velocity, so it only ships in Preview (and critically, not in the OS-side build). That way we can get a little longer window on figuring out how we want to resolve this.
Author
Owner

@phil-blain commented on GitHub (Jun 9, 2022):

Hi, I just tried to compile Terminal from 4e20a8631c and installing it from a loose package as detailed in https://github.com/microsoft/terminal/blob/main/doc/building.md.

I can confirm that installing the loose package fails for me with (pardon my French!)

Add-AppxPackage : Deployment failed with HRESULT: 0x80073CF3, Échec des mises à jour, de la dépendance ou de la validation des conflits du package.
Windows ne peut pas installer le package WindowsTerminalDev_0.0.1.0_x64__8wekyb3d8bbwe, car ce package dépend d’une infrastructure qui n’a pas pu être trouvée. Indiquez
l’infrastructure «Microsoft.Midi.GmDls» publiée par «CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US», avec une architecture neutre ou de
processeur x64 et la version minimale 1.0.0.0, en plus de ce package à installer. Les infrastructures avec le nom «Microsoft.Midi.GmDls» installées actuellement sont
Windows ne peut pas installer le package WindowsTerminalDev_0.0.1.0_x64__8wekyb3d8bbwe, car ce package dépend d’une infrastructure qui n’a pas pu être trouvée. Indiquez
l’infrastructure «Microsoft.Midi.GmDls» publiée par «CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US», avec une architecture neutre ou de
processeur x64 et la version minimale 1.0.0.0, en plus de ce package à installer. Les infrastructures avec le nom «Microsoft.Midi.GmDls» installées actuellement sont: {}
NOTE: For additional information, look for [ActivityId] 92e6da5a-7c16-0002-9b44-ea92167cd801 in the Event Log or use the command line Get-AppPackageLog -ActivityID
92e6da5a-7c16-0002-9b44-ea92167cd801
At line:1 char:1
+ Add-AppxPackage -Path ..\loose\AppxManifest.xml -Register -ForceUpdat ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (C:\Users\me...ppxManifest.xml:String) [Add-AppxPackage], IOException
    + FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.AddAppxPackageCommand

I'm currently building from 9dca6c27eeeb4371c87cdc553d01b8876d028d21^ (i.e. 7dbe741e1) just to confirm that 9dca6c27ee is indeed is the culprit, but since I found this issue in the meantime I'm pretty sure now :P

@phil-blain commented on GitHub (Jun 9, 2022): Hi, I just tried to compile Terminal from 4e20a8631cbb5b20defe549a0e75bc7719969bee and installing it from a loose package as detailed in https://github.com/microsoft/terminal/blob/main/doc/building.md. I can confirm that installing the loose package fails for me with (pardon my French!) ~~~ Add-AppxPackage : Deployment failed with HRESULT: 0x80073CF3, Échec des mises à jour, de la dépendance ou de la validation des conflits du package. Windows ne peut pas installer le package WindowsTerminalDev_0.0.1.0_x64__8wekyb3d8bbwe, car ce package dépend d’une infrastructure qui n’a pas pu être trouvée. Indiquez l’infrastructure «Microsoft.Midi.GmDls» publiée par «CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US», avec une architecture neutre ou de processeur x64 et la version minimale 1.0.0.0, en plus de ce package à installer. Les infrastructures avec le nom «Microsoft.Midi.GmDls» installées actuellement sont Windows ne peut pas installer le package WindowsTerminalDev_0.0.1.0_x64__8wekyb3d8bbwe, car ce package dépend d’une infrastructure qui n’a pas pu être trouvée. Indiquez l’infrastructure «Microsoft.Midi.GmDls» publiée par «CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US», avec une architecture neutre ou de processeur x64 et la version minimale 1.0.0.0, en plus de ce package à installer. Les infrastructures avec le nom «Microsoft.Midi.GmDls» installées actuellement sont: {} NOTE: For additional information, look for [ActivityId] 92e6da5a-7c16-0002-9b44-ea92167cd801 in the Event Log or use the command line Get-AppPackageLog -ActivityID 92e6da5a-7c16-0002-9b44-ea92167cd801 At line:1 char:1 + Add-AppxPackage -Path ..\loose\AppxManifest.xml -Register -ForceUpdat ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : WriteError: (C:\Users\me...ppxManifest.xml:String) [Add-AppxPackage], IOException + FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.AddAppxPackageCommand ~~~ I'm currently building from `9dca6c27eeeb4371c87cdc553d01b8876d028d21^` (i.e. 7dbe741e1) just to confirm that 9dca6c27eeeb4371c87cdc553d01b8876d028d21 is indeed is the culprit, but since I found this issue in the meantime I'm pretty sure now :P
Author
Owner

@DHowett commented on GitHub (Jun 9, 2022):

Curious. That package should be available on your system, @phil-blain, somewhere in C:\Program Files (x86). It comes with the Windows SDK or one of the extension SDKs that ships with Visual Studio...

@DHowett commented on GitHub (Jun 9, 2022): Curious. That package should be available on your system, @phil-blain, somewhere in `C:\Program Files (x86)`. It comes with the Windows SDK or one of the extension SDKs that ships with Visual Studio...
Author
Owner

@phil-blain commented on GitHub (Jun 9, 2022):

It is indeed in C:\Program Files (x86)\Microsoft SDKs\Windows Kits\10\ExtensionSDKs\Microsoft.Midi.GmDls\10.0.22000.0. Maybe the installation does not work because it is not listed as a PackageDependency in the genereated AppxManifest.xml ?

@phil-blain commented on GitHub (Jun 9, 2022): It is indeed in `C:\Program Files (x86)\Microsoft SDKs\Windows Kits\10\ExtensionSDKs\Microsoft.Midi.GmDls\10.0.22000.0`. Maybe the installation does not work because it is not listed as a `PackageDependency` in the genereated `AppxManifest.xml` ?
Author
Owner

@zadjii-msft commented on GitHub (Jun 10, 2022):

With #13258 merged, I'm moving this out to 1.16

@zadjii-msft commented on GitHub (Jun 10, 2022): With #13258 merged, I'm moving this out to 1.16
Author
Owner

@j4james commented on GitHub (Jul 7, 2022):

@DHowett FYI, I've been playing around with an alternate implementation that uses DirectSound to generate the audio in place of Midi. Would it be worthwhile submitting a PR with that change, or do you have other plans for resolving this?

@j4james commented on GitHub (Jul 7, 2022): @DHowett FYI, I've been playing around with an alternate implementation that uses DirectSound to generate the audio in place of Midi. Would it be worthwhile submitting a PR with that change, or do you have other plans for resolving this?
Author
Owner

@DHowett commented on GitHub (Jul 8, 2022):

Huh, that seems like it might be a good way out of this! We wouldn't need to ship another package dependency...

I don't have any concrete plans that will resolve the GmDls package in the near future. My plans are more like, "Fix this in Windows 18 by getting the owner to let me move around some of their code," which would never be serviceable to earlier versions of Windows. :(

@DHowett commented on GitHub (Jul 8, 2022): _Huh,_ that seems like it might be a good way out of this! We wouldn't need to ship another package dependency... I don't have any concrete plans that will resolve the `GmDls` package in the near future. My plans are more like, "Fix this in Windows 18 by getting the owner to let me move around some of their code," which would never be serviceable to earlier versions of Windows. :(
Author
Owner

@j4james commented on GitHub (Jul 8, 2022):

which would never be serviceable to earlier versions of Windows. :(

OK, that's a deciding factor for me. I'll try and put together a PR this weekend.

@j4james commented on GitHub (Jul 8, 2022): > which would never be serviceable to earlier versions of Windows. :( OK, that's a deciding factor for me. I'll try and put together a PR this weekend.
Author
Owner

@ghost commented on GitHub (Aug 5, 2022):

:tada:This issue was addressed in #13471, which has now been successfully released as Windows Terminal Preview v1.15.200.🎉

Handy links:

@ghost commented on GitHub (Aug 5, 2022): :tada:This issue was addressed in #13471, which has now been successfully released as `Windows Terminal Preview v1.15.200`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.15.200) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#17659