SnosMe / uiohook-napi

MIT License
162 stars 37 forks source link

Changed binding.gyp to enable MacOS build #2

Closed hsource closed 3 years ago

hsource commented 3 years ago

Motivation

I was trying to build awakened-poe-trade on Mac. Running the binary after yarn electron:serve led to this error:

image

I realized this was because uiohook-napi had no Mac binaries built, leading node_gyp to not find the required files.

Fix

Added code to build for Macs in the bindings.gyp

Testing

  1. Built latest version by running rm -rf build dist; yarn install; yarn build-ts
  2. Installed local uiohook-napi in Awakened POE Trade using yarn add ../uiohook-napi
  3. Rebuilt Awakened POE Trade and ran the binary
  4. Verified it no longer shows this error

Awakened POE Trade still doesn't work, but because of other lack of Mac support