From e9972bd70a5cbbaca73efe317a960dae1e2ad519 Mon Sep 17 00:00:00 2001 From: Andrew Gundersen Date: Wed, 18 Aug 2021 10:19:52 -0500 Subject: [PATCH] iohook settings --- package.json | 17 ++++++++++++++++- src/main.ts | 7 +++++++ yarn.lock | 7 +++++++ 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index e65cad6..b2c0c2f 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,6 @@ "private": true, "description": "Cross-platform messenger application built with electron, vue3, and TS.", "author": { - "name": "Enrique Hernandez", "name": "Andrew Gundersen" }, "scripts": { @@ -30,6 +29,7 @@ "electron-updater": "^4.3.8", "mitt": "^2.1.0", "naudiodon": "^2.3.2", + "node-abi": "^2.30.0", "node-record-lpcm16": "^1.0.1", "update-electron-app": "^2.0.1", "uuid": "^8.3.2", @@ -101,5 +101,20 @@ "type": "git", "url": "https://gitlab.com/crimata/electron-app.git", "release": "latest" + }, + "iohook": { + "targets": [ + "node-83", + "electron-85" + ], + "platforms": [ + "win32", + "darwin", + "linux" + ], + "arches": [ + "x64", + "ia32" + ] } } diff --git a/src/main.ts b/src/main.ts index 2d9e5fe..726140e 100644 --- a/src/main.ts +++ b/src/main.ts @@ -14,8 +14,15 @@ import { accountAuth } from "./account"; import createWindow from "./window"; import { initTray } from './tray'; +const nodeAbi = require('node-abi'); + + export default async function main() { + console.log('node abi', nodeAbi.getAbi('14.17.0', 'node')); + console.log('electron abi', nodeAbi.getAbi('11.4.10', 'electron')); + + /* initiate render process event listeners & handlers */ initIpcMain(); diff --git a/yarn.lock b/yarn.lock index 5e2ea71..ca3b535 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9092,6 +9092,13 @@ no-case@^2.2.0: dependencies: lower-case "^1.1.1" +node-abi@^2.30.0: + version "2.30.0" + resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-2.30.0.tgz#8be53bf3e7945a34eea10e0fc9a5982776cf550b" + integrity sha512-g6bZh3YCKQRdwuO/tSZZYJAw622SjsRfJ2X0Iy4sSOHZ34/sPPdVBn8fev2tj7njzLwuqPw9uMtGsGkO5kIQvg== + dependencies: + semver "^5.4.1" + node-addon-api@^1.7.1: version "1.7.2" resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-1.7.2.tgz#3df30b95720b53c24e59948b49532b662444f54d" -- 2.43.0