2 #**********************************************************************
3 # Copyright (C) 2022 - The Geeqie Team
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License along
18 # with this program; if not, write to the Free Software Foundation, Inc.,
19 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 #**********************************************************************
23 ## @brief Generate a Geeqie AppImage.
25 ## It must be run from the base Geeqie folder.
26 ## The single parameter is the directory where the AppDir
32 linuxdeploy-x86_64.AppImage \
33 --appdir ./AppDir --output appimage \
34 --desktop-file ./AppDir/usr/share/applications/geeqie.desktop \
35 --icon-file ./AppDir/usr/share/pixmaps/geeqie.png \
37 --executable ./AppDir/usr/bin/geeqie
40 ## @FIXME arm AppImage of linuxdeploy does not yet exist
41 ## Compile from sources
45 --appdir ./AppDir --output appimage \
46 --desktop-file ./AppDir/usr/share/applications/geeqie.desktop \
47 --icon-file ./AppDir/usr/share/pixmaps/geeqie.png \
49 --executable ./AppDir/usr/bin/geeqie
51 appimagetool-aarch64.AppImage ./AppDir/ ./Geeqie-aarch64.AppImage
54 if [ ! -f geeqie.spec.in ] || [ ! -d .git ]
56 printf '%s\n' "This is not a Geeqie folder"
60 if ! target_dir=$(realpath "$1")
62 printf '%s\n' "No target dir specified"
66 rm -rf ./build-appimge
67 rm -rf "$target_dir"/AppDir
68 mkdir "$target_dir"/AppDir || {
69 printf '%s\n' "Cannot make $target_dir/AppDir"
73 meson setup build-appimage
74 meson configure build-appimage -Dprefix="/usr/"
75 DESTDIR=/"$target_dir"/AppDir ninja -C build-appimage install
77 VERSION=$(git tag | tail -1)
81 printf '%s\n' "Cannot cd to $target_dir"
89 mv "./Geeqie-$VERSION-x86_64.AppImage" "$(./Geeqie-"$VERSION"-x86_64.AppImage -v | sed 's/git//' | sed 's/-.* /-/' | sed 's/ /-v/' | sed 's/-GTK3//')-x86_64.AppImage"
95 mv "./Geeqie-aarch64.AppImage" "$(./Geeqie-aarch64.AppImage -v | sed 's/git//' | sed 's/-.* /-/' | sed 's/ /-v/' | sed 's/-GTK3//')-aarch64.AppImage"
99 printf "Architecture unknown"