-
-
Notifications
You must be signed in to change notification settings - Fork 148
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 Apple Silicon! #306
Comments
Hi @ccorcos 👋 I'd love to port nut.js to Apple Silicon, however, I do not own an M1 Mac. Given this, it still boils down to what I said in #224
As soon as it's possible, I'm all in 👍 |
Ah, I see...
|
Oh, this actually looks like a pretty solid option, I'll check that out! 👍 Now that I know you're running an M1 Mac, could you give As I'm currently making quite good progress towards |
Sounds good! I'll try this out next week -- got a little busy all of a sudden. What's your game plan for 2.0.0? 😄 |
The biggest change is the introduction of a little plug-in system which allows one to provide a custom implementation for e.g. image matching. This enabled moving image matching code and it's dependencies into a separate, opt-in package, thus removing the node version dependence in case you don't need any image matching. Other than that I'm currently re-building the whole image matching package from scratch to reduce the amount of complexity tied to it and to make it independent of node/Electron versions. Oh, and I'm working on an OCR plug-in! |
Interesting… I’m not using image matching — it seemed kind of brittle where
you can change your ui and break all your tests… Are you using it for
anything?
My current strategy is just to measure the position of the window and the
elements I want to click through a TCP socket to Electron when I want to
click something. And it’s working great!
…On Sat, Nov 6, 2021 at 15:25 Simon Hofmann ***@***.***> wrote:
What's your game plan for 2.0.0?
The biggest change is the introduction of a little plug-in system which
allows one to provide a custom implementation for e.g. image matching. This
enabled moving image matching code and it's dependencies into a separate,
opt-in package, thus removing the node version dependence in case you don't
need any image matching.
And it enables users to publish their own implementations!
Other than that I'm currently re-building the whole image matching package
from scratch to reduce the amount of complexity tied to it and to make it
independent of node/Electron versions.
Oh, and I'm working on an OCR plug-in!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#306 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANWDX5NGEAC2OGKOB5MSKDUKWTO5ANCNFSM5HJJF7RQ>
.
|
With systems you have control over, like your Electron setup, this is absolutely feasible. For general UI testing and automation, e.g. when dealing with legacy applications or systems you only have access to via VNC, image based testing is often the only way to go. But we're getting a bit off-topic on this issue :) Want to join the nut.js Discord to continue on this topic? |
I see. Makes sense.
…On Sun, Nov 7, 2021 at 12:01 PM Simon Hofmann ***@***.***> wrote:
With systems you have control over, like your Electron setup, this is
absolutely feasible.
For general UI testing and automation, e.g. when dealing with legacy
applications or systems you only have access to via VNC, image based
testing is often the only way to go.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#306 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANWDX6ZXNXDJGO7Z7CGOE3UK3LJRANCNFSM5HJJF7RQ>
.
|
|
Added arm64 to package.json just so it will attempt to install:
Ran
Digging into |
Could you check the output of |
From the
I downloaded libnut and built it too. Seems to work:
But I can't figure out how to link the projects together. Somehow the |
So the second snippet is for the |
Simply installing the
Need to add |
I'll take care of it later today 👍 |
… enable Apple Silicon
@ccorcos Can you give it another try? |
Back in business! Thanks for the help 😄 |
/cc @danielehrhardt |
* (#259) Introduced ImageProcessor interface * (#259) imageToJimp converter function * (#259) RGBA dataclass * (#259) Implement ImageProcessor and register the new provider * (#259) Re-use imageToJimp and clean up tests * (#259) Fixed import for Image which was previously importing from dist * Maintenance/310/remove adapters (#311) * (#310) Delete both adapters * (#310) Migrate window.function to not use adapters * (#310) Migrated window.class to not use adapters * (#310) Migrated screen.class to not use adapters * (#310) Migrated movement.function to not use adapters * (#310) Migrated mouse.class to not use adapters * (#310) Remove leftover notions of adapters in test description * (#310) Fixed expected format when saving a screenshot to disk * (#310) Migrated keyboard.class to not use adapters * (#310) Migrated clipboard.class to not use adapters * (#310) Migrated assert.class test to not use adapters * (#310) Migrated all exported instances to not use adapters * (#310) Removed mention of adapter from test description * Added sponsors listing to README.md * (#306) Update supported cpus to include Apple Silicon (arm64) * Add https://github.com/stoefln to sponsors listing * Feature/204/screen find image needles (#319) * (#204) Enabled passing of Image data to Screen#find * (#204) Updated screen tests * (#204) Removed plugin test from main repo * (#204) Removed plugin test from Docker test runs * (#204) Introduced additional id property to images * (#204) Adjusted tests and image usage to new id property * (#204) Added helper function to make loading image resources easier * (#204) Adapted toShow matcher to new find parameters * (#204) Re-use loadImageResource function * Feature/320/find accept promise (#322) * (#320) Make find, and the functions re-using it, accept Promise<Image> * (#320) Update toShow matcher accordingly * (#320) Update tests * (#321) Added `findAll` to Screen (#323) * (#259) Add `colorAt` to screen class
* (#47) Deleted src/buffer_finalizer.h * (#47) Switched to using Buffer::Copy * Fix for screen highlight window minimized intead close * Create LICENSE.md * Add Helper Methods for calculating the required absolute position on the screen * Refactor moveMouse to use SendInput for absolute position movements on windows * Indentation * Add Coord constant * Squash x and y coord methods Make Absolute coord calculation return MMPoint * Call coord calculator with MMPoint * Correct Types and Return values * Import for getMainDisplaySize * Bugfix for lost co-ordinate precision * (nut-tree/nut.js#249) Enable DPI awareness when fetching screen content to always capture the full screen content even with scaling applied * (nut-tree/nut.js#249) Refactor scale calculation to work correctly with custom regions * (nut-tree/nut.js#306) Specify supported os and cpu in package.json to enable Apple Silicon * Remove scan code block * Release/v2.1.3 (#88) * Update changelog for v2.1.3 * Release v2.1.3 Co-authored-by: Gyula Madarasz <[email protected]> Co-authored-by: Reiss Cashmore <[email protected]>
* Bump tar from 4.4.13 to 4.4.15 Bumps [tar](https://github.com/npm/node-tar) from 4.4.13 to 4.4.15. - [Release notes](https://github.com/npm/node-tar/releases) - [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md) - [Commits](isaacs/node-tar@v4.4.13...v4.4.15) --- updated-dependencies: - dependency-name: tar dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> * Bump tar from 4.4.13 to 4.4.15 in /e2e/electron-test Bumps [tar](https://github.com/npm/node-tar) from 4.4.13 to 4.4.15. - [Release notes](https://github.com/npm/node-tar/releases) - [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md) - [Commits](isaacs/node-tar@v4.4.13...v4.4.15) --- updated-dependencies: - dependency-name: tar dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> * Bump path-parse from 1.0.6 to 1.0.7 Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7. - [Release notes](https://github.com/jbgutierrez/path-parse/releases) - [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7) --- updated-dependencies: - dependency-name: path-parse dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> * (#190) Rename private field native to nativeAdapter to stay consistent * (#255) Only run sonar step if SONAR_TOKEN is set * Added link to API docs to README.md * (#260) Added missing lookup for 'delete' key * (#262) Upgraded to Typescript 4.4.2 with minor adjustments * (#265) Upgraded to SonarSource/sonarcloud-github-action v1.6 * Bump tar from 4.4.15 to 4.4.19 in /e2e/electron-test Bumps [tar](https://github.com/npm/node-tar) from 4.4.15 to 4.4.19. - [Release notes](https://github.com/npm/node-tar/releases) - [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md) - [Commits](isaacs/node-tar@v4.4.15...v4.4.19) --- updated-dependencies: - dependency-name: tar dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> * Revert conditional execution of Sonar reports * (#269) Export some internal objects * (#271) Disable sonarcloud reporting to unstuck cross-platform checks * (#271) Updated dependencies, fix conflicts * (#271) Pin versions for clipboardy * (#271) Move Jest timeout config out of test * (#271) Debug failing AbortController test * (#271) Revert node-abort-controller version bump due to inconsistencies. (Typescript complains on compile time, but after the change it fails on runtime) * (#271) Fixed timeout configs in e2e tests * Added demo video to README.md * (#269) Changed export level and renamed classes to be less ambiguous * (#278) Added grab and grabRegion methods to Screen * (#278) Adjusted captureRegion and grabRegion parameters to accept Promises * (#285) Added additional publish step for GitHub package registry * (#258) Refined wording in snapshot release workflow * Feature/292/provider registry (#293) * (#292) Draft provider registry * (#292) Register ImageWriter and ImageReader instances * Feature/294/export provider interfaces (#295) * (#294) Export interfaces for providers * (#294) Align naming of interfaces * (#296) Add missing export for ImageWriterParameters (#297) * (#301) Exported FilType enum (#302) * Feature/279/separate image matching (#298) * (#279) Remove image matching provider code * (#279) Remove image matching providers from registry * (#279) Update vision adapter test * (#279) Remove opencv4nodejs-prebuilt dependency * (#279) Plugin e2e test * (#279) Init plugin e2e test * (#279) Align e2e package versions * (#279) Fix resource path * (#279) Add error info to output, formatting * (#279) Run plugin test in Docker environment * (#279) Export FileType enum * (#279) Move screen e2e test to plugin e2e test subpackage since it requires the template-matcher package as well * (#279) Move keyboard e2e test to plugin subpackage as well * feat: adding the rest of the function keys (#305) * (#130) Introduce EasingFunction interface (#304) * (#130) Updated implementation * (#130) Easing function refinement * Feature/307/default imagereader imagewriter (#308) * (#307) Add jimp dependencz * (#307) Implement image reader * (#307) Implement image writer * (#307) Test data * (#307) Register both providers * (#307) Stick to BGR color format when loading images * (#307) Expose imagereader and imagewriter through utility functions * (#307) Updated tests to verify calls to Jimp * (#307) Mock jimp in testcases using the pluginRegistry to avoid ReferenceErrors * (#307) Mock jimp in e2e testcases to avoid ReferenceErrors * Maintenance/310/remove adapters (#311) * (#310) Delete both adapters * (#310) Migrate window.function to not use adapters * (#310) Migrated window.class to not use adapters * (#310) Migrated screen.class to not use adapters * (#310) Migrated movement.function to not use adapters * (#310) Migrated mouse.class to not use adapters * (#310) Remove leftover notions of adapters in test description * (#310) Fixed expected format when saving a screenshot to disk * (#310) Migrated keyboard.class to not use adapters * (#310) Migrated clipboard.class to not use adapters * (#310) Migrated assert.class test to not use adapters * (#310) Migrated all exported instances to not use adapters * (#310) Removed mention of adapter from test description * Added sponsors listing to README.md * (#306) Update supported cpus to include Apple Silicon (arm64) * Add https://github.com/stoefln to sponsors listing * Feature/204/screen find image needles (#319) * (#204) Enabled passing of Image data to Screen#find * (#204) Updated screen tests * (#204) Removed plugin test from main repo * (#204) Removed plugin test from Docker test runs * (#204) Introduced additional id property to images * (#204) Adjusted tests and image usage to new id property * (#204) Added helper function to make loading image resources easier * (#204) Adapted toShow matcher to new find parameters * (#204) Re-use loadImageResource function * Feature/320/find accept promise (#322) * (#320) Make find, and the functions re-using it, accept Promise<Image> * (#320) Update toShow matcher accordingly * (#320) Update tests * (#321) Added `findAll` to Screen (#323) * Feature/259/get screen pixel color (#325) * (#259) Introduced ImageProcessor interface * (#259) imageToJimp converter function * (#259) RGBA dataclass * (#259) Implement ImageProcessor and register the new provider * (#259) Re-use imageToJimp and clean up tests * (#259) Fixed import for Image which was previously importing from dist * Maintenance/310/remove adapters (#311) * (#310) Delete both adapters * (#310) Migrate window.function to not use adapters * (#310) Migrated window.class to not use adapters * (#310) Migrated screen.class to not use adapters * (#310) Migrated movement.function to not use adapters * (#310) Migrated mouse.class to not use adapters * (#310) Remove leftover notions of adapters in test description * (#310) Fixed expected format when saving a screenshot to disk * (#310) Migrated keyboard.class to not use adapters * (#310) Migrated clipboard.class to not use adapters * (#310) Migrated assert.class test to not use adapters * (#310) Migrated all exported instances to not use adapters * (#310) Removed mention of adapter from test description * Added sponsors listing to README.md * (#306) Update supported cpus to include Apple Silicon (arm64) * Add https://github.com/stoefln to sponsors listing * Feature/204/screen find image needles (#319) * (#204) Enabled passing of Image data to Screen#find * (#204) Updated screen tests * (#204) Removed plugin test from main repo * (#204) Removed plugin test from Docker test runs * (#204) Introduced additional id property to images * (#204) Adjusted tests and image usage to new id property * (#204) Added helper function to make loading image resources easier * (#204) Adapted toShow matcher to new find parameters * (#204) Re-use loadImageResource function * Feature/320/find accept promise (#322) * (#320) Make find, and the functions re-using it, accept Promise<Image> * (#320) Update toShow matcher accordingly * (#320) Update tests * (#321) Added `findAll` to Screen (#323) * (#259) Add `colorAt` to screen class * (#324) Updated assert to handle valid find parameter types (#326) * Feature/329/find image parameter type (#330) * (#329) Make `Screen#find` only accept `Image` or `Promise<Image>` parameter type * (#329) Update docstrings * (#329) Adjusted tests * (#329) Remove leftover string type checks * (#327) Apply pixel density scaling when querying pixel color information (#332) * (#312) Added new parameter `updateInterval` to `waitFor` to make the interval user configurable (#333) * Feature/233/audio keys (#334) * (#233) Extended key.enum with audio multimedia keys * (#233) Extended Key mapping * Feature/336/colormode conversion (#337) * (#336) Introduced colormode enum * (#336) Extended Image class with color mode conversion methods * (#336) Set color mode on images when reading from disk * (#336) Set colormode on images when grabbing screen content * (#336) Limit switching of channels only to BGR images * (#336) Export ColorMode enum * (#336) Chasing down another async error in tests due to jimp * Update README and docstrings * Fix y offset for tests on macos-latest * Maintenance/341/remove old code (#342) * (#341) Remove Region#scaled * (#341) Remove LocationParameters * Maintenance/340/refine types (#343) * (#340) Refactor the `data` property of `ImageWriterParameters` to `image` * (#340) Refactor `Image#data` to a `Buffer` instead of `any` * (#340) Fixed screen tests * Re-enable sonar step (#344) * Release/v2.0.0 rc1 (#345) * Updated readme * RC1 * Update @nut-tree/libnut to 2.1.3 * Center image in readme again * Fixed typedoc config Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ahad <[email protected]>
Short overview
The new Mac M1 Pro is sweet! But this library doesn't work anymore 😭
Use case
Detailed feature description
Additional content
The text was updated successfully, but these errors were encountered: