Skip to content
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

Distribute binaries #174

Open
eelcocramer opened this issue Jan 26, 2018 · 9 comments
Open

Distribute binaries #174

eelcocramer opened this issue Jan 26, 2018 · 9 comments

Comments

@eelcocramer
Copy link
Owner

eelcocramer commented Jan 26, 2018

Currently to install this module you need a build environment present on the machine you want to install the module on.

It would be better and more user friendly to distribute the binaries that are build during automated builds.

See also:

#173

@wayofthefuture
Copy link

I understand this is to auto build binaries using "pre-build" but that doesn't seem realistic to me if it takes 1 hour to download the binaries. Is there any small version of the binaries? The visual studio library for windows is approx 500MB, is there another set of files we can use or a partial selection of files we could extract from visual studio to decrease the size of the download?

Then, at that point, we could implement something like above which would automate everything. I think first though, we would have to find an alternative source of a much smaller size. Thanks...

@eelcocramer
Copy link
Owner Author

The prebuild binaries are tiny compared to visual studio. You can check their size in the build folder after install. I think the suffix is ‘.node’

@wayofthefuture
Copy link

So I guess maybe if I can isolate these files, I could put a script in node "prebuild" to move them to the appropriate place before installing?

@eelcocramer
Copy link
Owner Author

Sort off. It just something that needs to be configured but its currently not on my priority list.

@wayofthefuture
Copy link

It seems that the large dependency is actually a dependency of Node-GYP, so there is really no way to pluck the small files for a build. I think at this point, I will have to locate the ".node" files and copy them into the repository. Then at that point, remove the node-gyp dependency and the build.

Obviously, I'd have to fork this repo and publish as something like: node-bluetooth-serial-port-windows, which would already be prebuilt for windows. This way, the dependency would install in seconds and wouldn't require such a huge download.

Do you see any problems with this? Would the ".node" file work on various Windows 10 computers, or would something as simple as a chipset difference break the build? Thanks...

@eelcocramer
Copy link
Owner Author

Sure, that would work but I see numerous problems.

First of all it is just annoying and error prone to have to manually do this every release. It is not the wayofthefuture :-) (pun intended)

But the real problem is thrust and accountability. When a continues integration script build and releases the binaries the binaries can be tracked to a specific commit and a build server like travis or appveyor acts like a trusted 3rd party that builds the binary on well monitored infrastructure. These parties make sure that the binaries are virus / malware free.

@eelcocramer
Copy link
Owner Author

By the way, the module does not have a dependency of node-gyp. It needs to be present to be able to build. It is present on the CI servers. The work that needs to be done is that the build servers push back the binary files to the repository so they can be included in the distribution package that is pushed to npm.

@wayofthefuture
Copy link

Do the CI servers have the ability to build Windows binaries which would then be compatible with Windows operating systems?

@eelcocramer
Copy link
Owner Author

Yes this is already done after each commit to this repository. All platforms are being build against a selected set of nodejs to check whether the commit introduced a build error. See also the images in the top of the readme.

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

No branches or pull requests

2 participants