retrohacker / peerweb

Welcome to the Decentralized Web
http://will.blankenship.io/peerweb
MIT License
118 stars 9 forks source link

Package peerweb for distribution #7

Open retrohacker opened 8 years ago

retrohacker commented 8 years ago
phoenix1796 commented 8 years ago

You could use the protocols option in electron packager as can be seen below (instead of passing register-standard-schemes) https://github.com/renarsvilnis/lol-build-manager-electron-app/blob/master/gulpfile.js#l266-l271 (haven't tested it yet but , will try it out tomorrow) Above link was found at :https://discuss.atom.io/t/custom-url-scheme/19811/5

retrohacker commented 8 years ago

Oh, that is huge! If that works, it will solve bundling. We can distribute binaries for the alpha :smile:

phoenix1796 commented 8 years ago

registerFileProtocol(config.protocol, peerProtocolHandler, function registeredProtocol(e) { return cb(e) // Don't treat our new protocol like http electron.registerStandardSchemes([config.protocol]) // Done setting up our new protocol return cb() }) Hey , I wanted to point out a couple of things , :smile: In the code above , why are you unconditionally returning even when e is null (when the file protocol has been registered successfully) As can be seen below it gives a null(in var e) when it is successful and an error otherwise https://github.com/electron/electron/blob/master/docs/api/protocol.md#protocolregisterfileprotocolscheme-handler-completion So , why not just make the return conditional and then the electron.registerStandardSchemes([config.protocol]) will work just like the --register-standard-scheme option. P.S. it should be electron.protocol.registerStandardSchemes (as electron.registerStandardSchemes doesn't exist) Checkout my fork (already updated the code there , but couldn't send a pull request as the previous one is still open.) https://github.com/phoenix1796/peerweb

retrohacker commented 8 years ago

Hey @phoenix1796,

Yes, that is a typo and a bug. registerStandardSchemes doesn't register soon enough for electron to commit the scheme with libchromiumcontent, I believe a patch has been landed in electron but I'm unsure if it has shipped yet: https://github.com/electron/electron/issues/5303

phoenix1796 commented 8 years ago

I hosted the peerweb browser site locally and tested the code ,it works good ,also I packaged and tried out the app and it works good without the commandline option , So my guess is that they fixed it.

phoenix1796 commented 8 years ago

Setting up gulp tasks for packaging in Linux, win, Mac, will be syncing when they are Complete (soon)

retrohacker commented 8 years ago

Awesome! Thanks :smile:

Might be able to borrow some of the work from here? https://github.com/retrohacker/peerweb/blob/master/tests/build.js

retrohacker commented 8 years ago

I cleaned up everything necessary for the alpha tonight with the exception of #27 (PR open, waiting for validation) and #14, which I'm unsure how to accomplish in Electron.

Once we have packaging together, we should be good to carry this into a alpha :smile:

retrohacker commented 8 years ago

Sorry, meant alpha, not beta. The feature requests need to land for the beta.

retrohacker commented 7 years ago

From #22

Current status of this:

TravisCI does work for this. I've successfully tested and built binaries there. The problem is we need to do osx code signing, which requires we build on mac. From my understanding on TravisCI, that means we need to build all of the binaries on osx when the tests pass, which requires wine for cross compiling. Wine can be installed via brew, but takes forever and causes the build to timeout.

Looking for other solutions now, including plugging a macbook into my router and doing CI/CD from there.