hundredrabbits / Dotgrid

Minimalist Vector Tool
https://hundredrabbits.itch.io/dotgrid
Other
1.04k stars 75 forks source link

Check for updates/update binary in app #29

Closed rickycodes closed 6 years ago

rickycodes commented 6 years ago

re: https://twitter.com/rickycodes/status/974385695501496322

rickycodes commented 6 years ago

Again, this is a feature I could spike if you're interested

neauoire commented 6 years ago

I would love this! and if you could have a look at the /lib folder. These files are shared among Left and Marabu. If you can possibly make it a single standalone file, I will bring it across all the ecosystem! 👍

rickycodes commented 6 years ago

I'll take a look at how Hyper, Brave and others are doing this and see how easy it'll be to bring over

I'll def keep it isolated (as you mentioned) so it'll be easy to have an additional menuItem you can drop into "all the things"

(there may even be a module that exists to do this already)

rickycodes commented 6 years ago

@neauoire so, this is a bit more involved than I previously thought!...

There is an autoUpdater in Electron: https://github.com/electron/electron/blob/master/docs/api/auto-updater.md

and here's a detailed guide

It looks like there are a couple ways to go about this, but the TL;DR is that we'd have to leverage GitHub releases.

You can a) use an update server (Hyper uses Hazel, for example)

Or b) use electron-builder to package your app, which has electron-updater which has its own autoUpdater which doesn't require a dedicated update server (I'd recommend this, assuming you're cool with changing how you package the app, or maybe you're already using this?)

Let me know and I'll tinker around with whichever option makes the most sense

neauoire commented 6 years ago

With the Live version, I think this is less necessary.