bithavoc / node-desktop-idle

Node/Electron module to detect idle desktop user (macOS, Windows, Linux, FreeBSD and OpenBSD)
MIT License
98 stars 28 forks source link

Packaging for Windows from Mac #5

Open soorajvnair opened 6 years ago

soorajvnair commented 6 years ago

Hey there,

Great work on the package. I used your native module on my Electron App and it works perfectly well during development, but as soon as i try to package your Native Module from a non target OS, i.e Packaging for Windows from a Mac machine. The resulting executable fails to run on Windows and shows the following error, the error varies according to the ASAR setting.

screen shot 2017-12-09 at 1 13 29 am

This is a well known issue amongst people who try to package for all platforms from a single platform. There are many hacks and solutions to make this work however, the most promising one is perhaps https://www.npmjs.com/package/prebuild which lets you generate prebuilt binaries for the different platforms. Will help a lot of folks like me.

Is this something you'll be looking into at some point or are you already working on it?

Thanks again.

bithavoc commented 6 years ago

@soorajvnair Hi. I can't say I have plans to offer pre-build binaries for this module, I use buddybuild to build the Mac app and CircleCI for the linux build. I haven't figure out how to do windows builds, but, we're already using appveyor for CI in this module and I'm considering getting an account to build my app.

Sorry 😞

soorajvnair commented 6 years ago

No worries @bithavoc thanks again for the great work. :)

digitalstaub commented 6 years ago

got it with: npm i git+https://github.com/CudoVentures/node-desktop-idle.git#prebuild

bithavoc commented 6 years ago

I'm re-opening this issue to keep track of this need, I should be able to setup CI to upload prebuild binaries. I need to read more about it.

digitalstaub commented 6 years ago

yasss! this package is great work and it should work out of the box for every build os.

i think it's nothing more than to merge and adjust the modifications in package json. then prebuild -all --upload <gh-token> on all os.

i can help with building on mac or linux if its needed.

timfish commented 6 years ago

This might be of use: https://github.com/MarshallOfSound/prebuild-this

ericwooley commented 3 years ago

I know this is old, but this might be a lot easier now with github actions supporting osx, linux, and windows builds. :man_shrugging: