Closed egemenertugrul closed 3 years ago
I love to see basic Windows support :+1:. But this will be a nightmare to support. Most fixes/changes would have to be done on two branches and have to be tested on two operating systems. I don't have Windows easily available so I couldn't test changes in the windows branch. Not sure how to tackle those problems. Dependency subsets and OS switches in the code could be part of the solution.
Thanks, @egemenertugrul for creating your Windows version. I am noticing that your fork won't build currently in my environment. I followed the instruction using Node.js 9 and I am getting the following error: 'ThreadSafeFunction is not a member of 'Napi.' It seems to have to do with the vigemclient, because if I try installing that node package globally outside of the package, the same error is emitted.
EDIT: I instead used Node.js 14 and it seemed to install okay.
Glad to hear it worked! @hifihedgehog
Glad to hear it worked! @hifihedgehog
No problem, @egemenertugrul! Here is something from me to try and pay it forward. To anyone who is reading this thread who wants to run this as a windowless startup program in the background (this would be analogous to "nohup" in Linux), throw this text into a .VBS script file and it will do the trick! Then just copy that file to your Start Menu startup folder (for all users, that would be C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup) and you are good to go:
Dim objShell
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.CurrentDirectory = "C:\node-virtual-gamepads-windows\"
objShell.Run("""node"" main.js"), 0
Set objShell = Nothing
References: https://keestalkstech.com/2016/07/start-nodejs-app-windowless-windows/ https://devblogs.microsoft.com/scripting/how-can-i-change-the-working-folder-of-a-script/ https://www.addictivetips.com/windows-tips/run-app-as-admin-at-startup-on-windows-10/
I've forked the
master
branch and added Windows support for x360 input: https://github.com/egemenertugrul/node-virtual-gamepadsIt makes use of node-ViGEmClient and ViGEmBus. See README.md for further details. There's no keyboard or touchpad support at the moment.
It was a rather hasty development so did not use CoffeeScript as I'm not very familiar with it. But still, something could be arranged. There are major changes that would break the
master
branch. Shall we create a completely separate branch calledwindows
? What would you suggest?