Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Prebuild binaries #204

Open
fabiospampinato opened this issue Jan 22, 2019 · 3 comments
Open

Prebuild binaries #204

fabiospampinato opened this issue Jan 22, 2019 · 3 comments

Comments

@fabiospampinato
Copy link

I'd like to use Atom's watcher in an Electron app of mine, but it seems that using a native dependency in a cross platform app can be tricky, I see there's been some discussion about publishing prebuild binaries already here #135 but I wasn't quite able to integrate @atom/watcher successfully in my project, could you guys perhaps share some steps on how to integrate this in a cross-platform electron app?

Thank you!

@smashwilson
Copy link
Contributor

It took me some time but I did get prebuilds working properly by v1.3.0. You should be installing the prebuilt binaries automatically when you npm install @atom/watcher.

[..] I wasn't quite able to integrate @atom/watcher successfully in my project, [..]

Can you elaborate on the specific difficulties you're having?

@fabiospampinato
Copy link
Author

Can you elaborate on the specific difficulties you're having?

Sure, first of all I'm trying to make cross-platform bundles from a single platform, which is something that is supposed to be working only when prebuilt binaries are available, I think.

Here there's a branch that uses @atom/watcher, and here there's the code that uses it, for now it just shows an alert with the number of events received. If you'd like to build the app yourself check this.

  1. I did a npm install @atom/watcher, then restarted the app with a npm run dev, and got the following error in the console:

screen shot 2019-01-22 at 17 23 13

  1. Which seems to say that the required binary has not been found. So I ran npx electron-builder install-app-deps and again npm run dev, now the app works on macOS.

  2. I wanted to check if cross-platform builds worked too, so I did a npm run build:all to make all those builds, but the Windows build just doesn't work, I see no errors in the console but no events being triggered either.

I'm not sure what I'm doing wrong, the app is packaged via electron-builder.

@fabiospampinato
Copy link
Author

@smashwilson Hey Ash, sorry to bother you, but can you give me any pointers on how I could get this to work properly?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants