Alr2appimage 0.9.2 release

The first public version of alr2appimage has been released and included in the Alire index.

This is a tool to simplify to the minimum the creation of an AppImage executable from an Alire application crate.

These are all the steps you need to create the AppImage.

The first time, install using Alire 2.0 the utility (make sure that you have an updated version of the index):

alr install alr2appimage

Now enter your crate, make sure the first element in the executables field is the desired entrypoint of your application, and run the tool without arguments for a default generation.

cd your_crate
alr2appimage

The resulting AppImage will be written to the current directory.

More details in the repository: GitHub - mgrojo/alr2appimage: Tool for building an AppImage from an Alire crate

NOTE: alr2appimage is an independent project; it is not affiliated to, nor supported by, the Alire or AppImage projects.

5 Likes

This is really cool! I had no problems bundling up my existing project as an appimage.

How do I include static resources in the appimage bundle? For example, a read only sqlite database file.

1 Like

To include the resources, just add this section to your GPR file:

   package Install is
      for Artifacts (".") use ("share");
   end Install;

And include the resources in the repository in that directory, e.g. in share/.

The next step is referencing the resources from the application. My recommendation is using the resources crate. I’m doing this in alr2appimage itself for the default AppImage icon.

Another approach, if you don’t want to add another dependency, is doing the logic of getting the base directory of the executable by yourself. This is what I did for play_2048, before knowing about the resources crate.

1 Like