-
Notifications
You must be signed in to change notification settings - Fork 63
Upgrade js-ipfsd-ctl to use bin-wrapper #78
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
Comments
What were the issues with Electron? |
@haadcode we were still working on how to get the right binary on Windows, once the electron app got 'packaged' |
Not only windows, any other OS than the one the packaging happens on. It is not entirely clear if this will solve all our issues, but most importantly I think these changes actually need to happen in https://github.com/ipfs/npm-go-ipfs |
Am I understanding this correctly: the problem is that when packaging, only the package for the platform you're packaging on gets pulled in? |
On that note, I've been wanting a local cache for the downloaded go-ipfs binary for a long time, so that the package doesn't get downloaded every time. |
@dignifiedquire I would even argue that npm-go-ipfs, go-ipfs-dep and js-ipfsd-ctl could all be just one module with binwrapper |
This required go-ipfs 0.4.3 to be released (Jun 29) and available through |
If I understand bi-wrapper correctly, it'll download the correct bin at runtime (if needed, I suppose there's some caching happening), is that correct? If so, would we use it to package different (platform) versions of js-ipfs-ctl or would it work so that in my program, I require js-ipfs-ctl which in turn would download the correct go-ipfs version at runtime? My main concern here is that if bin-wrapper requires programs to download the correct bin at runtime (as opposed to build time), that'll be a horrible solution for a lot of offline first programs. And in my book, that's an absolute no go. If it doesn't work as described above, or bin-wrapper downloads the bins at build time, then we're fine. Can someone clarify? @diasdavid @dignifiedquire @kenshyx |
Using |
Ok, got it. This answers my questions re. how bin-wrapper works.
Not sure what you mean here. The question of how it'll work with js-ipfsd-ctl is still open. Would a program that uses js-ipfsd-ctl need an internet connection to download ipfs binary before it can work/run? |
Ok, had a call with @dignifiedquire and my questions got answered. Basically, bin-wrapper will allow us to have the same build/workflow as now. If it becomes a problem for users to figure out the packaging (mainly w/ Electron), we'll address that in the build tools (eg. Gulp, Grunt). All good, SGTM! |
@JGAntunes is working on getting this migrated to bin-wrapper :) |
-> Follow on here #89 |
It is critical that everything required to run should be downloaded on (Run it on install if you have to.)
|
This is exactly why I started this issue. As far as I understand, that should be the case. I was assured of that. @diasdavid @dignifiedquire can you, once more, confirm this just to make sure we're all on the same page and those with concerns re. this can chill back? :) |
It is up to the user, but just to clarify
So, for e.g: in a traditional Mac OS X app install, a user would get the .dmg, drag the .app, click the .app, it would open the first time dialog screen (traditionally the install/first time configure) and when that is happening, it is downloading the binary for the arch. This is what you get out of the box ^^ However, It doesn't stop you from creating several bundles with the different ipfs bin. |
|
@diasdavid @jbenet we can create a postinstall script which will run right after npm install and will download the respective binary. |
Great, let's do that. (I believe it's how it works now). Thank you.
|
This is no longer required with the updated https://github.com/ipfs/npm-go-ipfs-dep |
Our friends from Akasha made a great wrapper around the IPFS binary (https://github.com/AkashaProject/ipfs-connector/blob/master/src/IpfsBin.ts) that is way more portable when our current approach in js-ipfsd-ctl.
It uses https://www.npmjs.com/package/bin-wrapper which enables the app to select the binary for the right arch seamlessly (a issue we were hitting on electron).
Let's move to the bin-wrapper approach :)
The text was updated successfully, but these errors were encountered: