{"id":13804673,"url":"https://github.com/mgrojo/alr2appimage","last_synced_at":"2025-07-13T01:06:19.039Z","repository":{"id":223192892,"uuid":"692520491","full_name":"mgrojo/alr2appimage","owner":"mgrojo","description":"Tool for building an AppImage from an Alire crate","archived":false,"fork":false,"pushed_at":"2024-04-06T22:50:20.000Z","size":110,"stargazers_count":13,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-27T05:25:38.949Z","etag":null,"topics":["ada","alire","appimage","linux","packaging"],"latest_commit_sha":null,"homepage":"","language":"Ada","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mgrojo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-16T18:22:53.000Z","updated_at":"2025-01-10T19:42:14.000Z","dependencies_parsed_at":"2024-08-04T01:14:01.050Z","dependency_job_id":null,"html_url":"https://github.com/mgrojo/alr2appimage","commit_stats":null,"previous_names":["mgrojo/alr-appimage"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgrojo%2Falr2appimage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgrojo%2Falr2appimage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgrojo%2Falr2appimage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgrojo%2Falr2appimage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mgrojo","download_url":"https://codeload.github.com/mgrojo/alr2appimage/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243806035,"owners_count":20350775,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ada","alire","appimage","linux","packaging"],"created_at":"2024-08-04T01:00:52.397Z","updated_at":"2025-07-13T01:06:19.031Z","avatar_url":"https://github.com/mgrojo.png","language":"Ada","funding_links":[],"categories":["Deployment"],"sub_categories":["Build and Package"],"readme":"[![Build](https://github.com/mgrojo/alr2appimage/actions/workflows/main.yml/badge.svg)](https://github.com/mgrojo/alr2appimage/actions/workflows/main.yml)\n[![Alire](https://img.shields.io/endpoint?url=https://alire.ada.dev/badges/alr2appimage.json)](https://alire.ada.dev/crates/alr2appimage.html)\n[![Alire CI/CD](https://img.shields.io/endpoint?url=https://alire-crate-ci.ada.dev/badges/alr2appimage.json)](https://alire-crate-ci.ada.dev/crates/alr2appimage.html)\n[![Download][download-img]][download]\n[![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/ada-lang/Lobby)\n[![Mentioned in Awesome Ada](https://awesome.re/mentioned-badge.svg)](https://github.com/ohenley/awesome-ada)\n\n  [download-img]: https://img.shields.io/github/downloads/mgrojo/alr2appimage/total.svg\n  [download]: https://github.com/mgrojo/alr2appimage/releases\n  \n![Alr2AppImage](https://raw.githubusercontent.com/mgrojo/alr2appimage/master/share/alr2appimage/alr2appimage.png \"alr2appimage icon\")\n\n# alr2appimage\n\n`alr2appimage` is a tool to automatically create an\n[AppImage](https://appimage.org/) executable from an Alire crate.\n\n\u003e [!NOTE]\n\u003e `alr2appimage` is an independent project; it is not\n\u003e affiliated to, nor supported by, the Alire or AppImage projects.\n\n# How to use the tool\n\nThere are two prerequisites for your project to work with this tool:\n- It has to be a crate with an `executables` field. Its first value\n  has to be the main application program. Alternatively, you can\n  provide a value in the command line.\n- It must be installable using Alire or `gprinstall`, including all the\n  needed resources.\n\n\n`alr2appimage` will use the following command for installing it (this requires Alire 2.0):\n```shell\nalr install\n```\nOr it will run `gprinstall` inside `alr exec`, if the former fails (Alire 1.x).\n\nIf you simply run the tool inside an Alire crate, it will read the\nmetadata from your `alire.toml` file and create a default AppImage\nfrom it.\n\nThe utility [linuxdeploy](https://github.com/linuxdeploy/linuxdeploy)\nis automatically downloaded using `curl` or `wget` tools. If you\ncannot install one of these utilities or lack an Internet connection in the\nhost, just put a copy of the `linuxdeploy-your_arch.AppImage` in the\ncrate directory, and it will be used by `alr2appimage`.\n\nThis tool will generate a valid [Destop Entry](https://specifications.freedesktop.org/desktop-entry-spec/latest/)\nfor the AppImage. The following metadata will be read from your\n`alire.toml` for the generation, and will be matched to the equivalent\nfield of the `your_crate.desktop` file:\n\n| Alire         | Desktop    | Comment                                                                                                                                                                                                                               |\n|---------------|------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name`        | `Name`     | It will also be the base name of your AppImage file.                                                                                                                                                                                  |\n| `description` | `Comment`  |                                                                                                                                                                                                                                       |\n| `tags`        | `Keywords` | Additionally, any of the tags matching (case-insensitively) one of the main categories in the [freedesktop.org menu specification](https://specifications.freedesktop.org/menu-spec/menu-spec-1.0.html) will be used as `Categories`. |\n| `executables` | `Exec`     | The first executable is used as entrypoint of the AppImage. It can be orverriden using the `--executable your-executable-file` argument.                                                                                              |\n|               | `Terminal` | This field of the desktop entry will be set to `false` by default. It can be set to `true` passing the `--terminal` argument.                                                                                                         |\n|               | `Type`     | This field of the desktop entry will be set to `Application`.                                                                                                                                                                         |\n|               | `Icon`     | By default, the included icon (`alr2appimage.png`) will be used. It can be orverriden using the `--icon your-icon-file` argument.                                                                                                     |\n\n## Including resources\nIf your crate has resources, the fist step is to just include this section to your GPR file:\n```ada\n   package Install is\n      for Artifacts (\".\") use (\"share\");\n   end Install;\n```\nAnd add the resource files in the repository in that directory, e.g. in `share/`.\n\nThe next step is referencing the resources from the application.  it\nis recommended to use the\n[resources crate](https://github.com/alire-project/resources),\nor a similar mechanism, to properly load the resource files from the installation\nprefix.  `alr2appimage` is doing this for the default AppImage icon.\n\nAnother approach, if you don't want to add another dependency, is\ndoing the logic of getting the base directory of the executable by\nyourself. This is an example of how to do this, assuming it's running\nunder Linux and the executable is located under `\u003cprefix\u003e/bin/`.\n\n```ada\n   function Application_Prefix return String is\n      Self_Exe : constant String := \"/proc/self/exe\";\n   begin\n      -- Get the resources path through the directory where the program is\n      -- located.\n      -- In this way we allow running from an AppImage and still find the\n      -- resource files.\n      --\n      if Ada.Directories.Exists (Self_Exe) then\n         return Ada.Directories.Containing_Directory\n           (Ada.Directories.Containing_Directory\n              (Ada.Directories.Full_Name (Self_Exe)));\n      else\n         return \"\";\n      end if;\n   end Application_Prefix;\n```\n\n# Usage\n```\nUsage: alr2appimage [OPTIONS]...\nMakes an AppImage from your Alire crate.\n\n  -h, --help       Display this help text.\n  -V, --version    Display the version of this utility.\n  -t, --terminal   Set the Terminal flag of the AppImage to true, i.e. the application is for the terminal or requires to be run from a terminal.\n  -i, --icon       Specify the icon file for the AppImage\n  -e, --executable Specify the executable for the AppImage (without path)\n  -u, --use-version \n                   Use the crate version specified in the alire.toml for the AppImage\n```\n\nRun inside an Alire crate to create a default AppImage of your\napplication.  With the corresponding arguments, you can override the\nexecutable, provide your own icon and override the default value\n(false) for the terminal field.\n\n# Using al2appimage from a GitHub Action\nYou can easily invoke `al2appimage` from a GitHub Action using [alr2appimage-action](https://github.com/mgrojo/alr2appimage-action)\n\n# Status\nThe tool is considered complete, although it could be developed further.\n\nThe following feature could be implemented in the future, if deemed\nuseful for the users:\n- Not implemented yet: If the defaults are not good for your\n  project, you can also define a template for your desktop file, and\n  only the fields that you want will be included from the `alire.toml`\n  or initialized by this utility.\n\n# Building\nCan be built and installed after cloning the repository using Alire.\n\nYou can also download an AppImage from the releases section or use\n`alr install alr2appimage` to install the utility from the Alire index.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgrojo%2Falr2appimage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmgrojo%2Falr2appimage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgrojo%2Falr2appimage/lists"}