Skip to content

Build a SUMO AppImage with linuxdeploy

This document explains how to package SUMO (Simulation of Urban Mobility) as an AppImage, after compiling it manually from source, using only linuxdeploy.


πŸ“‹ Prerequisites

Before creating the AppImage, make sure you have:

βœ… A working compiled SUMO, with all binaries available in a directory (e.g.: ~/git/sumo_snvc/bin).

βœ… The linuxdeploy tool installed (it’s an AppImage itself).

You can download and install it like this:

  • For x86
    wget -L https://github.com/linuxdeploy/linuxdeploy/releases/latest/download/linuxdeploy-x86_64.AppImage
    chmod +x linuxdeploy-x86_64.AppImage
    sudo mv linuxdeploy-x86_64.AppImage /usr/local/bin/linuxdeploy
    
  • For aarch64
    wget -L https://github.com/linuxdeploy/linuxdeploy/releases/latest/download/linuxdeploy-aarch64.AppImage
    chmod +x linuxdeploy-aarch64.AppImage
    sudo mv linuxdeploy-aarch64.AppImage /usr/local/bin/linuxdeploy
    

πŸ—‚οΈ Prepare a working directory

Create a directory where you will build the AppImage:

mkdir sumo-appdir
cd sumo-appdir

Inside this directory we will set up the AppDir structure required by AppImage.


πŸ”¨ Create the AppDir and copy files

1️⃣ Create the AppDir structure:

mkdir -p AppDir/usr/bin

2️⃣ Copy SUMO binaries:

  • If you use our Repository:
    cp ~/git/sumo_snvc/bin/* AppDir/usr/bin/
    
  • If you installed other: Find the binaries and copy them in the same directory as before
    which sumo
    which sumo-gui
    which netedit
    

3️⃣ Copy your custom AppRun:

Can be find here

cp ../assets/AppRun AppDir/
chmod +x AppDir/AppRun

πŸ“ Add required files

sumo.desktop

Create the file AppDir/sumo.desktop with the following content:

[Desktop Entry]
Type=Application
Name=SUMO
Exec=sumo
Icon=sumo
Comment=Simulation of Urban Mobility
Categories=Education

This configures the launcher to run sumo by default.

You can also use the file provided in the assets folder.

Icon

Place an icon PNG file as AppDir/sumo.png (preferably a 256x256 PNG). You can use SUMO’s official logo or copy the provided SUMO Logo


πŸš€ Build the AppImage

Once your AppDir contains usr/bin, the .desktop file, and the icon, run:

linuxdeploy --appdir AppDir \
            --output appimage

This command will:

  • Scan AppDir/usr/bin for binaries.
  • Collect and include any shared library dependencies.
  • Generate the SUMO-x86_64.AppImage or SUMO-aarch64.AppImage in the current directory.

πŸ“‚ Run the AppImage

Make it executable:

chmod +x SUMO-x86_64.AppImage

Run the default binary

If you simply execute:

./SUMO-x86_64.AppImage

the default binary defined in your AppRun will run.

Run any SUMO binary

Your custom AppRun script is designed to allow running any of the included SUMO binaries. You can specify the binary name as the first argument. For example:

./SUMO-x86_64.AppImage sumo
./SUMO-x86_64.AppImage sumo-gui
./SUMO-x86_64.AppImage netedit

Any additional arguments are passed through to the binary:

./SUMO-x86_64.AppImage sumo --help
./SUMO-x86_64.AppImage netconvert -c netconfig.netccfg

βœ… Notes

  • The AppRun script dynamically executes the requested binary from usr/bin inside the AppImage.
  • The .desktop file is used for desktop integration and will launch the default GUI binary if used in a desktop environment.
  • If no argument is given, AppRun defaults to sumo (if implemented that way).