Create your own portable AppImage applications with AppImageTool!

AppImageTool: How to build our own AppImage apps?

AppImageTool: How to build our own AppImage apps?

La Fragmentation or abundance of alternatives in Linux is always something relevant, positive or not, in the Linux Community. For this reason, we are always immersed, both as content creators/consumers and as professional or non-professional users, in the multiple news, developments and events related to the many GNU/Linux Distributions, Applications, Systems, Platforms and more. And of course also, in the many Quick Guides and Complete tutorials possible to learn or solve problems and needs.

For this reason, and thinking about both things, today we bring you a very useful Quick guide to creating our own AppImage apps using another additional tool called «AppImageTool». Which is an alternative or complementary software utility to Pkg2AppImage, which in a previous publication we also taught how to use to achieve the same objective. Since, when we talk about universal and portable applications, among Flatpak, Snap y AppImage, many of us tend to prefer this last format, and even more so if we can easily and quickly create the necessary portable applications and games ourselves, from the existing source and binary files of already existing developments.

Pkg2appimage: How to build our own AppImage files?

Pkg2appimage: How to build our own AppImage files?

But, before starting to read this publication about the useful and complementary application of the AppImage project called «AppImageTool», we recommend the previous related post with the similar app previously mentioned and addressed:

Pkg2appimage: How to build our own AppImage files?
Related article:
Pkg2appimage: How to build our own AppImage files?

Create your own portable AppImage applications with AppImageTool!

AppImageTool: How to build our own AppImage apps?

What is AppImageTool?

According to its own developers of the AppImage Project in their Official website, the “AppImageTool” application It is briefly described as follows:

AppImageTool is a tool that allows you to generate AppImage files. An AppImage is a self-executing package that contains an application and everything it needs for a successful execution, so that if they are not in the operating system where they will be executed, then there are no problems. This may include library files that are not typically available on target systems, resources such as translations, icons, fonts, and other auxiliary files (dependencies).

AppImageTool makes it easy to grab an AppDir - LinuxDeployQt

In short, AppImageTool makes it easy to grab an AppDir (Normalized structure of an application) in the style of LinuxDeployQt, to convert it to an AppImage application.

This Linux deployment tool takes an application as input and makes it self-contained by copying the resources that the application uses (such as libraries, graphics, and plugins) into a package. The resulting package can be distributed as AppDir or AppImage to users, or placed in cross-distribution packages. About LinuxDeployQt on GitHub

Steps to create an AppImage application

For our quick guide today, we will use the game Urban Horror 4 to learn how to convert an application with executable binaries and all its associated packaging into a Universal and portable application with the AppImage format using AppImageTool.

And the necessary steps are as follows:

  • Download the AppImageTool application: Straight from your official website on GitHub. And for this, we have downloaded the AppImage executable on your latest stable version available in the appropriate architecture of our operating system and computer, whose name is appimagetool-x86_64.AppImage. And then, in the usual way, CLI or GUI, we have given it execution permission.
  • Download the application to convert: In our case, as we already expressed, we download the latest available version of the game Urban Horror 4, which name is UrbanTerror434_full.zip. And then, we proceed to unzip the file to obtain the folder named UrbanTerror43.
  • Suitability of the application directory to convert: In the case of Urban Terror 4, before executing the conversion process we have deleted those files that we consider unnecessary, which correspond to the binaries included for Windows, the i386 architecture and its Server mode. That is, we only leave the executable for the x86_64 architecture originally called Quake3-UrT.x86_64, and which we have renamed simply as UrT4. Note: For each application it may be necessary to delete different files or none at all. Or move, create or add some.
  • Creating files needed for conversion: To successfully carry out the conversion we must create and have at least 3 files that correspond to:

Required files

Un AppRun file whose content is:

#!/bin/bash

cd "$(dirname "$0")"
exec ./UrT4

Un .desktop file whose content is:

[Desktop Entry]
Type=Application
Exec=AppRun
Icon=UrT4
Name=Urban Terror 4
Terminal=false
StartupNotify=true
Comment=Juego FPS UrT4
Categories=Game;

Lastly, an image file corresponding to the application icon and the future AppImage file. Which in our practical case today, we will call UrT4.png.

And after we have everything in order and ready, we proceed to execute our conversion command order, as indicated on the official website: ./appimagetool-x86_64.AppImage AppDir. However, in the case of our application it is necessary to add the following prefix: ARCH=x86_64. So, our final command order was as follows:

ARCH=x86_64 ./appimagetool-x86_64.AppImage UrbanTerror43

And if we have done everything carefully and successfully, we will have our application called ready. Urban_Terror_4-x86_64.AppImage located in the same folder where we are working on the conversion, for example: Downloads. As shown in the following screenshots:

Steps to create an AppImage application - 01

Steps to create an AppImage application - 02

AppImagePool: A simple and efficient client for AppImageHub
Related article:
AppImagePool: A simple and efficient client for AppImageHub

Summary image for post 2024

Summary

In summary, "AppImageTool" next to Pkg2AppImage, are without a doubt, 2 very useful and versatile software tools that anyone could use on their current GNU/Linux Distro, to learn how to create and enjoy their own portable applications in the AppImage format. However, In the future, it would be great to have a desktop application, that is, graphical (with a visual interface), which automates and facilitates this process even more. Therefore, if you have already used any of these 2 or other similar ones with the same purpose before, we invite you via comment to tell us about your experience with them, for the benefit of everyone and the creation of a future publication about the possible new ones mentioned.

Lastly, remember visit our «homepage» in Spanish. Or, in any other language (just by adding 2 letters to the end of our current URL, for example: ar, de, en, fr, ja, pt and ru, among many others) to find out more current content. Additionally, we invite you to join our official telegram channel to read and share more news, guides and tutorials from our website. And also, the next Alternative Telegram channel to learn more about the Linuxverse in general.