##
Managing AppImage

A limitation of using AppImage instead of installing the binary or compiling from git, is that there is only a single file without the ability to browse the directory structure or to look for files to edit or check. So if using CINELERRA-GG leads to some errors, it is not possible to investigate and fix the problem. Which means if you want to add the most up-to-date Context-Help or want to introduce some custom presets, that can not be done.

Because the appimage file is nothing more than a compressed file containing the same structure as the installed program plus other libraries that allow the program to run independently from the system, the content can be extracted so that you can work on it as you would have on the normally installed program. To do this you will need the appimage management program. Many Linux distros come with this managment program by default, but others may not. For instance in the case of Arch Linux the appimagetool-bin package from AUR needs to be installed.

To work on the appimage, first unpack it using the command1 (note that you do not have to be root to do any of the following):

    	/{path to appimage}/CinGG-yyyymmdd.AppImage --appimage-extract

You will now have a squashfs-root folder in your current directory containing /usr/bin/ as well as other files and directories such as /usr/lib and /usr/share. Bin is the folder similar to the one installed with CINELERRA-GG and contains the files that you can work on. Now it is possible to make changes like adding a custom preset in /ffmpeg/video or replacing a library that no longer works with a more recent version by working in /squashfs-root/usr/lib.

To start the unpacked program from the bin folder use the command:

    	/{path to appimage}/squashfs-root/usr/bin/./cin

After making your changes, to get back to having an appimage file instead of having to run the program from the bin folder, you can take the extra step of recompressing the squashfs-root folder. To do so use linuxdeploy's appimage, a program that can also be useful for creating appimages from scratch (`https://github.com/linuxdeploy/linuxdeploy/releases/continuous`).

The steps to recreate the appimage are:

1. Copy the linuxdeploy appimage to /{path to appimage} and make sure it is executable.
2. Then use the command:

       		./linuxdeploy-x86_64.AppImage --appdir squashfs-root --output appimage

A new appimage will be created like the original but containing the changes.

Alternatively, download the appimagetool version from `https://github.com/AppImage/AppImageKit/releases` if available for your distro and use the command:

    	./appimagetool --comp /{path to appimage}/squashfs-root /tmpCinGG-yyyymmdd.AppImage

Now there will be an appimage called CinGG-yyyymmdd.AppImage with the changes that were made.

NOTE: for the bdwrite program which is used to create the udfs image to burn Blu-ray media (or any other standalone program), you will find it in the squashfs-root/usr/bin subdirectory. You only need to do the initial unpacking extract step and then just copy bdwrite and the entire squashfs-root/usr/lib directory to a convenient permanent place for usage. Then when running bdwrite, you will have to first export the libary path by typing this command in the window first:

    export LD_LIBRARY_PATH=/{put your copied usr/lib path here}:$LD_LIBRARY_PATH

#### Footnotes

... command 1
  Example provided by Glitterball3