-
Notifications
You must be signed in to change notification settings - Fork 291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Multiple Apps Running with IOHook #294
Conversation
Hi @chevonc! Your video looks very cool. So we need to review PR and fix build steps in Appveyor (looks like problems with Nan or Node version) |
@WilixLead yes, it should only affect windows systems. Looking at the build logs, it seems Appveyor's only errors are with node 8.9.3 & 9.2.0. I think this is because the node-gyp build headers + windows sdk libs used when targeting I can attempt to see if there's a way around this, but my hunch is removing the target these nodes versions from the package.json is the best fix here. Official LTS (long term support) for node 8 ended last yr (and 9 never had LTS). I think this is critical fix being held back by an old node versions. I'll go ahead and remove the targets, lmk what you think. |
Tests working well in Windows 10/Electron 11. Also no conflict if another instance of previous version iohook is running. Nice! |
@WilixLead @Djiit any chance to get a review/feedback here? Hoping this could be merged soonish, so I can pull the updated package |
Hey, just passing by, LGTM, what do you think @WilixLead ? |
Remember to make it a BREAKING change since we remove support for old version (8/9) |
Node 8/9 still very used and this PR not tested with Windows less then 10 (7/8), but I think older Windows versions should work well. I review code, looks ok (I don't have Windows machine at this moment, but I can try later) |
I bumped the version major version to signify this is breaking change (ie - node 8/9 no longer supported) |
@Djiit @WilixLead any chance we can get some movement on this? I bumped the major version, but let me know if there's something else blocking it |
Sorry for the late reply. I would advise to bump only a minor, as we are pre 1.0, following semver. @WilixLead would you please merge this, set the correct version on master and release a new version on npm? |
@WilixLead any chance we can get this merged/released this wk, please? Let me know if I can assist in any way |
@chevonc in case they are reluctant/indifferent to merge, maybe we can publish it on npm as iohook-fixed/nonfreezing or something. Let me know if you want my help in that. |
@Wizek seems like that may be the fastest route here. Happy to take your assistance here to compile/publish these changes to npm if you wanna go ahead and take a stab. |
@chevonc So, AFAIR, publishing a js-only package on npm is quite easiy, e.g. like this: https://zellwk.com/blog/publish-to-npm/ The only difficulty might be the C binary. The way the willix package does it is that they pre-build and upload it to a GitHub release like this: https://github.com/wilix-team/iohook/releases/tag/undefined0.7.2 and during npm install, they try to download from here the appropriate version. If that would fail, there perhaps should be a fallback to build on the local system of the installing user. However, for some reason I ran into some issues when I got to this point. C:\Users\Wizek\sandbox\iohook-test> npm i github:Wizek/iohook#multiappsPatchC:\Users\Wizek\sandbox\iohook-test> npm i github:Wizek/iohook#multiappsPatch
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported
> [email protected] install C:\Users\Wizek\sandbox\iohook-test\node_modules\iohook
> node install.js
Downloading prebuild for platform: iohook-v1.0.0-node-v83-win32-x64
Downloading prebuild.tar.gz
Error: GET https://github.com/wilix-team/iohook/releases/download/v1.0.0/iohook-v1.0.0-node-v83-win32-x64.tar.gz returned 404
Prebuild for current platform (iohook-v1.0.0-node-v83-win32-x64) not found!
Try to compile for your platform:
# cd node_modules/iohook;
# npm run build
C:\Users\Wizek\sandbox\iohook-test\node_modules\iohook\install.js:16
throw err;
^
[Error: ENOENT: no such file or directory, open 'C:\Users\Wizek\AppData\Local\Temp\prebuild.tar.gz'] {
errno: -4058,
code: 'ENOENT',
syscall: 'open',
path: 'C:\\Users\\Wizek\\AppData\\Local\\Temp\\prebuild.tar.gz'
}
npm WARN iohook-test No description
npm WARN iohook-test No repository field.
npm WARN iohook-test No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node install.js`
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Wizek\AppData\Roaming\npm-cache\_logs\2021-03-31T09_11_51_955Z-debug.log Then: C:\Users\Wizek\sandbox\iohook-test\node_modules\iohook> npm run build
I think there are two ways forward from this:
If either of these works I think we can publish. |
About the build fallback failure, this seems to be the culprit: https://github.com/chevonc/iohook/blob/multiappsPatch/.npmignore I'm continuing to look into this. |
Please let me know if you manage to publish it, really want to use this library for an electron project I'm working on! |
@bikutaa-dev Ok. Just change version to 0.9.0 and I can merge it |
@WilixLead Since I can not change code in either this repo or chevonc's, I've made the version change over here: #311 So was this the only blocking issue and that can be merged now? |
thank you for merging @WilixLead. Any chance we can get a new npm release w. this version as well? So far, I only see it on github with 'undefined' in the tag - https://github.com/wilix-team/iohook/releases/tag/undefined0.9.0 |
Looks like some bugs in string concatination 😄 So. At this moment most important for update in npm - it is remember how we doing it 😂 |
Always done this manually from my machine with a simple |
Changes look great so far |
Description
Port LibUIOHook changes to use non-shareable synchronization primitive kwhat/libuiohook#72
Motivation and Context
Allows multiples app running with IOHook to use the library without lagging windows OS due to mutex contention.
Fixes #93
How Has This Been Tested?
Yes, compiled locally and tested with on Windows 10 by spawning two processes importing IOHook. System no longer freezes or lags.
Screenshots (if appropriate):
IOHook.Input.Lag.Fix.mov
Types of changes
Checklist:
special thanks to @Wizek for iohook-test harness