AppImageCommunity / AppImageUpdate

AppImageUpdate lets you update AppImages in a decentral way using information embedded in the AppImage itself.
https://appimage.org
MIT License
585 stars 57 forks source link
appimage applications delta delta-updates deployment linux linux-app packaging update updater

AppImageUpdate Build Status

AppImageUpdate lets you update AppImages in a decentral way using information embedded in the AppImage itself. No central repository is involved. This enables upstream application projects to release AppImages that can be updated easily. Since AppImageKit uses delta updates, the downloads are very small and efficient.

This is an implementation of AppImageUpdate in modern C++ (C++11, to be precise).

This is beta-level code. It works, and most features available work fine. However, in this state, there is not much real world experience with the application. Please report any issues on the bug tracker.

Try it out

Notice how quick the update was. Combined with fully automated continuous or nightly builds, this should make software "fluid", as users can get the latest development versions very rapidly.

If you have the optional appimaged daemon installed, then it can use AppImageUpdate enable right-click updates in the launcher:

screenshot from 2016-10-15 16-37-05

Components

Motivation

Use cases

Here are some concrete use cases for AppImageUpdate:

The problem space

With AppImages allowing upstream software developers to publish applications directly to end users, we need a way to easily update these applications. While we could accomplish this by putting AppImages into traditional deb and rpm packages and setting up a repository for these, this would have several disadvantages:

AppImageUpdate to the rescue.

Objectives

AppImageUpdate has been created with specific objectives in mind.

  1. Be Simple. Like using AppImages, updating them should be really easy. Also updates should be easy to understand, create, and manage.
  2. Be decentral. Do not rely on central repositories or distributions. While you can use repositories like Bintray with AppImageUpdate, this is purely optional. As long as your webserver supports range requests, you can host your updates entirely yourself.
  3. Be Fast. Increase velocity by making software updates really fast. This means using delta updates, and allow leveraging existing content delivery networks (CDNs).
  4. Be extensible. Allow for other transport and distribution mechanisms (like peer-to-peer) in the future.
  5. Inherit the intensions of the AppImage format.

Update information overview

In order for AppImageUpdate to do its magic, Update information must be embedded inside the AppImage. Update information is what tells AppImageUpdate vital data such as:

While all of this information could simply be put inside the AppImage, this could be a bit inconvenient since that would mean changing the download server location would require the AppImage to be re-created. Hence, this information is not put into the file system inside the AppImage, but rather embedded into the AppImage in a way that makes it very easy to change this information should it be required, e.g., if you put the files onto a different download server. As you will probably know, an AppImage is both an ISO 9660 file (that you can mount and examine) and an ELF executable (that you can execute). We are using the ISO 9660 Volume Descriptor #1 field "Application Used" to store this information.

Projects using AppImageUpdate

Building

You should be able to add this repository (with this branch) as a submodule in your own repository. When using CMake, call add_subdirectory() on the submodule path. The header directories should then be added globally. All you need to do is link your application against libappimageupdate. For example by calling target_link_libraries(mytarget libappimageupdate).

Note that as mentioned previously, this project uses C++11. However, care has been taken to make public headers work in older versions of C++ as well. Therefore, it should not be necessary to set CMAKE_CXX_STANDARD, -std=c++11 etc. in projects using this library. If you notice that this stops working, please open an issue.

Licensing

For details on the licensing of the libraries AppImageUpdate uses, please see their documentation.

The code of AppImageUpdate is licensed under the terms of the MIT license. Please see LICENSE.txt for details.

The sample AppImageUpdate GUI is based in part on the work of the FLTK project (http://www.fltk.org). We are interested in adding Qt and Gtk+ versions.

TODO

Contact

If you have questions, the developers are on #AppImage on irc.libera.chat.