Ryochan7 / DS4Windows

Like those other ds4tools, but sexier
https://ryochan7.github.io/ds4windows-site/
GNU General Public License v3.0
6.98k stars 808 forks source link

[TODO] Finalize .NET 5 port and release as version 3.0 #1980

Closed Ryochan7 closed 3 years ago

Ryochan7 commented 3 years ago

I am no longer that concerned about a migration window for pushing out the .NET 5 port of DS4Windows. Not even concerned if the app breaks for people that might not have .NET 5 installed. Seriously thinking of pushing it out for Aprehll Fallssss.

Opie & Anthony: April fools day with Edgar(AprehLL fAllssS): https://www.youtube.com/watch?v=UuicIL-HVno

Ryochan7 commented 3 years ago

Debating the version number. This type of change might warrant a major version change. Releasing it as version 3.0 might be more fitting.

mika-n commented 3 years ago

Nice plan. Especially when the next Win10 21H1 adopts .NET 5.0 even more and will be a platform for the .NET 6.0 on 2022. After all the old .NET 4.8 no longer receive any updates or new features. NET5 has several performance and GC collector improvements, so now when ViGem supports only Win10 anyway it is a good time to make this move.

Ryochan7 commented 3 years ago

Got a few more tasks done. The ViGEm libraries in the net5 branch now target .NET Core rather than .NET Framework 4.5. The Markdown.XAML library has been deprecated in favor of MdXaml since Markdown.XAML has not been updated since 2018 I think and it is stuck on .NET Framework 4.6. The latest DS4Updater version was mainly made to add a routine to attempt to find and delete unused DLL files in the DS4Windows installation folder.

.NET 5 provides a nice performance boost for DS4Windows compared to the old .NET Framework. @sitiom is the person who did a majority of the work porting the code to .NET 5. I just tweaked the changes a bit and I fixed a couple of problems I created due to changes in the main code base.

Ryochan7 commented 3 years ago

Got all the supplementary tools ported to .NET 5. Most were easy to port except for the HidGuardHelper app. Dealing with C++/CLI again to port the UtilLibrary library was a hassle. The only other task that I can think of doing is maybe removing the Newtonsoft.JSON library dependency and using the built-in JSON classes available in .NET 5 instead.

Ryochan7 commented 3 years ago

Version 2.2.14 is the last version that will target the .NET Framework. Going to make a new branch for the current code and freeze that code in just a bit. The code in the net5 branch will be carried over to the jay branch.

The plan is to only incorporate future code updates on the .NET 5 code base. Not sure if one more commit will be added to remove the nag window included in version 2.2.14. Now within the app, there will be at least a one week warning to tell people to install the latest .NET 5 Runtime.

Ryochan7 commented 3 years ago

The version 2.2.14 code is now available in the netframework branch.

https://github.com/Ryochan7/DS4Windows/tree/netframework

Ryusennin commented 3 years ago

I didn't see any warning window (I already have .NET 5 and 6 installed), but I get the following error message in the log:

03/24/2021 21:40:44: System.AggregateException: One or more errors occurred. ---> System.ArgumentException: Version string portion was too short or too long. at System.Version.VersionResult.SetFailure(ParseFailureKind failure, String argument) at System.Version.TryParseVersion(String version, VersionResult& result) at System.Version.Parse(String input) at System.Version..ctor(String version) at DS4WinWPF.StartupMethods.NetVersionInstalled() at DS4WinWPF.DS4Forms.MainWindow.<>cDisplayClass24_0.b0() at System.Threading.Tasks.Task.Execute() --- End of inner exception stack trace --- ---> (Inner Exception #0) System.ArgumentException: Version string portion was too short or too long. at System.Version.VersionResult.SetFailure(ParseFailureKind failure, String argument) at System.Version.TryParseVersion(String version, VersionResult& result) at System.Version.Parse(String input) at System.Version..ctor(String version) at DS4WinWPF.StartupMethods.NetVersionInstalled() at DS4WinWPF.DS4Forms.MainWindow.<>cDisplayClass24_0.b0() at System.Threading.Tasks.Task.Execute()<---

Ryochan7 commented 3 years ago

Can you give the current value stored in the registry under HKEY_LOCAL_MACHINE\SOFTWARE\dotnet\Setup\InstalledVersions\x64\sharedhost\Version? On my system, the value is 5.0.4.

At this rate, I am betting the .NET 6 beta install is what is giving the check trouble. Can't even trust Microsoft to use their own standard when it comes to Version info. There is probably some non-standard text in there that is not supposed to be in a proper Version number (ex. 6.0.0-preview9000).

Ryochan7 commented 3 years ago

Tested Windows 7 support for the .NET 5 build. Found out what is needed for a stand-alone build. The .NET 5 build is confirmed to work in Windows 7 after installing the .NET 5 Runtime. Also, it is confirmed that an error window will pop up if a system does not currently have .NET 5 installed. The window will direct the user to the current .NET 5 runtime download page as well. That should make this whole migration easier.

Ryusennin commented 3 years ago

You're right, .NET version number on Win10 gives "6.0.0-preview.2.21154.6".

I tried DS4W 2.2.14 on Win7 (with .NET 5 already installed) and found no issue.

Ryochan7 commented 3 years ago

Pushed out a version 2.2.15 update that should fix the .NET version check for that case

rodrigosiviero commented 3 years ago

The popup still showing up for 2.2.15, regedit sharehost version is 5.0.4

Ryochan7 commented 3 years ago

Are you using the x86 build of DS4Windows? That is the only reason why I would think the window would still pop up. If that is the case, you need to install the x86 version of the .NET 5 Runtime as well. Either that or start using the x64 build of DS4Windows.

Coreusa commented 3 years ago

What is the motivation behind this new requirement?

Masamune3210 commented 3 years ago

https://github.com/Ryochan7/DS4Windows/issues/1980#issuecomment-803275301

Ryochan7 commented 3 years ago

What is the motivation behind this new requirement?

Pretty much the core motivation for many changes in the project: it works better on my system

mika-n commented 3 years ago

What is the motivation behind this new requirement?

From a technical perspective: improved CPU/RAM consumption, faster core, more features, supports single-file deployment if needed, more future proof for upcoming Win10 versions. I don't know any reason why not to make this move.

Coreusa commented 3 years ago

Pretty much the core motivation for many changes in the project: it works better on my system

While blissfully ignorant, you should do yourself a favor and inform your users along the lines of what @mika-n said, so users aren't bewildered. Remember many users aren't tech savvy and "another thing to install" without detailing exactly why may work against you.

Masamune3210 commented 3 years ago

,,,I mean, the comment is right next to theirs if they want more info. In the end if someone doesn't want to bother updating or installing it, more words likely wont change much

Ryochan7 commented 3 years ago

Pretty much the core motivation for many changes in the project: it works better on my system

While blissfully ignorant, you should do yourself a favor and inform your users along the lines of what @mika-n said, so users aren't bewildered. Remember many users aren't tech savvy and "another thing to install" without detailing exactly why may work against you.

People really like to overstep their boundaries

Ryochan7 commented 3 years ago

Since this has become just another thread of REE-ing, no reason to leave it open. I stated the reason for this transition. It will most likely benefit everyone but that doesn't matter. Get a lot of flack no matter what changes are made. Hardly any help though.

I continually get a lot of flack for decisions that have been forced upon me by users. Even the move from ScpVBus to ViGEmBus. People complained for months about this program sticking with ScpVBus. I finally found a way to get ViGEmBus to work within my requirements. Once the move finally happened, people immediately complained about using ViGEmBus in DS4Windows; there are still complaints posted regularly about ScpVBus support being removed. Plenty of other examples if you look for them.

Be a Bill Lumbergh somewhere else.

hey_peter