Skip to content
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

Finalize ARM64 support (Installers, publishing-rid, revert winforms support) #8470

Merged

Conversation

hoyosjs
Copy link
Member

@hoyosjs hoyosjs commented Sep 10, 2020

@wli3 @marcpopMSFT @sfoslund this is the PR I folded the other one into. It's still in draft as I'm testing but I wanted some feedback.

  • Enable Win-ARM64 as a possible RID for ASP.NET core
  • ARM64 bundled installer

I've excluded the following assets from the ARM64 installer. Are these ok?

  • There are no alternate architecture hosts MSIs available. I've excluded those.
  • There is no ARM64 targeting pack available for .NET standard. I'd have to do this from a servicing branch and it wasn't very straightforward. Would these get downloaded as NuGet packages if not available in-box?
  • It was decided to revert WinForms Win-ARM64 support until WPF is ready.

@hoyosjs
Copy link
Member Author

hoyosjs commented Sep 10, 2020

Also ignore the changes in Versions.props. These are to test while ASP flows an official version of the ARM64 assets (dotnet/aspnetcore#25579)

cc: @tommcdon

@hoyosjs hoyosjs force-pushed the juhoyosa/arm64-bundled-installer branch from 3fdac90 to 7f67b54 Compare September 10, 2020 10:07
@tommcdon tommcdon mentioned this pull request Sep 10, 2020
10 tasks
@hoyosjs
Copy link
Member Author

hoyosjs commented Sep 10, 2020

Related to #7985

@hoyosjs hoyosjs force-pushed the juhoyosa/arm64-bundled-installer branch 4 times, most recently from 2f34f1a to f1e463b Compare September 11, 2020 06:00
@hoyosjs
Copy link
Member Author

hoyosjs commented Sep 11, 2020

Official test build with versions.props changed backed out to test shipping bits: https://dev.azure.com/dnceng/internal/_build/results?buildId=811915&view=results

@hoyosjs hoyosjs force-pushed the juhoyosa/arm64-bundled-installer branch from f1e463b to 75de7b2 Compare September 11, 2020 20:12
@hoyosjs hoyosjs marked this pull request as ready for review September 11, 2020 20:12
Copy link
Member

@sfoslund sfoslund left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but I don't have a deep understanding in this area. @joeloff do you mind reviewing too?

@joeloff
Copy link
Member

joeloff commented Sep 14, 2020

@sfoslund I'm looking at it

@hoyosjs
Copy link
Member Author

hoyosjs commented Sep 14, 2020

@richlander

@hoyosjs
Copy link
Member Author

hoyosjs commented Sep 14, 2020

I've excluded the following assets from the ARM64 installer. Are these ok?

  • There are no alternate architecture hosts MSIs available. I've excluded those.
  • There is no ARM64 targeting pack available for .NET standard. I'd have to do this from a servicing branch and it wasn't very straightforward. Would these get downloaded as NuGet packages if not available in-box?
  • It was decided to revert WinForms Win-ARM64 support until WPF is ready.

@richlander @wli3 @sfoslund Are these OK? Both from a product perspective as well as a technical perspective? I am still not familiar with when things get downloaded on the fly or not.

@sfoslund
Copy link
Member

Are these OK? Both from a product perspective as well as a technical perspective? I am still not familiar with when things get downloaded on the fly or not.

I don't see a problem from the technical perspective.

@kelxshady
Copy link

Good ❤️

@hoyosjs
Copy link
Member Author

hoyosjs commented Sep 14, 2020

@marcpopMSFT given this is for RC2, who'd be the right M2 to ask for this to be considered by tactics?

@marcpopMSFT
Copy link
Member

@hoyosjs The sdk is on the VS schedule for approvals and so doesn't need M2 signoff yet. This is a significant enough change though that it's worth mentioning to tactics as an FYI.

@marcpopMSFT
Copy link
Member

@hoyosjs @joeloff I gave tactics a heads up on this change. Is there anything left we need to cover before we can merge this and get testing on the official signed installer?

CC @jeffhandley who expressed interest in testing and @tommcdon who's been engaged with the arm64 work on the runtime side.

@jeffhandley
Copy link
Member

@hoyosjs If you can provide a link to the signed installer, I'll relay it to my team and some folks will try it out. Several people on the Libraries team have ARM64 devices and have been dogfooding.

@hoyosjs
Copy link
Member Author

hoyosjs commented Sep 16, 2020

Further testing done:

  • Verified the official x64/x86 installer sets the same registry keys before and after the change. They also end up with the same tree structure.
  • Spot checking a few assemblies, contents are properly signed and have been crossgened as arm64.
  • Contents match x64 with these exceptions:
    • Only has Microsoft.NETCore.App.Host.win-arm64 (there's no other MSIs for alternate hosts on arm64)
    • No NETStandard or WindowsDesktop ref in-box. The first one has no arm64 msi, the latter is not supported yet.
    • No WindowsDesktop sharedfx, as WPF isn't ready.
    • UCRT dlls are missing - opened ARM64 Runtime Packs and shared FX missing UCRT binaries runtime#42287 to confirm if this is expected.
  • Side by side x86/arm64 works.
  • Built and published the following:
    • Simple console app.
    • Simple ASP.NET webapi and mvc apps.
    • WinForms/WPF apps - builds/publish rid agnostic by downloading the ref pack but won't publish for ARM64 (expected as it's decided as an unsupported scenario until WPF ships arm64 bits).
    • Simple netsandard2.0 lib builds by downloading the ref pack (We couldn't add it inbox as the infrastructure wasn't available in 5.0 anymore).

Bugs I noticed:

  • It reports WinForms was installed. This is a localized resource so I'd need to change all the string resources or compile them conditionally.
  • DOTNETHOME seems empty on arm64. Investigating this.

People who might care about this: @safern, I know you have the Surface X. @jeffhandley

https://dev.azure.com/dnceng/internal/_build/results?buildId=811915&view=results has builds that can be tested in the artifacts.

@richlander are these experiences, plus the ones describing what's available in-box acceptable for now?

@joeloff
Copy link
Member

joeloff commented Sep 16, 2020

@hoyosjs The UI strings are static. And they're referenced from the theme.xml that defines the screens. You can condition the string by adding both strings to the UI, but then set the visibility property on a known property that would only be available if your arm64/x64.

You would effectively duplicate this line

<Richedit Name="SuccessInstallHeader" X="160" Y="81" Width="-12" Height="-71" FontId="5" HideWhenDisabled="yes">#(loc.FirstTimeWelcomeMessage)</Richedit>

But give it different names: SuccessInstallHeader and SuccessInstallHeaderArm64 and define two strings

<Richedit Name="SuccessInstallHeader" X="160" Y="81" Width="-12" Height="-71" FontId="5" HideWhenDisabled="yes">#(loc.FirstTimeWelcomeMessage)</Richedit>
<Richedit Name="SuccessInstallHeaderArm64" X="160" Y="81" Width="-12" Height="-71" FontId="5" HideWhenDisabled="yes">#(loc.FirstTimeWelcomeMessageArm64)</Richedit>

And in the bundle, define the variables with the same name as the UI controls.

<?if $(var.Platform)=arm64?>
<Variable Name="SuccessInstallHeaderArm64" Value="1"/>
<?else?>
<Variable Name="SuccessInstallHeader" Value="1"/>
<?endif?>

This ensures that only one of the two controls is active in the UI.

@hoyosjs
Copy link
Member Author

hoyosjs commented Sep 16, 2020

@joeloff the problem with that approach is we end up with the success message on uninstall overlayed with the uninstall header. (The success page always has SuccessInstallHeader`SuccessInstallHeaderArm64` set to enabled so it always renders them). This is the only thing left. I tried a that and conditionally compiling with the preprocessor, but neither worked. If I can't think of anything else, we should merge this to make sure we include it in RC2.

@kelxshady
Copy link

Ok

@joeloff
Copy link
Member

joeloff commented Sep 16, 2020

@hoyosjs ideally you want to condition the variable on something like WixBundleAction, but bundles don't support conditionals, except if you set the variable, then override it through a registry search, which would complicate things significantly

A simpler approach is to create an ARM64 version of the theme file. It can be an exact copy and share the .wxl file, except we swap out the one string. Once WPF/WinForms are supported, we flip back to a shared theme file.

@hoyosjs hoyosjs linked an issue Sep 16, 2020 that may be closed by this pull request
@hoyosjs
Copy link
Member Author

hoyosjs commented Sep 16, 2020

@joeloff that worked nicely enough. Thanks!

@hoyosjs hoyosjs changed the title Enable Windows ARM64 bundled installer Enable Windows ARM64 bundled installers and as a valid publish architecture Sep 16, 2020
@hoyosjs hoyosjs changed the title Enable Windows ARM64 bundled installers and as a valid publish architecture Finalize ARM64 support (Installers, publishing-rid, revert winforms support) Sep 16, 2020
@joeloff
Copy link
Member

joeloff commented Sep 16, 2020

@hoyosjs glad to hear the theme change worked. I think if this build is green we should merge

@hoyosjs
Copy link
Member Author

hoyosjs commented Sep 16, 2020

@hoyosjs glad to hear the theme change worked. I think if this build is green we should merge

Yeah, that's about as much manual testing as I can think of to catch potential issues here.

@hoyosjs hoyosjs merged commit 05541c6 into dotnet:release/5.0.1xx-rc2 Sep 16, 2020
marcpopMSFT added a commit that referenced this pull request Mar 29, 2021
Merge pull request #8470 from hoyosjs/juhoyosa/arm64-bundled-installer

Finalize ARM64 support (Installers, publishing-rid, revert winforms support)
marcpopMSFT added a commit that referenced this pull request May 11, 2021
…x merge conflicts.

**Summary of the change**
Enable an arm64 windows installer.  Cherry pick the below commit and fix merge conflicts. Update the installer UI to be consistent with 3.1 installer UI.

**Testing**
Signed off by Tom and Richa targeting arm64 installer as well as baseline arm64 scenarios.

Merge pull request #8470 from hoyosjs/juhoyosa/arm64-bundled-installer

Finalize ARM64 support (Installers, publishing-rid, revert winforms support)
![arm64 installer.png](https://dev.azure.com/dnceng/7ea9116e-9fac-403d-b258-b31fcf1bb293/_apis/git/repositories/c20f712b-f093-40de-9013-d6b084c1ff30/pullRequests/13891/attachments/arm64%20installer.png)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ARM64 Windows Installer
6 participants