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

MGCB: Improve user experience when user tries to start mgcb-editor on macOS with Apple Silicon chip #27

Open
seclerp opened this issue Oct 4, 2024 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@seclerp
Copy link
Owner

seclerp commented Oct 4, 2024

At the moment of creating this issue, the mgcb-editor is still not supported on Apple Silicon chips: MonoGame/MonoGame#8003 (comment)

More specifically, it doesn't work with ARM64-based .NET 8 Runtime.

The only known workaround is to launch it using an additional x64-based .NET 8 Runtime, which is supported by Rider:
image

So, when user is trying to launch MGCB Editor using our floating action in the code editor, we need:

  1. Check, if it's a macOS Apple Silicon case
  2. If so, check if we have x64 .NET runtime installed
  3. If we don't have it installed, show a warning notification before trying to launch the tool
  4. If we have it installed, use it instead of ARM64-based runtime as a base for the mgcb-editor command

In some cases mgcb-editor is invoked without pretending dotnet - it means that we need to workaround a bit the way how it gonna be resolved.

.NET tools have different rules for running local and global tools.
For global tool, it should be executed as a stand-alone program, like that:
> mgcb-editor
For local tool, it should be executed as a sub-command for 'dotnet', like that:
> dotnet mgcb-editor
or in more explicit way:
> dotnet tool run mgcb-editor
Source: https://learn.microsoft.com/en-us/dotnet/core/tools/global-tools#use-a-tool

As an option, we could introduce a custom DOTNET_ROOT env var.

A workaround from a user: https://www.reddit.com/r/monogame/comments/1bdbef6/developing_with_monogame_on_an_m1_apple_silicon/

@seclerp seclerp added this to the Future milestone Oct 4, 2024
@seclerp seclerp added the enhancement New feature or request label Oct 4, 2024
@seclerp seclerp changed the title MGCB: Improve user experience when user tries to start mgcb-editor on Apple Silicon MGCB: Improve user experience when user tries to start mgcb-editor on macOS with Apple Silicon chip Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant