Ryochan7 / DS4Windows

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

Targeting framework #1036

Closed DragonZX closed 4 years ago

DragonZX commented 4 years ago

What are the reasons of using .Net 4.6.2? I want to help, but have no SDK installed on my PC, as I know, Win 7-10 platforms supports .net 4.8, Windows XP uses only 4.0 (client version, and full in a hard way)

DragonZX commented 4 years ago

Or is it possible to use .NET Core 2.1like ViGEm Bus Driver do? I think it will be better way. BTW it's not good to keep its binary in the github sources

Ryochan7 commented 4 years ago

I doubt the whole DS4Windows app could be ported to .NET Core; WPF support is supposedly only available in the full .NET Framework. Even the primary DS4Library package won't compile against .NET Core due to some of the HID library calls IIRC. DS4Library can compile against .NET Standard though.

The version of the ViGEmClient library deviates from what is available in the Nuget package slightly. The compiled version of the library is included in the repo to make building easier for other people pulling the source code. Once DS4Windows can use vanilla ViGEmClient then the pre-compiled library can be removed from this repo. The current source code for the forked version is available at https://github.com/mika-n/ViGEmClient

Ryochan7 commented 4 years ago

.NET Framework 4.6.2 is used because testing has shown that DS4Windows runs better when targeting version 4.6.2 than when targeting other versions; that is at least true on my machine and that is what matters for the purpose of this project. Also, the Benchmark.NET library has been utilized for some tests in DS4Windows and that library requires using at least .NET Framework 4.6.1.

Some features of C# 7.3 (reassign ref locals) are utilized in the source code so that is the version of C# that the project targets.

DragonZX commented 4 years ago

A little offtop, I've found an article that .Net Core 3.0 can do that, unfortunately Russian and I haven't enouth XP to understand it clearly, but sounds interesting.

Ryochan7 commented 4 years ago

More current sources that I have found state that WPF support has been included in .NET Core since version 3.0.

DragonZX commented 4 years ago

It seems to be the most comfortable way for the future, I'll try to migrate my job projects into and will report here. Some discussions reports about rise of the perfomance after migration. I have no apps, running as service, but I'll try to test that. It'll break some developers platform restrictions, I think. Anyway It's just interesting for me.

Ryochan7 commented 4 years ago

I am always interested in finding ways to improve app performance in .NET. I have not done any experimenting with .NET Core in a long time since I came to the conclusion that it was not feasible for this project. It would be nice to at least have the split DS4WindowsAPI package be only dependent on .NET Core rather than the full .NET Framework.