Styr1x / Browsingway

Dalamud plugin for rendering browser overlays in-game.
GNU General Public License v3.0
34 stars 17 forks source link

[ISSUE] `DOTNET_ROOT` being set will crash the plugin if .NET 5 is not installed #14

Closed TibiIius closed 1 year ago

TibiIius commented 2 years ago

Basically it's this commit: https://github.com/Styr1x/Browsingway/commit/9d92a60ccb94b0987111210f9f41e259d5688258. The problem is that, if the user has DOTNET_ROOT set (normally gets set when you install either 3.1, 5 or 6), and also doesn't have .NET 5 installed (e.g. only .NET 6 and/or 3.1), the plugin won't function correctly.

One way to approach this would be to just force-override the environment varialbe within the application context, but that would take away flexibility (and for example doesn't work with Wine).

Another way of handling this would be to inform the user of what's happening (maybe catch a potential exception? I sadly can't setup a dev environment and test out stuff at this point) and ask them to either download the .NET 5 runtime or set their DOTNET_ROOT env variable to Dalamud's shipped runtime when running FF14. Both solution are not quite ideal, but it's the best I could come up with thus far.

Styr1x commented 2 years ago

The check was added as the plugin sometimes crashed when that env variable was already set in the collection. I'll have another lookt at it.

TibiIius commented 2 years ago

As far as I can tell, this would not be Linux-specific, as the environment variable should also be set on Windows installations (I assume this is the case based on this). It may or may not be set by the default Windows installer, but if it is set at all (e.g. when users set it manually themselves), things should go wrong on both OS's, sadly.

It should, however, only affect a small variety of users and would be fairly easy to fix by users themselves, so I wouldn't give top priority right now anyway.

Styr1x commented 2 years ago

DOTNET_ROOT is not set on by dev system; as far as I understand it only is set / can be set in case your dotnet installation is not in the system specific default path.

Styr1x commented 1 year ago

Browsingway sets DOTNET_ROOT to point to Dalamuds bundled .net runtime, this shouldn't be an issue anymore.