-
-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Feature: Stub EXE For Dependency Checking #43
Comments
For both proposed solutions, assumes the real Reloaded-II.exe is not launched by the user but rather by the proxy solutions below: Solution 1 Reloaded-II-Doctor Does not explicitly check for netcore installs. Example: Reloaded launches but throws an exception when launching a game? Again suggest solution or automatically perform solution (with permission) These two however could just be handled by Reloaded-II's exception handler. The main problem being caught would be the lack of any error on missing both dependencies. Reloaded-II doctor should terminate after successful/safe timeout period. Solution 2 Reloaded-II-DepCheck Explicitly checks for netcore installs (or whatever current dependencies needed) once every Reloaded-II update. On an R-II update: Potential problems:
Solution 3 After writing this out I think I'll make a prototype of Solution 2, from there if you like it you can use it or write your own factoring in successes/failures of the prototype. |
Don't think this will be necessary, as I'd expect most time to be spent JIT-ting the code on startup. Cold Boot:
Hot Boot:
This is on an above average machine: Ryzen Mobile 3550H and an SSD; but it should check out on lower end machines too. Most of this is probably setting up the runtime and jitting the initial code. In practice, JIT-ting the JSON library to parse out the Might be able to kill that up to 8ms IO overhead by embedding the Json parser directly though (see: https://github.com/Fody/Costura). |
I added Cold Boot:
Hot Boot:
Seems to drop a lot of dependencies since a lot of these libs aren't in Framework, oof. Maybe try Utf8Json. Edit: Maybe we can try CoreRT? |
CoreRT knocks it out of the park (and this includes deserialization). Cold Boot:
Hot Boot:
I used this doc to get started: https://github.com/dotnet/corert/tree/master/samples/HelloWorld This is still possible to optimize though: https://github.com/dotnet/corert/blob/master/Documentation/using-corert/optimizing-corert.md The sad part though is it's probably not possible to load Core DLLs from a CoreRT compiled program (as per dotnet/corert#6949), which makes complete sense. I would totally have liked to ship the launcher using this tech but it's a no-go because of |
Just some notes for interesting/nontrivial stuff: @dreamsyntax Semantic Versioning.NET Core uses a versioning scheme similar to Semantic Versioning 2.0.0 (it has preview versions); we will need a compatible version parser such as NuGet.Versioning. Will need to write a basic converter to this type using Framework NameProbably want an enum like this: enum FrameworkName
{
// Default/Null
App, // Microsoft.NETCore.App
Asp, // Microsoft.AspNetCore.App
WindowsDesktop // Microsoft.WindowsDesktop.App
} Because string comparisons are a no-no. Once again, will need a basic converter to this type using
The biggest part will be this and this is where unit tests will be necessary heh. |
Implemented as of commit #ad1ce65ca775dda3ce57aad3fa4c06471dcf49f1 |
The Problem
I'm continuously frustrated with users every other day asking for help because they did not install the dependencies required.
This generally amounts to what feels like 75-80% of all questions asked at least on the Heroes Hacking Central where I run my operations for a certain 16 year old game.
The Current Solution
In the past, the required dependencies were at the top of readme. This did not work very well on Github, as the user required to scroll the page to see the dependencies; so it was changed in favour of a more optimised system. However, surprisingly, a lot of GameBanana users had a tendency of missing the prerequisites too, which was an annoyance.
I then figured that placing the dependencies beside the download buttons so that the users literally can't miss them would be better. This worked out pretty well at the time, however as more and more users started to use Reloaded, the issue would once again become an annoyance.
As seen on Github:
As seen on GameBanana:
Describe the solution you'd like
We should have a proxy EXE that runs on .NET Framework which performs a dependency check for Core and informs the user if the dependencies are missing. We may download Core ourselves using the dotnet-install script after informing and receiving consent from the end user.
Additional context
There is no official library or recommended means of checking what versions of Core are installed on the machine.
The easiest way to check however would be by inspecting the
Program Files\dotnet\shared\
andProgram Files (x86)\dotnet\shared\
folders.These folders contain a folder for each of the installed runtimes
ASP, Desktop, App
and inside those, folders for each version, including previews.Ideally we wouldn't want to have to manually specify the required version, so we would want to parse
runtimeconfig.json
and then extract the required framework from the given configuration file. It is important however that we parse any customrollforward
option as specified per https://github.com/dotnet/designs/blob/master/accepted/2019/runtime-binding.md#rollforward and appropriately resolve if the user has compatible Core versions installed.The text was updated successfully, but these errors were encountered: