- Include the GTK plugin in the linuxdeploy call
- Update the README with the new requirements
- Eliminate the problems shown by lint in both files
# How to create AppImages for Geeqie
# How to create AppImages for Geeqie
-## Download the required tools:
+## Download the required tools
+
+Download the `linuxdeploy` tools. At the time of writing, these are:
-Download the `linuxdeploy` tool. At the time of writing, this is:
-wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
+wget -c https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
+chmod +x linuxdeploy-x86_64.AppImage
+wget -c https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh
+chmod +x linuxdeploy-plugin-gtk.sh
+sudo apt install patchelf
+sudo apt install librsvg2-dev
-Move this file to `$HOME/bin` or somewhere else in your `$PATH` and make executable.
+The first two of these files must be in your `$PATH` environment variable.
## Generate the executable
## Generate the executable
```
Download Geeqie sources:
```
Download Geeqie sources:
```sh
git clone git://www.geeqie.org/geeqie.git
cd geeqie
```
If a run has already been made, remove any existing targets:
```sh
git clone git://www.geeqie.org/geeqie.git
cd geeqie
```
If a run has already been made, remove any existing targets:
```sh
rm -r <target dir>/AppDir
sudo rm -rf doc/html
```
Create a fresh target directory:
```sh
rm -r <target dir>/AppDir
sudo rm -rf doc/html
```
Create a fresh target directory:
```sh
mkdir <target dir>/AppDir
```
Generate the Geeqie executable:
```sh
mkdir <target dir>/AppDir
```
Generate the Geeqie executable:
```sh
sudo make maintainer-clean
./autogen.sh --prefix="/usr/"
```sh
sudo make maintainer-clean
./autogen.sh --prefix="/usr/"
--appdir ./AppDir --output appimage \
--desktop-file ./AppDir/usr/share/applications/geeqie.desktop \
--icon-file ./AppDir/usr/share/pixmaps/geeqie.png \
--appdir ./AppDir --output appimage \
--desktop-file ./AppDir/usr/share/applications/geeqie.desktop \
--icon-file ./AppDir/usr/share/pixmaps/geeqie.png \
--executable ./AppDir/usr/bin/geeqie`
```
## Rename AppImage
--executable ./AppDir/usr/bin/geeqie`
```
## Rename AppImage
If required, rename the AppImage executable - e.g.:
If required, rename the AppImage executable - e.g.:
```sh
mv ./Geeqie-v1.6-x86_64.AppImage $(./Geeqie-v1.6-x86_64.AppImage -v | sed 's/git//' | sed 's/-.* /-/' | sed 's/ /-v/' | sed 's/-GTK3//').AppImage
```
## Automation script
```sh
mv ./Geeqie-v1.6-x86_64.AppImage $(./Geeqie-v1.6-x86_64.AppImage -v | sed 's/git//' | sed 's/-.* /-/' | sed 's/ /-v/' | sed 's/-GTK3//').AppImage
```
## Automation script
The script `./scripts/generate-appimage.sh` automates this process.
The script `./scripts/generate-appimage.sh` automates this process.
if [[ ! -f geeqie.spec.in ]] || [[ ! -d .git ]]
then
echo "This is not a Geeqie folder"
exit 1
fi
if [[ ! -f geeqie.spec.in ]] || [[ ! -d .git ]]
then
echo "This is not a Geeqie folder"
exit 1
fi
-target_dir=$(realpath "$1")
-
-if [[ $? -ne 0 ]]
+if ! target_dir=$(realpath "$1");
then
echo "No target dir specified"
exit 1
fi
rm -rf "$target_dir"/AppDir
then
echo "No target dir specified"
exit 1
fi
rm -rf "$target_dir"/AppDir
-mkdir "$target_dir"/AppDir
+mkdir "$target_dir"/AppDir || { echo "Cannot make $target_dir/AppDir"; exit 1; }
make -j
make install DESTDIR="$target_dir"/AppDir
make -j
make install DESTDIR="$target_dir"/AppDir
-export VERSION=$(git tag | tail -1)
+VERSION=$(git tag | tail -1)
+export VERSION
+cd "$target_dir" || { echo "Cannot cd to $target_dir"; exit 1; }
linuxdeploy-x86_64.AppImage \
--appdir ./AppDir --output appimage \
--desktop-file ./AppDir/usr/share/applications/geeqie.desktop \
--icon-file ./AppDir/usr/share/pixmaps/geeqie.png \
linuxdeploy-x86_64.AppImage \
--appdir ./AppDir --output appimage \
--desktop-file ./AppDir/usr/share/applications/geeqie.desktop \
--icon-file ./AppDir/usr/share/pixmaps/geeqie.png \
--executable ./AppDir/usr/bin/geeqie
--executable ./AppDir/usr/bin/geeqie
-mv "./Geeqie-$VERSION-x86_64.AppImage" "$(./Geeqie-$VERSION-x86_64.AppImage -v | sed 's/git//' | sed 's/-.* /-/' | sed 's/ /-v/' | sed 's/-GTK3//').AppImage"
+mv "./Geeqie-$VERSION-x86_64.AppImage" "$(./Geeqie-"$VERSION"-x86_64.AppImage -v | sed 's/git//' | sed 's/-.* /-/' | sed 's/ /-v/' | sed 's/-GTK3//').AppImage"