WebCord icon indicating copy to clipboard operation
WebCord copied to clipboard

Auto Update Feature

Open oxmc opened this issue 1 year ago • 5 comments

Description

I think having webcord auto update like the offical discord app does would be nice instead of having to download a new version each time, i'd be more than happy to help with this idea.

Suggestions

No response

Alternatives

No response

Additional Context

No response

oxmc avatar Nov 26 '23 05:11 oxmc

I mean, Discord kinda doesn't trully auto-update as well (at least on Linux), only a modules that it installs during update but the client stays intact.

As of Windows and macOS, Electron supports auto-updating these, but I guess in case of Windows my hate over Squirrel format won't make it happen (I'm not sure if NSIS supports auto-updates over Electron) and AFAIK macOS has also required the binary signing for auto-updates to be supported, so yeah… this is kinda problematic right now.

Also as of Linux, I thought of setting up the OBS (OpenSuse Build Service) in order to have some kind of CI to automatically build the binaries for multiple Linux distros. But right now I have no clue how to set it up, so it is still uncertain when and if that'll happen.

SpacingBat3 avatar Nov 26 '23 11:11 SpacingBat3

I have this inplace for my own app: image

I could modify it for your purpose and have it handle appimages and other stuff, and it can be contained in the update.ts file for the main logic.

oxmc avatar Nov 27 '23 17:11 oxmc

I could modify it for your purpose and have it handle appimages and other stuff, and it can be contained in the update.ts file for the main logic.

This logic is too simple for WebCord; with many platforms being available for the same platform or even distro, it is quite hard to handle updates like this, especially on Linux. Moreover, using sudo is a bad idea for GUI apps, I would preffer using Polkit for that and eventually fall back to other sollutions, maybe make a GUI to pass password to CLI, although I'm not sure about the security implications about storing passwords in JavaScript memory (given it is really hard to enforce a cleanup and zeroing of such data).

And as of Windows (Squirrel instalations), I don't really want to invest any time around implementing auto-updates, I'll drop Squirrel as soon as I start working on NSIS installers for Forge.

SpacingBat3 avatar Nov 27 '23 20:11 SpacingBat3

Also, I believe the support for auto-updates could be implemented in the AppImage maker directly, as AppImages are designed to hold an update information and official toolkit is also able to generate delta images based on old and new version of the package, allowing for updates without need of redownloading same data if it is similar between the binaries of different version.

SpacingBat3 avatar Nov 27 '23 20:11 SpacingBat3

Was not aware appimages could do that

oxmc avatar Nov 29 '23 19:11 oxmc