-
Notifications
You must be signed in to change notification settings - Fork 102
Updates for MSIX Windows desktop4:Subsystem compatibility #1271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Fixes build error when creating MSIX package: Error { code: HRESULT(0x80080204), message: "The Appx package's manifest is invalid." } The desktop4:Subsystem attribute added in #1270 requires a higher minimum Windows version. Updated from 10.0.17134.0 (v1803) to 10.0.18362.0 (v1903). Refs: - https://learn.microsoft.com/en-us/uwp/schemas/appxpackage/uapmanifestschema/element-uap3-appexecutionalias - https://learn.microsoft.com/en-us/uwp/schemas/appxpackage/uapmanifestschema/element-desktop4-extension
Instead of using cargo-msix which tries to create full bundles, use Windows SDK's makeappx tool directly to validate the manifest. This simplifies the test and focuses on manifest validation only.
The Windows SDK's MakeAppx tool (even in SDK 10.0.26100.0) does not yet support the desktop4:Subsystem attribute on uap3:AppExecutionAlias, despite it being documented by Microsoft and required for Windows 10 v1903+. The manifest is correct per Microsoft docs, but the SDK schema definition is out of date. This will be re-enabled once Microsoft updates the SDK. Error from MakeAppx: The attribute 'Subsystem' on the element 'AppExecutionAlias' is not defined in the DTD/Schema. Refs: - https://learn.microsoft.com/en-us/uwp/schemas/appxpackage/uapmanifestschema/element-desktop4-extension - https://learn.microsoft.com/en-us/uwp/schemas/appxpackage/uapmanifestschema/element-uap3-appexecutionalias
I think Switching to diff --git a/deploy/msix/appxmanifest.xml b/deploy/msix/appxmanifest.xml
index ba29cd4..1aa4bf6 100644
--- a/deploy/msix/appxmanifest.xml
+++ b/deploy/msix/appxmanifest.xml
@@ -32,7 +32,7 @@
</Resources>
<Applications>
- <Application Id="Julia" Executable="Julia\julialauncher.exe" EntryPoint="Windows.FullTrustApplication">
+ <Application Id="Julia" Executable="Julia\julialauncher.exe" EntryPoint="Windows.FullTrustApplication" desktop4:SupportsMultipleInstances="true">
<uap:VisualElements
DisplayName="Julia"
Description="Julia is a high-level, high-performance, dynamic programming language"
@@ -53,18 +53,18 @@
<uap:SplashScreen Image="Images\SplashScreen.png" />
</uap:VisualElements>
<Extensions>
- <uap3:Extension Category="windows.appExecutionAlias" Executable="Julia/julialauncher.exe" EntryPoint="Windows.FullTrustApplication">
- <uap3:AppExecutionAlias desktop4:Subsystem="console">
- <desktop:ExecutionAlias Alias="julia.exe" />
- </uap3:AppExecutionAlias>
- </uap3:Extension>
+ <uap5:Extension Category="windows.appExecutionAlias" Executable="Julia/julialauncher.exe" EntryPoint="Windows.FullTrustApplication">
+ <uap5:AppExecutionAlias desktop4:Subsystem="console">
+ <uap5:ExecutionAlias Alias="julia.exe" />
+ </uap5:AppExecutionAlias>
+ </uap5:Extension>
<uap3:Extension Category="windows.appExtension">
<uap3:AppExtension Name="com.microsoft.windows.terminal.settings" Id="Julia" PublicFolder="Public" DisplayName="Julia">
</uap3:AppExtension>
</uap3:Extension>
</Extensions>
</Application>
- <Application Id="Juliaup" Executable="Julia\juliaup.exe" EntryPoint="Windows.FullTrustApplication">
+ <Application Id="Juliaup" Executable="Julia\juliaup.exe" EntryPoint="Windows.FullTrustApplication" desktop4:SupportsMultipleInstances="true">
<uap:VisualElements
DisplayName="Juliaup"
Description="Julia version management"
@@ -86,11 +86,11 @@
<uap:SplashScreen Image="Images\SplashScreen.png" />
</uap:VisualElements>
<Extensions>
- <uap3:Extension Category="windows.appExecutionAlias" Executable="Julia/juliaup.exe" EntryPoint="Windows.FullTrustApplication">
- <uap3:AppExecutionAlias desktop4:Subsystem="console">
- <desktop:ExecutionAlias Alias="juliaup.exe" />
- </uap3:AppExecutionAlias>
- </uap3:Extension>
+ <uap5:Extension Category="windows.appExecutionAlias" Executable="Julia/juliaup.exe" EntryPoint="Windows.FullTrustApplication">
+ <uap5:AppExecutionAlias desktop4:Subsystem="console">
+ <uap5:ExecutionAlias Alias="juliaup.exe" />
+ </uap5:AppExecutionAlias>
+ </uap5:Extension>
</Extensions>
</Application>
</Applications> PS C:\Users\topolarity\repos\juliaup\deploy>& 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64\makeappx.exe' pack /d assembled /p test.msix
Microsoft (R) MakeAppx Tool
Copyright (C) 2013 Microsoft. All rights reserved.
The path (/p) parameter is: "\\?\C:\Users\topolarity\repos\juliaup\deploy\test.msix"
The content directory (/d) parameter is: "\\?\C:\Users\topolarity\repos\juliaup\deploy\assembled"
Enumerating files from directory "\\?\C:\Users\topolarity\repos\juliaup\deploy\assembled"
Packing 53 file(s) in "\\?\C:\Users\topolarity\repos\juliaup\deploy\assembled" (content directory) to "\\?\C:\Users\topolarity\repos\juliaup\deploy\test.msix" (output file name).
Memory limit defaulting to 21309548544 bytes.
Using "\\?\C:\Users\topolarity\repos\juliaup\deploy\assembled\AppxManifest.xml" as the manifest for the package.
...
Package creation succeeded. It's possible that switching to the new |
The desktop4:Subsystem attribute is only supported on uap5:AppExecutionAlias, not uap3:AppExecutionAlias as the Microsoft docs suggested. This change: - Upgrades from uap3:Extension/AppExecutionAlias to uap5 versions - Changes desktop:ExecutionAlias to uap5:ExecutionAlias - Adds desktop4:SupportsMultipleInstances="true" to Application elements - Re-enables MSIX manifest validation in CI - Tidy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Although I went ahead and built a local unsigned version of the App and my issue is unfortunately unresolved.
I am starting to suspect it might be a MinTTY issue - I will try to put together a small UWP console app MWE and file an issue upstream if it shows up there.
Ok. Well the release process is blocked by the issue this fixes, so we either merge this or revert #1270 Given this changes quite a bit, and your point about the issue actually being unclear, I'm wondering about reverting #1270 and bundling it in here, for @davidanthoff to review |
That sounds fine to me |
Asked on the Cygwin mailing list here: https://cygwin.com/pipermail/cygwin/2025-October/258882.html |
@topolarity this is what Claude suggested for the error seen here https://github.com/JuliaLang/juliaup/actions/runs/18436832906/job/52532447230#step:14:16
Also I got it to add CI checks for the msix packaging.Apparently the validation tooling is out of date with this spec.. so it's commented out for now. I guess we can only check this in the proper release process.Fixes build error when creating MSIX package:
The
desktop4:Subsystem
attribute added in #1270 requires a higher minimumWindows version. Updated from 10.0.17134.0 (v1803) to 10.0.18362.0 (v1903).
https://learn.microsoft.com/en-us/uwp/schemas/appxpackage/uapmanifestschema/element-desktop4-extension