awakened-poe-trade icon indicating copy to clipboard operation
awakened-poe-trade copied to clipboard

Added MacOS support

Open hsource opened this issue 3 years ago • 18 comments

Motivation

I've been playing POE on Mac. Trading sucks as usual. I heard Awakened POE Trade was the best trade tool around, and it didn't seem too hard to port!

Closes #227, #322, #395

Unofficial build and download link: https://www.pathofexile.com/forum/view-thread/3129523

Fixes

  1. Upgrade uiohook-napi and electron-overlay-window for Mac support
    • electron-overlay-window update is pending Added MacOS support #17. I'll update the package.json to refer to the new package once that's pulled/updated
  2. Tweaked config a bit so that the default config works on Mac
    • Set useOsGlobalShortcut: false by default for Mac. For unknown reasons, the globalShortcuts hooks don't seem to ever get triggered on Mac
    • Have a smaller tray image
    • Disable code signing, mostly because I'm too lazy to set it up and it doesn't matter that much for Mac

Testing

Tested with the game. It works pretty well!

  • To run while testing: run yarn electron:serve to run it
  • To build for running repeatedly: run yarn electron:build and copy the built binary into your own directory

https://user-images.githubusercontent.com/2937410/120885003-5b761480-c59b-11eb-9f65-f62e08f2f9b6.mp4

hsource avatar May 26 '21 07:05 hsource

image

Noticed that overlay positioned incorrectly, this is issue in electron-overlay-window implementation for mac. It should report size of client area (without title bar)

SnosMe avatar May 31 '21 13:05 SnosMe

Noticed that overlay positioned incorrectly, this is issue in electron-overlay-window implementation for mac. It should report size of client area (without title bar)

I fixed this with the latest version of electron-overlay-window. I also changed this to stop using uiohook-napi, as the Mac version of libuiohook was pretty unreliable and kept giving me this error. All that was needed to make globalShortcuts work was to remove references to CmdAndCtrl and just use Ctrl.

hsource avatar Jun 05 '21 08:06 hsource

Are there any updates on this? Especially if there is a new POE release soon

Samusia avatar Oct 19 '21 19:10 Samusia

Updated this for the latest version!

hsource avatar Oct 22 '21 11:10 hsource

I'll try to finally merge this ~mid league

SnosMe avatar Oct 22 '21 12:10 SnosMe

"price check", "map check", "open item on wiki", "open base item on craft of exile" aren't working on the latest version of Big Sur and Monterey. I tried a bunch of different keybinds including ones that have proven to work for other commands in the app like shift + space, but it none of them work no matter what keybind I use.

james-prado avatar Oct 31 '21 19:10 james-prado

@james-prado, use the latest version (installed according to the instructions from the first message) on Monterey and work for me: control+d: image As well as option+w and "map check"

version: image

Samusia avatar Oct 31 '21 21:10 Samusia

@Samusia did these tests on the latest release (v2.14) following all the installation steps. I also checked the logs and every time i try to interact with an item I get the following error warn [clipboard]: No item text found. {"text":""} so I guess it has something to do with the accessing the clipboad? The app has accessibility permissions though, so idk why it wouldn't be able to access my clipboard

james-prado avatar Oct 31 '21 21:10 james-prado

Seems I also cant test by building or serving locally on any m1 macs:

 DONE  Compiled successfully in 1156ms                                                                                                                                                      6:34:49 p.m.

  File                      Size                                                                                 Gzipped

  dist_electron/index.js    1374.52 KiB                                                                          281.44 KiB

  Images and other types of assets omitted.

 INFO  Launching Electron...
App threw an error during load
Error: No native build was found for platform=darwin arch=arm64 runtime=electron abi=89 uv=1 armv=8 libc=glibc node=14.17.0 electron=14.0.1
    loaded from: /Users/jamesprado/Git/awakened-poe-trade/node_modules/uiohook-napi
    at Function.load.path (/Users/jamesprado/Git/awakened-poe-trade/node_modules/node-gyp-build/index.js:59:9)
    at load (/Users/jamesprado/Git/awakened-poe-trade/node_modules/node-gyp-build/index.js:21:30)
    at Object.<anonymous> (/Users/jamesprado/Git/awakened-poe-trade/node_modules/uiohook-napi/dist/index.js:6:38)
    at Module._compile (internal/modules/cjs/loader.js:1083:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1113:10)
    at Module.load (internal/modules/cjs/loader.js:940:32)
    at Module._load (internal/modules/cjs/loader.js:781:14)
    at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
    at Module.require (internal/modules/cjs/loader.js:964:19)
    at require (internal/modules/cjs/helpers.js:88:18)

james-prado avatar Oct 31 '21 22:10 james-prado

@Samusia did these tests on the latest release (v2.14) following all the installation steps. I also checked the logs and every time i try to interact with an item I get the following error warn [clipboard]: No item text found. {"text":""} so I guess it has something to do with the accessing the clipboad? The app has accessibility permissions though, so idk why it wouldn't be able to access my clipboard

Turns out it was an issue with another app stealing the ctrl + alt + c keybinding which is needed for awakened poe.

james-prado avatar Nov 01 '21 00:11 james-prado

@hsource, is there a chance to fix next error:

Uncaught Exception:
Error: Invalid key flag specified.
at B$ (/Applications/Awakened PoE Trade.app/Contents/Resources/app.asar/main.js:111:11646)
at Function.<anonymous> (/Applications/Awakened PoE Trade.app/Contents/Resources/app.asar/main.js:111:10897)

image

Samusia avatar May 19 '22 19:05 Samusia

Hi! I beg you to fix the error pointed higher

AndersonDev avatar May 20 '22 21:05 AndersonDev

@hsource I tried the latest version: v3.17.10005.2, but the error still remained. image

Samusia avatar May 21 '22 08:05 Samusia

@hsource Thank you sir!!! The price check works as it should. If you have time, can you also check why F5 does not work? It's not as relevant as checking the price, but it would be great if that worked too. image

Samusia avatar May 21 '22 08:05 Samusia

@hsource Hi! May I ask you to get a look at why prefixes/suffixes are not passed? I'll be very thankful!

AndersonDev avatar May 22 '22 09:05 AndersonDev

@SnosMe is there any chance that this PR will be added to the release?

Samusia avatar May 31 '22 16:05 Samusia

If there was no chance, I would close it already. 😄

SnosMe avatar May 31 '22 17:05 SnosMe

@SnosMe We don't have anyone interested with macOS / virtual machine to make it work? I'm not super familiar with this stack, but currently can play only on macOS. Without your brilliant solution it's extremely hard.

AndersonDev avatar May 31 '22 18:05 AndersonDev

Any news on this?

greenhost87 avatar Dec 25 '22 07:12 greenhost87

For those who want Awakened for MacOS as fast as possible: I forked the repository, created a fix and released the .dmg file for installation. It works for me and my friends PERFECTLY and possibly for others who replied under the thread: https://www.pathofexile.com/forum/view-thread/3333212/page/1

Check the thread and try step-by-step guide to install Awakened for MacOS.

phen0menon avatar Dec 27 '22 18:12 phen0menon

@phen0menon did you push your PR changes?

message avatar Feb 13 '23 21:02 message

@phen0menon Do you have any plans to update this PR? or update you repo in case of 3.21 launch?

greenhost87 avatar Apr 03 '23 22:04 greenhost87

@greenhost87 Yep, I'm gonna update once 3.21 released. Kind of busy now, sorry ;(

phen0menon avatar Apr 04 '23 09:04 phen0menon

Why it can't be tested and merged in dev?

AndersonDev avatar Apr 06 '23 08:04 AndersonDev

@phen0menon Can we kindly ask you to update it?

AndersonDev avatar Apr 07 '23 15:04 AndersonDev

Any progress with merge that?

greenhost87 avatar Jul 25 '23 14:07 greenhost87

@SnosMe Would you be down to merge this in? Honestly, the changes are pretty minimal, especially now that the MacOS code is already in electron-overlay-window. Let me know if you'd like any more changes to the PR!

I tested the latest version on my forum thread

hsource avatar Dec 04 '23 06:12 hsource

Is it possible to add configuration for "show additional mod info" key?

Motivation: native mac client from day to day works really bad as result I start using Apple GPTK/Whiskey/Crossover to play game, but default build APT not work because not possible to press CTRL + (CTRL + C)

greenhost87 avatar Dec 05 '23 13:12 greenhost87

@SnosMe I just re-tested the branch. I think it's pretty well-functioning and good to merge!

Here are things I confirmed to work (keyboard shortcuts)

  • Settings and saving
  • Price check auto-hide
  • Price check no auto-hide
  • Map check/item info
  • Client log and game config default directories
  • Adding new searches
  • Timer

Here are the things that are broken and why they're a bit harder to fix:

  • Adding new image strip. When we try to select an image, it opens a new window that's technically not owned by PoE or the overlay, which causes the overlay to disable since it thinks it's no longer in PoE. I need to change electron-overlay-window to add an exception for the File selection dialog
  • App sometimes doesn't exit when using the menubar
    • This seems to only happen after the error message: "hook_event_proc [990]: CGEventTap timeout!". My best guess is that the uiohook-napi is stopping the event hook in its thread and never restarting it, causing it to not respond to events

I think it's good enough to merge, so if you're OK with it, I'd appreciate it!

hsource avatar Dec 07 '23 05:12 hsource

Thanks for adding macOS support guys! you are very cool!

itslooklike avatar Dec 07 '23 11:12 itslooklike