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.
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)
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?
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.
@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 -> https://github.com/antony-jr/AppImageUpdaterBridge/issues/7#issuecomment-438256103



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.
That looks very nice.
I think we should implement this, @anthonybilinski do you agree?
You can take a look at my implementation done in my fork -> https://github.com/antony-jr/qTox/tree/appimage-self-update
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.
@antony-jr thanks for reminding me about this one. Yes, it would be very nice if you could implement this for qTox.
The only things that should be noted are:
updates should be optional, so no pop-up on every start of qTox telling you to update, there might be reasons why one would use an older version
How about creating a check for updates button under version under settings ?
the build should not rely on prebuilt binaries from another repository, so please implement the built process in a way that supports this
Its only an option to use prebuilt ones , By default it is always recommended to do the traditional way.
Okay , I will be working on this.
How about creating a check for updates button under version under settings ?
Code for an automatic update check should already be in place thanks to @anthonybilinski
You would only need to implement the actual downloading and updating.
Its only an option to use prebuilt ones , By default it is always recommended to do the traditional way.
Ok, that's great.
https://github.com/qTox/qTox/blob/74828c92e55f40ef22bf02e7440f31896fcea375/appimage/build.sh#L142-L143
@sudden6 in the above line , Why do you pass -DUPDATE_CHECK to AppImageKit cmake file.
Note here that qTox cmake is given here ,
https://github.com/qTox/qTox/blob/74828c92e55f40ef22bf02e7440f31896fcea375/appimage/build.sh#L107
If I'm correct , then -DUPDATE_CHECK should be given in the above line. Then why do you give that to AppImageKit cmake ? Is this a mistake or intentional ?
Also from travis-ci ,

@antony-jr I guess it's a mistake, you can post a PR with the fix and maybe try to find out who commited that using git blame and ping them in that PR to ask if that's correct.
added in https://github.com/qTox/qTox/commit/6c9d7b59c12a6fc79fc457f22e84060a9bcde940 by @anthonybilinski , Anyhow , I'm gonna assume its a mistake and fix it as I go.
@sudden6 Finally built an AppImage from the PR(#5690). Here is the AppImage -> https://transfer.sh/GOKvV/qTox-x86_64.AppImage , The link is only valid for 14 days.
Here is how it looks , I used a local server with serveo.net to test the update.




Note: My internet speed is not 37 MiB per second , at this stage the updater uses the local data available in existing binary. (Typically 95% of the old AppImage is usable , this is because you repack Qt libs on every AppImage release so with zsync algorithm the user only donwloads the actual changes)

ping. Any progress?
This would be very useful indeed. I second this :+1:
This would be very useful indeed. I second this +1
@probonopd The PR is already in place but I think they need to check the update process thoroughly and confirm that it is not leaking any crucial information and it is indeed secure or else this will defeat the purpose of the Tox protocol.
Closed by #5747