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

A(n) (Auto) Updater for Linux (AppImages) using delta update #5643

Open
antony-jr opened this issue May 3, 2019 · 6 comments

Comments

Projects
None yet
2 participants
@antony-jr
Copy link

commented May 3, 2019

Brief Description

Currently auto updater is only available for windows but not for Linux , specifically qTox AppImages does not support update. But AppImage does support updating officially using zsync's algorithm. Zsync algorithm is used to do the delta update , the entire update only depends on github releases or a simple http server with http range requests.

So I think it would be nice if qTox implements an auto update for AppImage releases.

I would be happy to work on this if you would like that.

Additional Information

AppImage update can be implemented using AppImageUpdaterBridge (written in C++ using Qt5 which only depends on Qt base) (Made by me) or you could use the official AppImage update library also written in C++ but does not depend on Qt so it uses curl and other stuff for networking.

I highly recommend using my library since it only depends on Qt and thus does not add extra dependency for your application. The official documentation is here

For a reference you can take a look at this application which uses AppImageUpdaterBridge to do the delta update for the appimage -> https://gitlab.com/technic93/e2designer/-/jobs/202568868/artifacts/raw/build/e2designer-v0.1-365-g80ca747-x86_64.AppImage (To start the updater , Help -> Check for update)

@sudden6

This comment has been minimized.

Copy link
Member

commented May 6, 2019

Hi,

I read through your proposal and took a look at the library you linked, both look very interesting.
A few questions:

  • You seem to re-implement the zsync algorithm in your library, why?
  • Does your library support using proxies for the download?

@sudden6 sudden6 added the I-packaging label May 6, 2019

@antony-jr

This comment has been minimized.

Copy link
Author

commented May 7, 2019

You seem to re-implement the zsync algorithm in your library, why?

Because the zsync algorithm is old and the sources are also old(It was programed in C with hard coded http client). It also did not have support for modern http servers like what github uses. Mainly I wanted to re-implement it in C++ and Qt to make it more maintainable and portable , this library was specially created for Qt Applications. Unlike the official library and old sources , this library respects the Qt Event Loop. Therefore using this library will not break anything and does not add any other issues..

Does your library support using proxies for the download

Yes it does. You have to pass a QNetworkProxy to AppImageDeltaRevisioner or you can set application wide proxy using QNetworkProxy::setApplicationProxy(proxy);. This is the other reason for re-implementing the zsync algorithm since it did not support proxies. (The official library does not support proxies too. for now , even if it does , it will not be implement it in Qt)

Head to this link for example.

@antony-jr

This comment has been minimized.

Copy link
Author

commented May 7, 2019

@sudden6 Here is how the update should look like...

EDIT: AppImageUpdater can be used without re-compiling from source. Using qt plugin you can do this by just adding the plugin and repacking it with appimagetool. Here is a small hint on how to do it -> antony-jr/AppImageUpdaterBridge#7 (comment)

Screenshot_20190507_152709

Screenshot_20190507_152720

Screenshot_20190507_153207

Usually the update uses most of the required data from the old appimage but in this case , My new AppImage has new version of Qt , so the updater has to download that deltas too.

@probonopd probonopd referenced this issue May 11, 2019

Closed

Plugin Support #7

@sudden6

This comment has been minimized.

Copy link
Member

commented May 12, 2019

That looks very nice.

I think we should implement this, @anthonybilinski do you agree?

@sudden6 sudden6 added the proposal label May 12, 2019

@antony-jr

This comment has been minimized.

Copy link
Author

commented May 12, 2019

You can take a look at my implementation done in my fork -> https://github.com/antony-jr/qTox/tree/appimage-self-update

@antony-jr

This comment has been minimized.

Copy link
Author

commented May 26, 2019

any updates ? I can work on this if you could point me on how you want this to be implemented ? Its a pain in the neck to download qTox AppImage from github every time a new version of qTox comes out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.