7 #######################################################################
9 # build AppImageTool AppDir
10 APPIMAGETOOL_APPDIR
=appdirs
/appimagetool.AppDir
12 rm -rf "$APPIMAGETOOL_APPDIR" || true
14 # Run make install only for the 'appimagetool.AppImage' component to deploy appimagetools files to
15 # the $APPIMAGETOOL_APPDIR
16 DESTDIR
="$APPIMAGETOOL_APPDIR" cmake
-DCOMPONENT=appimagetool
-P cmake_install.cmake
18 mkdir
-p "$APPIMAGETOOL_APPDIR"/usr
/lib
/appimagekit
/
20 # Copy AppDir specific files
21 cp ..
/resources
/AppRun
"$APPIMAGETOOL_APPDIR"
22 cp install_prefix
/usr
/lib
/appimagekit
/mksquashfs
"$APPIMAGETOOL_APPDIR"/usr
/lib
/appimagekit
/
23 # prefer binaries from /deps, if available
24 export PATH
=/deps
/bin
:"$PATH"
25 cp $
(which desktop-file-validate
) "$APPIMAGETOOL_APPDIR"/usr
/bin
/
26 cp $
(which zsyncmake
) "$APPIMAGETOOL_APPDIR"/usr
/bin
/
28 cp ..
/resources
/appimagetool.desktop
"$APPIMAGETOOL_APPDIR"
29 cp ..
/resources
/appimagetool.svg
"$APPIMAGETOOL_APPDIR"/appimagetool.svg
30 ln -s "$APPIMAGETOOL_APPDIR"/appimagetool.svg
"$APPIMAGETOOL_APPDIR"/.DirIcon
32 if [ -d /deps
/ ]; then
34 mkdir
-p "$APPIMAGETOOL_APPDIR"/usr
/lib
/
35 cp /deps
/lib
/lib
*.so
* "$APPIMAGETOOL_APPDIR"/usr
/lib
/
36 # libffi is a runtime dynamic dependency
37 # see this thread for more information on the topic:
38 # https://mail.gnome.org/archives/gtk-devel-list/2012-July/msg00062.html
39 if [ "$ARCH" == "x86_64" ]; then
40 cp /usr
/lib64
/libffi.so
.5 "$APPIMAGETOOL_APPDIR"/usr
/lib
/
41 elif [ "$ARCH" == "i686" ]; then
42 cp /usr
/lib
/libffi.so
.5 "$APPIMAGETOOL_APPDIR"/usr
/lib
/
43 elif [ "$ARCH" == "armhf" ] ||
[ "$ARCH" == "aarch64" ]; then
44 cp /deps
/lib
/libffi.so
.6 "$APPIMAGETOOL_APPDIR"/usr
/lib
/
46 echo "WARNING: unknown architecture, not bundling libffi"