├── .gitignore ├── hello-world-appimage ├── helloworld.sh ├── AppRun ├── hello-world-icon.png ├── helloworld.desktop ├── build.sh └── README.md ├── README.md ├── qbittorrent-example ├── AppRun └── qbittorrent-final-files.txt └── tempenv.sh /.gitignore: -------------------------------------------------------------------------------- 1 | .DirIcon 2 | *.AppImage 3 | -------------------------------------------------------------------------------- /hello-world-appimage/helloworld.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "Hello World!" 4 | -------------------------------------------------------------------------------- /hello-world-appimage/AppRun: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd "$(dirname "$0")" 4 | exec ./helloworld.sh 5 | -------------------------------------------------------------------------------- /hello-world-appimage/hello-world-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boolean-world/appimage-resources/HEAD/hello-world-appimage/hello-world-icon.png -------------------------------------------------------------------------------- /hello-world-appimage/helloworld.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Name=hello-world-appimage 4 | Icon=hello-world-icon 5 | Categories=Education; 6 | Terminal=true 7 | X-AppImage-Version=0.1.09 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # appimage-resources 2 | 3 | Please refer to https://www.booleanworld.com/creating-linux-apps-run-anywhere-appimage for more details. 4 | 5 | ## License 6 | 7 | https://creativecommons.org/publicdomain/zero/1.0/legalcode 8 | -------------------------------------------------------------------------------- /qbittorrent-example/AppRun: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | SELF_DIR="$(dirname "$(readlink -f "$0")")" 4 | LIBS_PATH="$SELF_DIR/opt/qt58/lib:$SELF_DIR/usr/lib:$SELF_DIR/usr/lib/x86_64-linux-gnu" 5 | 6 | if [ -z "$LD_LIBRARY_PATH" ]; then 7 | LD_LIBRARY_PATH="$LIBS_PATH" 8 | else 9 | LD_LIBRARY_PATH="$LIBS_PATH:$LD_LIBRARY_PATH" 10 | fi 11 | 12 | export LD_LIBRARY_PATH 13 | export QT_QPA_PLATFORM_PLUGIN_PATH="$SELF_DIR/opt/qt58/plugins" 14 | 15 | exec "$SELF_DIR/usr/bin/qbittorrent" 16 | -------------------------------------------------------------------------------- /hello-world-appimage/build.sh: -------------------------------------------------------------------------------- 1 | # 2 | 3 | # detect machine's architecture 4 | export ARCH=$(uname -m) 5 | 6 | # get the missing tools if necessary 7 | if [ ! -d ../build ]; then mkdir ../build; fi 8 | if [ ! -x ../build/appimagetool-$ARCH.AppImage ]; then 9 | curl -L -o ../build/appimagetool-$ARCH.AppImage https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-$ARCH.AppImage 10 | chmod a+x ../build/appimagetool-$ARCH.AppImage 11 | fi 12 | # the build command itself: 13 | ../build/appimagetool-$ARCH.AppImage $PWD 14 | 15 | # move result in build folder 16 | mv hello-world-appimage-*-$ARCH.AppImage ../build 17 | 18 | -------------------------------------------------------------------------------- /hello-world-appimage/README.md: -------------------------------------------------------------------------------- 1 | # 2 | To build this image you could run ``sh build.sh`` 3 | the result will be in ../build.sh 4 | 5 | note: when you create an appimage, you need a registered Categories in your _application_.desktop file 6 | 7 | you can find the list of categories here : 8 | 9 | 10 | ```sh 11 | export ARCH=$(uname -m) 12 | 13 | if [ ! -d ../build ]; then mkdir ../build; fi 14 | if [ ! -x ../build/appimagetool-$ARCH.AppImage ]; then 15 | curl -L -o ../build/appimagetool-$ARCH.AppImage https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-$ARCH.AppImage 16 | chmod a+x ../build/appimagetool-$ARCH.AppImage 17 | fi 18 | 19 | ../build/appimagetool-$ARCH.AppImage $PWD 20 | 21 | mv hello-world-appimage-*-$ARCH.AppImage ../build 22 | ``` 23 | -------------------------------------------------------------------------------- /tempenv.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function showhelp() { 4 | echo "Usage: $0 [setup|start|help]" 5 | } 6 | 7 | function setup() { 8 | mkdir -p tempenv/{chroot,persist,files,dev/pts} 9 | 10 | mknod -m 622 tempenv/dev/console c 5 1 11 | mknod -m 666 tempenv/dev/null c 1 3 12 | mknod -m 666 tempenv/dev/zero c 1 5 13 | mknod -m 666 tempenv/dev/ptmx c 5 2 14 | mknod -m 666 tempenv/dev/tty c 5 0 15 | mknod -m 444 tempenv/dev/random c 1 8 16 | mknod -m 444 tempenv/dev/urandom c 1 9 17 | chown root:tty tempenv/dev/{console,ptmx,tty} 18 | } 19 | 20 | function verifysetup() { 21 | for i in tempenv/{chroot,persist,files,dev/pts}; do 22 | if [[ ! -d $i ]]; then 23 | return 1 24 | fi 25 | done 26 | 27 | return 0 28 | } 29 | 30 | function start() { 31 | if ! verifysetup; then 32 | echo "Environment wasn't set up." 33 | return 1 34 | fi 35 | 36 | unionfs-fuse -o cow,allow_other tempenv/files=RW:tempenv/persist:/ tempenv/chroot 37 | mount --bind tempenv/dev tempenv/chroot/dev 38 | mount --bind /dev/pts tempenv/chroot/dev/pts 39 | 40 | set +e 41 | chroot tempenv/chroot 42 | umount tempenv/chroot/{dev/pts,dev} tempenv/chroot 43 | set -e 44 | } 45 | 46 | set -e 47 | 48 | if [[ -z $1 ]] || [[ $1 == "help" ]]; then 49 | showhelp 50 | exit 0 51 | fi 52 | 53 | cd "$(dirname "$0")" 54 | 55 | if [[ $EUID -ne 0 ]]; then 56 | echo "Must be run as root" 57 | exit 1 58 | fi 59 | 60 | case "$1" in 61 | "start") 62 | start 63 | ;; 64 | "setup") 65 | setup 66 | ;; 67 | *) 68 | echo "Unknown command: $1" 69 | ;; 70 | esac 71 | -------------------------------------------------------------------------------- /qbittorrent-example/qbittorrent-final-files.txt: -------------------------------------------------------------------------------- 1 | . 2 | ./usr 3 | ./usr/lib 4 | ./usr/lib/libtorrent-rasterbar.so.8 5 | ./usr/lib/x86_64-linux-gnu 6 | ./usr/lib/x86_64-linux-gnu/libxshmfence.so.1 7 | ./usr/lib/x86_64-linux-gnu/libxcb-sync.so.1 8 | ./usr/lib/x86_64-linux-gnu/libxcb-randr.so.0 9 | ./usr/lib/x86_64-linux-gnu/libxcb.so.1 10 | ./usr/lib/x86_64-linux-gnu/libxcb-render-util.so.0 11 | ./usr/lib/x86_64-linux-gnu/libxcb-dri2.so.0 12 | ./usr/lib/x86_64-linux-gnu/libxcb-image.so.0 13 | ./usr/lib/x86_64-linux-gnu/libxcb-icccm.so.4 14 | ./usr/lib/x86_64-linux-gnu/libxcb-xinerama.so.0 15 | ./usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0 16 | ./usr/lib/x86_64-linux-gnu/libstdc++.so.6 17 | ./usr/lib/x86_64-linux-gnu/libxcb-keysyms.so.1 18 | ./usr/lib/x86_64-linux-gnu/libicudata.so.52 19 | ./usr/lib/x86_64-linux-gnu/libxcb-dri3.so.0 20 | ./usr/lib/x86_64-linux-gnu/libboost_system.so.1.54.0 21 | ./usr/lib/x86_64-linux-gnu/libdrm.so.2 22 | ./usr/lib/x86_64-linux-gnu/libxcb-present.so.0 23 | ./usr/lib/x86_64-linux-gnu/libpng12.so.0 24 | ./usr/lib/x86_64-linux-gnu/libGeoIP.so.1 25 | ./usr/lib/x86_64-linux-gnu/libglapi.so.0 26 | ./usr/lib/x86_64-linux-gnu/libicuuc.so.52 27 | ./usr/lib/x86_64-linux-gnu/libxcb-glx.so.0 28 | ./usr/lib/x86_64-linux-gnu/libxcb-util.so.0 29 | ./usr/lib/x86_64-linux-gnu/libicui18n.so.52 30 | ./usr/lib/x86_64-linux-gnu/libssl.so.1.0.0 31 | ./usr/lib/x86_64-linux-gnu/libGL.so.1 32 | ./usr/bin 33 | ./usr/bin/qbittorrent 34 | ./usr/share 35 | ./usr/share/applications 36 | ./usr/share/applications/qbittorrent.desktop 37 | ./usr/share/metainfo 38 | ./usr/share/icons 39 | ./usr/share/icons/hicolor 40 | ./usr/share/icons/hicolor/22x22 41 | ./usr/share/icons/hicolor/22x22/status 42 | ./usr/share/icons/hicolor/22x22/status/qbittorrent-tray.png 43 | ./usr/share/icons/hicolor/22x22/apps 44 | ./usr/share/icons/hicolor/22x22/apps/qbittorrent.png 45 | ./usr/share/icons/hicolor/16x16 46 | ./usr/share/icons/hicolor/16x16/status 47 | ./usr/share/icons/hicolor/16x16/status/qbittorrent-tray.png 48 | ./usr/share/icons/hicolor/16x16/apps 49 | ./usr/share/icons/hicolor/16x16/apps/qbittorrent.png 50 | ./usr/share/icons/hicolor/128x128 51 | ./usr/share/icons/hicolor/128x128/status 52 | ./usr/share/icons/hicolor/128x128/status/qbittorrent-tray.png 53 | ./usr/share/icons/hicolor/128x128/apps 54 | ./usr/share/icons/hicolor/128x128/apps/qbittorrent.png 55 | ./usr/share/icons/hicolor/32x32 56 | ./usr/share/icons/hicolor/32x32/status 57 | ./usr/share/icons/hicolor/32x32/status/qbittorrent-tray.png 58 | ./usr/share/icons/hicolor/32x32/apps 59 | ./usr/share/icons/hicolor/32x32/apps/qbittorrent.png 60 | ./usr/share/icons/hicolor/64x64 61 | ./usr/share/icons/hicolor/64x64/status 62 | ./usr/share/icons/hicolor/64x64/status/qbittorrent-tray.png 63 | ./usr/share/icons/hicolor/64x64/apps 64 | ./usr/share/icons/hicolor/64x64/apps/qbittorrent.png 65 | ./usr/share/icons/hicolor/24x24 66 | ./usr/share/icons/hicolor/24x24/status 67 | ./usr/share/icons/hicolor/24x24/status/qbittorrent-tray.png 68 | ./usr/share/icons/hicolor/24x24/apps 69 | ./usr/share/icons/hicolor/24x24/apps/qbittorrent.png 70 | ./usr/share/icons/hicolor/36x36 71 | ./usr/share/icons/hicolor/36x36/status 72 | ./usr/share/icons/hicolor/36x36/status/qbittorrent-tray.png 73 | ./usr/share/icons/hicolor/36x36/apps 74 | ./usr/share/icons/hicolor/36x36/apps/qbittorrent.png 75 | ./usr/share/icons/hicolor/48x48 76 | ./usr/share/icons/hicolor/48x48/status 77 | ./usr/share/icons/hicolor/48x48/status/qbittorrent-tray.png 78 | ./usr/share/icons/hicolor/48x48/apps 79 | ./usr/share/icons/hicolor/48x48/apps/qbittorrent.png 80 | ./usr/share/icons/hicolor/72x72 81 | ./usr/share/icons/hicolor/72x72/status 82 | ./usr/share/icons/hicolor/72x72/status/qbittorrent-tray.png 83 | ./usr/share/icons/hicolor/72x72/apps 84 | ./usr/share/icons/hicolor/72x72/apps/qbittorrent.png 85 | ./usr/share/icons/hicolor/192x192 86 | ./usr/share/icons/hicolor/192x192/status 87 | ./usr/share/icons/hicolor/192x192/status/qbittorrent-tray.png 88 | ./usr/share/icons/hicolor/192x192/apps 89 | ./usr/share/icons/hicolor/192x192/apps/qbittorrent.png 90 | ./usr/share/icons/hicolor/96x96 91 | ./usr/share/icons/hicolor/96x96/status 92 | ./usr/share/icons/hicolor/96x96/status/qbittorrent-tray.png 93 | ./usr/share/icons/hicolor/96x96/apps 94 | ./usr/share/icons/hicolor/96x96/apps/qbittorrent.png 95 | ./usr/share/GeoIP 96 | ./usr/share/GeoIP/GeoIP.dat 97 | ./usr/share/GeoIP/GeoIPv6.dat 98 | ./usr/share/appdata 99 | ./usr/share/appdata/qbittorrent.appdata.xml 100 | ./usr/share/pixmaps 101 | ./usr/share/pixmaps/qbittorrent.png 102 | ./qbittorrent.png 103 | ./opt 104 | ./opt/qt58 105 | ./opt/qt58/lib 106 | ./opt/qt58/lib/libQt5Network.so.5.8.0 107 | ./opt/qt58/lib/libQt5Gui.so.5.8.0 108 | ./opt/qt58/lib/libQt5Widgets.so 109 | ./opt/qt58/lib/libQt5Xml.so.5.8.0 110 | ./opt/qt58/lib/libQt5Core.so.5 111 | ./opt/qt58/lib/libQt5DBus.so 112 | ./opt/qt58/lib/libQt5Widgets.so.5.8 113 | ./opt/qt58/lib/libQt5Gui.so 114 | ./opt/qt58/lib/libQt5DBus.so.5 115 | ./opt/qt58/lib/libQt5Core.so 116 | ./opt/qt58/lib/libQt5Xml.so.5.8 117 | ./opt/qt58/lib/libQt5Network.so.5 118 | ./opt/qt58/lib/libQt5XcbQpa.so.5.8.0 119 | ./opt/qt58/lib/libQt5DBus.so.5.8 120 | ./opt/qt58/lib/libQt5DBus.so.5.8.0 121 | ./opt/qt58/lib/libQt5Widgets.so.5.8.0 122 | ./opt/qt58/lib/libQt5Network.so.5.8 123 | ./opt/qt58/lib/libQt5Widgets.so.5 124 | ./opt/qt58/lib/libQt5XcbQpa.so.5 125 | ./opt/qt58/lib/libQt5Core.so.5.8 126 | ./opt/qt58/lib/libQt5Gui.so.5.8 127 | ./opt/qt58/lib/libQt5Gui.so.5 128 | ./opt/qt58/lib/libQt5XcbQpa.so 129 | ./opt/qt58/lib/libQt5Xml.so.5 130 | ./opt/qt58/lib/libQt5Network.so 131 | ./opt/qt58/lib/libQt5Xml.so 132 | ./opt/qt58/lib/libQt5XcbQpa.so.5.8 133 | ./opt/qt58/lib/libQt5Core.so.5.8.0 134 | ./opt/qt58/plugins 135 | ./opt/qt58/plugins/bearer 136 | ./opt/qt58/plugins/bearer/libqgenericbearer.so 137 | ./opt/qt58/plugins/bearer/libqconnmanbearer.so 138 | ./opt/qt58/plugins/bearer/libqnmbearer.so 139 | ./opt/qt58/plugins/imageformats 140 | ./opt/qt58/plugins/imageformats/libqjpeg.so 141 | ./opt/qt58/plugins/imageformats/libqgif.so 142 | ./opt/qt58/plugins/imageformats/libqico.so 143 | ./opt/qt58/plugins/xcbglintegrations 144 | ./opt/qt58/plugins/xcbglintegrations/libqxcb-glx-integration.so 145 | ./opt/qt58/plugins/platforminputcontexts 146 | ./opt/qt58/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so 147 | ./opt/qt58/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so 148 | ./opt/qt58/plugins/platforms 149 | ./opt/qt58/plugins/platforms/libqminimal.so 150 | ./opt/qt58/plugins/platforms/libqoffscreen.so 151 | ./opt/qt58/plugins/platforms/libqvnc.so 152 | ./opt/qt58/plugins/platforms/libqxcb.so 153 | ./opt/qt58/plugins/platforms/libqlinuxfb.so 154 | --------------------------------------------------------------------------------