anasrar / node-iohook-binary

Provide iohook binary for latest electron and node js using github actions CI, just for temporary solution
12 stars 6 forks source link

Temporary solution for installing iohook for electron and node js due to iohook unmaintained prebuild binary for latest Electron and Node.js.

Version

Current Version : v0.9.3

Installation

Install iohook

npm install iohook --ignore-scripts

Add few lines below to package.json

"iohook": {
  "targets": [
    "node-72",
    "electron-85"
  ],
  "platforms": [
    "win32",
    "darwin",
    "linux"
  ],
  "arches": [
    "x64",
    "ia32"
  ]
}

Change node-72 and electron-85 to fit your version node and electron on your project.

Further information on https://wilix-team.github.io/iohook/usage.html#electron

Change few lines in node_modules/iohook/install.js

From

  let downloadUrl =
    'https://github.com/wilix-team/iohook/releases/download/v' +
    pkgVersion +
    '/' +
    currentPlatform +
    '.tar.gz';

To

  let downloadUrl =
    'https://github.com/anasrar/node-iohook-binary/releases/download/ci' +
    '/' +
    currentPlatform +
    '.tar.gz';

Run

node node_modules/iohook/install.js

Support

Electron

Node.js