### AppImage Mono DLL Installation Path Example Source: https://github.com/appimage/appimagekit/wiki/Bundling-Mono-apps Example of a file that lists the installation path for a Mono DLL, indicating where it should be placed within the AppImage structure. ```text cat ./usr/share/cli-common/packages.d/liblog4net1.2-cil.installcligac /usr/lib/cli/log4net-1.2/log4net.dll ``` -------------------------------- ### Create AppImage for Python 3 PyQt App using pkg2appimage Source: https://github.com/appimage/appimagekit/wiki/Bundling-Python-apps This example demonstrates the configuration for `pkg2appimage` to bundle a Python 3 PyQt application. It specifies distribution details, package sources, and scripts for downloading assets, setting up a virtual environment, installing the application, and creating a desktop entry. ```yaml app: mu.codewith.editor ingredients: dist: trusty sources: - deb http://us.archive.ubuntu.com/ubuntu/ trusty trusty-updates trusty-security main universe - deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates main universe - deb http://us.archive.ubuntu.com/ubuntu/ trusty-security main universe packages: - python3.4-venv script: - wget -c https://raw.githubusercontent.com/mu-editor/mu/master/conf/mu.codewith.editor.png - wget -c https://raw.githubusercontent.com/mu-editor/mu/master/conf/mu.appdata.xml script: - cp ../mu.codewith.editor.png ./usr/share/icons/hicolor/256x256/ - cp ../mu.codewith.editor.png . - mkdir -p usr/share/metainfo/ ; cp ../mu.appdata.xml usr/share/metainfo/ - virtualenv --python=python3 usr - ./usr/bin/pip3 install mu-editor - cat > usr/share/applications/mu.codewith.editor.desktop <<\EOF - [Desktop Entry] (...) - cp usr/share/applications/mu.codewith.editor.desktop . - usr/bin/pip3 freeze | grep "mu-editor" | cut -d "=" -f 3 >> ../VERSION ``` -------------------------------- ### Install Application with Snap Source: https://github.com/appimage/appimagekit/wiki/Similar-projects Use this command to install an application using the Snap package manager. Ensure Snap is installed and configured on your system. ```bash $ snap install gimp ``` -------------------------------- ### Build and install application sources Source: https://github.com/appimage/appimagekit/wiki/Bundling-GTK3-apps Compiles the application from source using CMake and Ninja, installing it into the AppDir. Ensure the DESTDIR variable is set to your AppDir. ```bash mkdir build && cd build cmake .. -DCMAKE_INSTALL_PREFIX=/usr ninja DESTDIR="$DST_DIR" ninja -C build install ``` -------------------------------- ### Install Nix Package Manager Source: https://github.com/appimage/appimagekit/wiki/Similar-projects This command downloads and executes the Nix installation script. It is used to install the Nix package manager on a system. ```bash bash <(curl https://nixos.org/nix/install ) ``` -------------------------------- ### Install Application with Flatpak Source: https://github.com/appimage/appimagekit/wiki/Similar-projects Use this command to install an application using the Flatpak package manager for the current user. Ensure Flatpak is installed and the Flathub repository is added. ```bash $ flatpak install --user flathub org.gimp.GIMP ``` -------------------------------- ### Install Atom using Nix Source: https://github.com/appimage/appimagekit/wiki/Similar-projects After installing Nix, this command can be used to install the Atom text editor. It shows the package name and version being installed. ```bash nix-env -i atom ``` -------------------------------- ### Example: Creating AppImages with Python Source: https://github.com/appimage/appimagekit/wiki/Bundling-Python-apps This script demonstrates how to create an AppImage for a Python application, including the process of downloading and building Python itself. It serves as a comprehensive example for advanced AppImage creation workflows. ```bash #!/bin/bash # This is a placeholder for the actual script content. # The full script can be found at: # https://github.com/benoit-pierre/plover/blob/9dc9fd5b2fb29b740eeb40f23d4a0630e8689b77/linux/appimage.sh echo "This script demonstrates creating an AppImage for a Python application." echo "It includes downloading and building Python itself." ``` -------------------------------- ### Install and Use workingenv.py for Python 2 Source: https://github.com/appimage/appimagekit/wiki/Bundling-Python-apps Installs `workingenv.py` using pip and sets up an isolated Python environment. It then modifies the `site.py` file to ensure proper environment isolation and activates the environment for installing application dependencies. ```bash python2 -m pip install --user workingenv.py ## python workingenv.py MyNewEnvironment python2 -m workingenv MyNewEnvironment cd MyNewEnvironment/ SITEPY=$(find -name site.py | head -n 1) cat >> $SITEPY.new <> $SITEPY.new mv $SITEPY.new $SITEPY source easy_install bin/activate cd src/ # wget ... tar xzf * ; cd * ; python2 setup.py install # or ## easy_install *.egg ``` -------------------------------- ### Debian Package Post-installation Script Example Source: https://github.com/appimage/appimagekit/wiki/Bundling-Mono-apps Shows a shell script from a Debian package's post-install phase, demonstrating how .NET GAC (Global Assembly Cache) policies are managed. ```shell #!/bin/sh set -e # Automatically added by dh_installcligac if [ "$1" = "configure" ] && [ -x /usr/share/cli-common/gac-package-install ]; then /usr/share/cli-common/gac-package-install liblog4net1.2-cil fi # End automatically added section # Automatically added by dh_cligacpolicy if [ "$1" = "configure" ] && [ -x /usr/share/cli-common/policy-install ]; then /usr/share/cli-common/policy-install log4net 1.2 fi # End automatically added section ``` -------------------------------- ### Simulated Package Installation Output Source: https://github.com/appimage/appimagekit/wiki/Bundling-Steam This output simulates the result of running an apt-get command, listing packages that would be installed or upgraded. This is relevant for understanding Steam's dependencies. ```bash Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: cpp-6 gcc-6-base gcc-6-base:i386 libcc1-0 libdrm-amdgpu1 libdrm-amdgpu1:i386 libdrm-intel1 libdrm-intel1:i386 libdrm-nouveau2 libdrm-nouveau2:i386 libdrm-radeon1 libdrm-radeon1:i386 libdrm2 libdrm2:i386 libedit2:i386 libegl1-mesa libelf1:i386 libexpat1:i386 libffi6:i386 libgbm1 libgcc1 libgcc1:i386 libgfortran3 libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa libglapi-mesa:i386 libgles2-mesa libgomp1 libllvm4.0:i386 libmirclient9 libmircommon7 libmircore1 libmirprotobuf3 libpciaccess0:i386 libquadmath0 libsensors4:i386 libstdc++6 libstdc++6:i386 libtinfo5:i386 libtxc-dxtn-s2tc:i386 libwayland-egl1-mesa libx11-6:i386 libx11-xcb1:i386 libxau6:i386 libxcb-dri2-0:i386 libxcb-dri3-0:i386 libxcb-glx0:i386 libxcb-present0:i386 libxcb-sync1:i386 libxcb1:i386 libxdamage1:i386 libxdmcp6:i386 libxext6:i386 libxfixes3:i386 libxshmfence1:i386 libxxf86vm1:i386 zlib1g:i386 Suggested packages: gcc-6-locales glibc-doc:i386 locales:i386 lm-sensors:i386 python-apt-dbg python-apt-doc The following NEW packages will be installed: curl gcc-6-base:i386 libc6:i386 libdrm-amdgpu1:i386 libdrm-intel1:i386 libdrm-nouveau2:i386 libdrm-radeon1:i386 libdrm2:i386 libedit2:i386 libelf1:i386 libexpat1:i386 libffi6:i386 libgcc1:i386 libgl1-mesa-dri:i386 libgl1-mesa-glx:i386 libglapi-mesa:i386 libllvm4.0:i386 libpciaccess0:i386 libsensors4:i386 libstdc++6:i386 libtinfo5:i386 libtxc-dxtn-s2tc:i386 libx11-6:i386 libx11-xcb1:i386 libxau6:i386 libxcb-dri2-0:i386 libxcb-dri3-0:i386 libxcb-glx0:i386 libxcb-present0:i386 libxcb-sync1:i386 libxcb1:i386 libxdamage1:i386 libxdmcp6:i386 libxext6:i386 libxfixes3:i386 libxshmfence1:i386 libxxf86vm1:i386 python-apt zlib1g:i386 The following packages will be upgraded: cpp-6 gcc-6-base libcc1-0 libdrm-amdgpu1 libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libegl1-mesa libgbm1 libgcc1 libgfortran3 libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa libgles2-mesa libgomp1 libmirclient9 libmircommon7 libmircore1 libmirprotobuf3 libquadmath0 libstdc++6 libwayland-egl1-mesa ``` -------------------------------- ### Example Desktop File Source: https://github.com/appimage/appimagekit/wiki/AppDir A sample .desktop file for an application named Hypnos, demonstrating common entries like Name, Exec, Icon, Type, Categories, and MimeType. Ensure the Icon entry does not include the file extension. ```ini [Desktop Entry] Name=Hypnos Exec=hypnos %F Icon=hypnos Type=Application Categories=Audio;AudioVideo; Comment=Music Player and Library MimeType=inode/directory;audio/flac; Name[en]=Hypnos Terminal=false StartupNotify=true NoDisplay=false ``` -------------------------------- ### Install fuse and libfuse2 on Ubuntu (<= 21.10) Source: https://github.com/appimage/appimagekit/wiki/FUSE Installs FUSE and its version 2 library, loads the fuse module, and adds the current user to the 'fuse' group for access. ```bash sudo apt install fuse libfuse2 sudo modprobe fuse sudo groupadd fuse user="$(whoami)" sudo usermod -a -G fuse $user ``` -------------------------------- ### Install build dependencies for Ubuntu Source: https://github.com/appimage/appimagekit/wiki/Bundling-GTK3-apps Installs necessary packages for building applications on Ubuntu. Ensure your system is up-to-date before running. ```bash sudo apt-get update && sudo apt-get install -y --no-install-recommends build-essential cmake ninja-build git wget libgtk-3-dev libglib2.0-dev libxml2-dev libgudev-1.0-dev libnotify-dev libpulse-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libappstream-glib-dev libjson-glib-dev libsecret-1-dev libpeas-dev libgirepository1.0-dev libadwaita-1-dev ``` -------------------------------- ### AppDir Structure for Java App Source: https://github.com/appimage/appimagekit/wiki/Bundling-Java-apps Example directory structure for an AppDir, including the bundled JRE, launcher script, JAR file, and desktop entry. ```text Hypnos.AppDir/ usr/ bin/ jre/ <-- our jre folder from step 1 hypnos <-- our launch script from step 2 hypnos.jar <-- your program's jar file hypnos.desktop Hypnos.png AppRun <-- provided by app image ``` -------------------------------- ### Install fuse and libfuse2 on openSUSE Source: https://github.com/appimage/appimagekit/wiki/FUSE Installs the FUSE package and its version 2 library on openSUSE systems. ```bash sudo zypper install fuse libfuse2 ``` -------------------------------- ### Install CMake and Qt Binaries for AppImage Source: https://github.com/appimage/appimagekit/wiki/Bundling-Qt-apps This script downloads and unpacks specific versions of CMake and Qt binaries, then sets up environment variables for their use. It's a prerequisite for building AppImages that depend on these Qt versions. ```bash # Install CMake 3.2.2 and Qt 5.4.1 # https://github.com/vlc-qt/examples/blob/master/tools/ci/linux/install.sh wget http://www.cmake.org/files/v3.2/cmake-3.2.2-Linux-x86_64.tar.gz tar xf cmake-3.2.2-Linux-x86_64.tar.gz wget http://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt5_55/qt.55.gcc_64/5.5.0-2qt5_essentials.7z wget http://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt5_55/qt.55.gcc_64/5.5.0-2icu-linux-g++-Rhel6.6-x64.7z wget http://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt5_55/qt.55.gcc_64/5.5.0-2qt5_addons.7z 7z x *_essentials.7z > /dev/null 7z x *icu-linux-*.7z > /dev/null 7z x *_addons.7z > /dev/null export PATH=$PWD/cmake-3.2.2-Linux-x86_64/bin/:$PWD/5.5/gcc_64/bin/:$PATH export LD_LIBRARY_PATH=$PWD/5.5/gcc_64/lib ``` -------------------------------- ### Install 32-bit libfuse2 on Armbian Source: https://github.com/appimage/appimagekit/wiki/FUSE Installs the 32-bit libfuse2 library on Armbian 64-bit systems, required for running 32-bit AppImages. ```bash sudo apt install libfuse2:armhf ``` -------------------------------- ### Install 32-bit Libraries on Debian/Ubuntu Source: https://github.com/appimage/appimagekit/wiki/Bundling-Windows-applications Installs essential 32-bit libraries required for WINE to function on Debian-based systems. Use this command if WINE fails due to missing libraries. ```bash sudo apt-get install libfreetype6:i386 libxext6:i386 libudev1:i386 libncurses5:i386 ``` -------------------------------- ### Build Qt Gtk2 Styles Source: https://github.com/appimage/appimagekit/wiki/Bundling-Qt-apps Builds the necessary Qt Gtk2 style plugins for theming on Gtk systems. Ensure you use the correct Qt installation. ```bash apt-get update apt-get -y install libgtk2.0-dev git clone http://code.qt.io/qt/qtstyleplugins.git cd qtstyleplugins qmake # be sure to use the one from the Qt installation you are using for the application make -j$(nproc) sudo make install cd - ``` -------------------------------- ### Install libfuse2 on Debian/Ubuntu (>= 24.04) Source: https://github.com/appimage/appimagekit/wiki/FUSE Installs the necessary FUSE version 2 library on newer Debian and Ubuntu systems. Ensure the 'universe' repository is enabled. ```bash sudo add-apt-repository universe sudo apt install libfuse2t64 ``` -------------------------------- ### Mono File Not Found Exception Example Source: https://github.com/appimage/appimagekit/wiki/Bundling-Mono-apps Illustrates a typical System.IO.FileNotFoundException encountered when Mono applications are missing required assemblies or their dependencies. ```text Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=a5715cc6d5c3540b' or one of its dependencies. File name: 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=a5715cc6d5c3540b' [ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=a5715cc6d5c3540b' or one of its dependencies. File name: 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=a5715cc6d5c3540b' ``` -------------------------------- ### Audacity Debian Rules Example Source: https://github.com/appimage/appimagekit/wiki/Bundling-Audacity This snippet shows the `configure_flags` typically used in Audacity's Debian build rules. It indicates which external libraries are linked as system dependencies. ```make #!/usr/bin/make -f export DEB_LDFLAGS_MAINT_APPEND=-Wl,-z,defs -Wl,--as-needed configure_flags :=\ --disable-dynamic-loading \ --with-expat=system \ --with-ffmpeg=system \ --with-lame=system \ --with-libflac=system \ --with-libid3tag=system \ --with-libmad=system \ --with-libsndfile=system \ --with-libsoxr=system \ --with-libtwolame=system \ --with-libvamp=system \ --with-libvorbis=system \ --with-lv2=system \ --with-midi=system \ --with-portaudio=system \ --with-portsmf=system \ --with-sbsms=system \ --with-soundtouch=system \ $(NULL) (...) ``` -------------------------------- ### Tutorial: Bundle Python and Pygame AppImage Source: https://github.com/appimage/appimagekit/wiki/Bundling-Python-apps This script is part of a tutorial on how to bundle Python and Pygame applications into an AppImage. It provides practical steps and examples for packaging such applications. ```bash #!/bin/bash # This is a placeholder for the actual script content. # The full script can be found at: # https://notabug.org/themightyglider/Python_and_pygame_AppImage_tutorial/src/master/howto_py_appimage.sh echo "This script shows how to bundle Python and Pygame applications into an AppImage." ``` -------------------------------- ### AppImage Command Line Arguments Source: https://github.com/appimage/appimagekit/blob/main/README.md Invoke an AppImage with these arguments for special behavior. Use --appimage-help for options, --appimage-offset to find the filesystem image start, --appimage-extract to extract contents, --appimage-mount to mount the filesystem, --appimage-version for AppImageKit version, --appimage-updateinformation for update details, and --appimage-signature to view the digital signature. ```bash --appimage-help ``` ```bash --appimage-offset ``` ```bash --appimage-extract ``` ```bash --appimage-mount ``` ```bash --appimage-version ``` ```bash --appimage-updateinformation ``` ```bash --appimage-signature ``` -------------------------------- ### Optimize Java Startup with -Xquickstart Source: https://github.com/appimage/appimagekit/wiki/Bundling-Java-apps Adjust the launcher script to use the '-Xquickstart' JVM option for faster application startup. This is recommended for AppImages where quick launch is prioritized over long-running optimizations. ```bash # Launcher script needs to be adjusted a bit, make sure to run # java -jar -Xquickstart # because otherwise Java optimizes for long-running processes, # which means a slower start (roughly 5 rather than 3 seconds) # https://www.eclipse.org/openj9/docs/xquickstart/ ``` -------------------------------- ### Prepare and Build AppImage Source: https://github.com/appimage/appimagekit/wiki/Bundling-Windows-applications This snippet downloads an icon, modifies the WINE desktop entry, copies necessary files, downloads the appimagetool, and then uses it to create the AppImage. ```bash mkdir -p usr/share/icons/hicolor/256x256/apps/ ; wget -c "https://dl2.macupdate.com/images/icons256/17376.png" -O usr/share/icons/hicolor/256x256/apps/wine.png sed -i -e 's|^NoDisplay=true|NoDisplay=false|g' ./usr/share/applications/wine.desktop sed -i -e 's|^Name=.*|Name=WINE|g' ./usr/share/applications/wine.desktop echo "Categories=System;Emulator;" >> ./usr/share/applications/wine.desktop cp ./usr/share/applications/wine.desktop . cp ./usr/share/icons/hicolor/256x256/apps/wine.png . cd .. wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage chmod +x appimagetool-x86_64.AppImage ARCH=x86_64 ./appimagetool-x86_64.AppImage WINE.AppDir/ ``` -------------------------------- ### Install libfuse2 on Ubuntu (>= 22.04) Source: https://github.com/appimage/appimagekit/wiki/FUSE Installs the FUSE version 2 library on Ubuntu systems. Avoid installing the 'fuse' package on these versions to prevent system instability. ```bash sudo add-apt-repository universe sudo apt install libfuse2 ``` -------------------------------- ### Install fuse and fuse-libs on Fedora Source: https://github.com/appimage/appimagekit/wiki/FUSE Installs the FUSE package and its associated libraries on Fedora systems. ```bash dnf install fuse fuse-libs ``` -------------------------------- ### Create AppDir and Download Dropbox Source: https://github.com/appimage/appimagekit/wiki/Bundling-Dropbox Initializes the AppDir structure and downloads the Dropbox client archive. ```bash mkdir -p dropbox/dropbox.AppDir cd dropbox wget -c "https://d1ilhw0800yew8.cloudfront.net/client/dropbox-lnx.x86_64-2.11.0.tar.gz" ``` -------------------------------- ### Install fuse-sshfs on CentOS/RHEL Source: https://github.com/appimage/appimagekit/wiki/FUSE Installs the fuse-sshfs package from the EPEL repository and adds the current user to the 'fuse' group. ```bash yum --enablerepo=epel -y install fuse-sshfs # install from EPEL user="$(whoami)" usermod -a -G fuse "$user" ``` -------------------------------- ### Create and Run a .NET Core Console App Source: https://github.com/appimage/appimagekit/wiki/Bundling-.NET-Core-apps Basic steps to create a new .NET Core console application, restore dependencies, and run it. ```bash dotnet new console -o hwapp cd hwapp dotnet restore dotnet run Hello World! ``` -------------------------------- ### Prepare AppDir and Mount AppImage Source: https://github.com/appimage/appimagekit/wiki/Bundling-Java-apps Mount the application's AppImage, copy its contents to an AppDir, and unmount it. This prepares the application's files for analysis and bundling. ```bash sudo mount ./IrScrutinizer-1.4.3-SNAPSHOT-x86_64.AppImage /mnt sudo cp -r /mnt/ AppDir && sudo chown -R $USER AppDir sudo umount /mnt ``` -------------------------------- ### Install Dependencies in CentOS Container Source: https://github.com/appimage/appimagekit/wiki/Docker-Hub-Travis-CI-Workflow Commands to update the system and install EPEL repository and development packages within a CentOS container. ```bash # yum -y update # yum -y install epel-release ``` -------------------------------- ### Install FUSE on Chrome OS/Crostini Source: https://github.com/appimage/appimagekit/wiki/FUSE Installs the FUSE package on Chrome OS, Chromium OS, or Crostini environments after version 73. ```bash sudo apt install fuse ``` -------------------------------- ### Download Qt Binaries for Desktop Source: https://github.com/appimage/appimagekit/wiki/Bundling-Qt-apps This Python script fetches direct download links for Qt binaries for different versions (5.4, 5.5, 5.6) from the official Qt SDK repository. It requires the `xmltodict` library. ```python #!/usr/bin/python import xmltodict # sudo apt install python-xmltodict import urllib2, os def do(version): url = "http://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt5_" + str(version) + "/Updates.xml" print("") print("############################################################################################################") print("# " + url) print("############################################################################################################") print("") response = urllib2.urlopen(url) xml = response.read() data = xmltodict.parse(xml) for item in data["Updates"]["PackageUpdate"]: if(item["DownloadableArchives"]): print "# " + item["Name"] for archive in item["DownloadableArchives"].split(", "): print(os.path.join(os.path.dirname(url), item["Name"], item["Version"] + archive )) print "" if(__name__ == "__main__"): for version in (54 ,55, 56): do(version=version) ``` -------------------------------- ### Build 32-bit AppImage with Runtime Source: https://github.com/appimage/appimagekit/wiki/Bundling-Java-apps Command to build a 32-bit AppImage, specifying a 32-bit runtime file. ```bash --runtime-file runtime-i686 ``` -------------------------------- ### Install libglib2.0-0 in Docker Container Source: https://github.com/appimage/appimagekit/wiki/Bundling-.NET-Core-apps Use this command within a Dockerfile or build script to install the necessary libglib2.0-0 dependency before building your .NET Core application. ```bash docker run --rm \ ...snip (mount source code directory etc) microsoft/dotnet:1.1-sdk \ bash -c "apt update && apt install -y libglib2.0-0 && build.sh" ``` -------------------------------- ### Direct Download Links for Qt 5.5.1 Binaries Source: https://github.com/appimage/appimagekit/wiki/Bundling-Qt-apps This section provides direct URLs for downloading specific Qt 5.5.1 binary packages for Linux x64, including essentials, addons, ICU, and various modules like QtPositioning, Qt3D, and QtWebEngine. ```text ############################################################################################################ # http://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt5_55/Updates.xml ############################################################################################################ # qt.55.gcc_64 http://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt5_55/qt.55.gcc_64/5.5.1-0qt5_essentials.7z http://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt5_55/qt.55.gcc_64/5.5.1-0qt5_addons.7z http://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt5_55/qt.55.gcc_64/5.5.1-0icu-linux-g++-Rhel6.6-x64.7z http://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt5_55/qt.55.gcc_64/5.5.1-0qt5_qtpositioning.7z # qt.55.qt3d.gcc_64 http://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt5_55/qt.55.qt3d.gcc_64/5.5.1-0qt5_qt3d.7z # qt.55.qtcanvas3d.gcc_64 http://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt5_55/qt.55.qtcanvas3d.gcc_64/5.5.1-0qt5_qtcanvas3d.7z # qt.55.qtlocation.gcc_64 http://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt5_55/qt.55.qtlocation.gcc_64/5.5.1-0qt5_qtlocation.7z # qt.55.qtquick1.gcc_64 http://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt5_55/qt.55.qtquick1.gcc_64/5.5.1-0qt5_qtquick1.7z # qt.55.qtquickcontrols.gcc_64 http://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt5_55/qt.55.qtquickcontrols.gcc_64/5.5.1-0qt5_qtquickcontrols.7z # qt.55.qtscript.gcc_64 http://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt5_55/qt.55.qtscript.gcc_64/5.5.1-0qt5_qtscript.7z # qt.55.qtwebengine.gcc_64 http://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt5_55/qt.55.qtwebengine.gcc_64/5.5.1-0qt5_qtwebengine.7z ``` -------------------------------- ### Download and Make AppImageTool Executable Source: https://github.com/appimage/appimagekit/wiki/Bundling-.NET-Core-apps Download the AppImageKit tool and grant it execute permissions. ```bash wget "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage" chmod a+x appimagetool-x86_64.AppImage ``` -------------------------------- ### Build Mono App with mkbundle.exe for AppImage Source: https://github.com/appimage/appimagekit/wiki/Bundling-Mono-apps This script demonstrates a comprehensive build process for a Mono application (MatterControl) to be packaged as an AppImage. It includes setting up the Mono environment, restoring dependencies, building the solution, and using `mkbundle.exe` to create native executables from .NET assemblies. ```bash #!/bin/bash # Run this on the oldest still-supported distribution, # e.g., a Docker container with Ubuntu 14.04 sudo apt-get update sudo apt-get install -y apt-transport-https ca-certificates git wget sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF echo "deb https://download.mono-project.com/repo/ubuntu stable-trusty main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list sudo apt-get update sudo apt-get -y install mono-complete nuget gcc git clone --recursive https://github.com/MatterHackers/MatterControl.git cd MatterControl/ nuget restore MatterControl.sln sed -i -e 's|Directory.SetCurrentDirectory|// Directory.SetCurrentDirectory|g' Program.cs # https://github.com/MatterHackers/MatterControl/issues/3536#issuecomment-406704443 xbuild /p:Configuration=Release MatterControl.sln cd ./bin/Release/ cp -r ../../StaticData/ . /usr/lib/mono/4.5/mkbundle.exe MatterSlice.exe --deps -L /usr/lib/mono/4.5/ -o MatterSlice cp MatterSlice.exe MatterSlice.dll # FIXME /usr/lib/mono/4.5/mkbundle.exe MatterControl.exe --deps -L /usr/lib/mono/4.5/ -L /usr/lib/mono/4.5/Facades/ -L /usr/lib/mono/4.5-api/ -o MatterControl mkdir -p appdir/usr/bin ; mv MatterSlice MatterControl StaticData appdir/usr/bin mkdir -p appdir/usr/share/applications/ ; cp ../../../mattercontrol.desktop appdir/usr/share/applications/ # FIXME mkdir -p appdir/usr/share/icons/hicolor/256x256/apps/ ; touch appdir/usr/share/icons/hicolor/256x256/apps/mattercontrol.png # FIXME wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" chmod a+x linuxdeployqt*.AppImage ; ./linuxdeployqt-*.AppImage --appimage-extract ; rm linuxdeployqt*.AppImage unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH ./squashfs-root/AppRun ./appdir/usr/share/applications/*.desktop -appimage -verbose=2 -executable=./appdir/usr/bin/MatterSlice #find ./appdir -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq # fyi ./*.AppImage --appimage-updateinformation # fyi ``` -------------------------------- ### Configure Mono Relocation with Environment Variables Source: https://github.com/appimage/appimagekit/wiki/Bundling-Mono-apps Set these environment variables to ensure Mono uses the correct paths when its installation is moved. Assumes the Mono installation is located at ${PKG_DIR}. ```bash export LD_LIBRARY_PATH=$PKG_DIR/lib64:$PKG_DIR/lib:$LD_LIBRARY_PATH export LD_RUN_PATH=$LD_LIBRARY_PATH export PKG_CONFIG_PATH=$PKG_DIR/lib64/pkgconfig:$PKG_CONFIG_PATH export MONO_GAC_PREFIX=${PKG_DIR} export MONO_PATH=${PKG_DIR}/lib/mono/4.0:${PKG_DIR}/lib/mono/3.5:${PKG_DIR}/lib/mono/2.0:${PKG_DIR}/lib/mono/compat-2.0 export MONO_CONFIG=${PKG_DIR}/etc/mono/config export MONO_CFG_DIR=${PKG_DIR}/etc export C_INCLUDE_PATH=${PKG_DIR}/include export ACLOCAL_PATH=${PKG_DIR}/share/aclocal export FONTCONFIG_PATH=${PKG_DIR}/etc/fonts export XDG_DATA_HOME=${PKG_DIR}/etc/fonts export MONO_REGISTRY_PATH=~/.mono/registry ``` -------------------------------- ### AppDir Directory Structure Source: https://github.com/appimage/appimagekit/wiki/AppDir Illustrates the basic file and directory layout for an AppDir, including the AppRun entry point, desktop file, icon, and the usr directory containing executables and libraries. ```text AppDir └── AppRun └── your_app.desktop └── your_app.png └── usr ├── bin │   └── your_app ├── lib └── share ├── applications │   └── your_app.desktop └── icons └── └── └── your_app.png ``` -------------------------------- ### Add Steam Repository and Install Source: https://github.com/appimage/appimagekit/wiki/Bundling-Steam This command adds the Steam repository and attempts to install the steam-launcher package, which might be equivalent to the extracted .deb contents. It also lists potential dependencies. ```bash deb [arch=amd64,i386] http://repo.steampowered.com/steam/ precise steam apt-get install steam-launcher # seems to be the same as the above ``` -------------------------------- ### Set Executable and Create Desktop Entry Source: https://github.com/appimage/appimagekit/wiki/Bundling-Dropbox Renames the Dropbox daemon to AppRun and creates a .desktop file for the application. ```bash mv dropboxd AppRun cat > dropbox.desktop < AppRun <<\EOF #!/bin/bash HERE="$(dirname "$(readlink -f "${0}")")" if [ -L /tmp/ld-linux.so.2 ] ; then echo "Cannot run due to existing symlinks in /tmp (FIXME)" exit 1 fi LOC=$(readlink -f "$HERE"/usr/tmp/) ( cd /tmp ; ln -s "$LOC"/{lib,i386-linux-gnu,ld-linux.so.2} . ) if [ -z "$1" ] ; then "$HERE"/usr/bin/wine winecfg else "$HERE"/usr/bin/wine "$@" fi sleep 10 # Workaround for: libgcc_s.so.1 must be installed for pthread_cancel to work rm /tmp/lib /tmp/i386-linux-gnu /tmp/ld-linux.so.2 EOF chmod +x AppRun ``` -------------------------------- ### Dockerfile for Building AppImage Source: https://github.com/appimage/appimagekit/wiki/Docker-Hub-Travis-CI-Workflow A Dockerfile that uses a CentOS 6 base image and executes scripts to install dependencies and build the AppImage. It separates dependency installation from the main build process to leverage Docker's caching mechanism. ```dockerfile FROM centos:6 ADD Recipe.deps /Recipe.deps RUN bash -ex Recipe.deps ADD Recipe /Recipe RUN bash -ex Recipe ``` -------------------------------- ### Download and Extract JDK and AppImage Tools Source: https://github.com/appimage/appimagekit/wiki/Bundling-Java-apps Download the necessary AdoptOpenJDK Openj9 JDK and AppImageKit tools. Ensure the AppImage is executable. ```bash wget -c https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.3%2B7_openj9-0.14.3/OpenJDK11U-jdk_x64_linux_openj9_11.0.3_7_openj9-0.14.3.tar.gz tar xf OpenJDK11U-jdk_x64_linux_openj9_11.0.3_7_openj9-0.14.3.tar.gz wget -c https://github.com/bengtmartensson/harctoolboxbundle/releases/download/ci-build/IrScrutinizer-1.4.3-SNAPSHOT-x86_64.AppImage ``` ```bash chmod +x appimagetool-x86_64.AppImage ``` -------------------------------- ### Isolate Python Modules in AppDir Source: https://github.com/appimage/appimagekit/wiki/Bundling-Python-apps Modify sitecustomize.py to ensure Python modules are loaded only from within the AppDir, preventing conflicts with system Python installations. ```python import sys,os prefix = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(sys.path[0])))) sys.path = [ prefix+s for s in sys.path if not s.startswith(prefix) ] ``` -------------------------------- ### Pull and Run CentOS Docker Image Source: https://github.com/appimage/appimagekit/wiki/Docker-Hub-Travis-CI-Workflow Use these commands to pull a CentOS 6 Docker image and start an interactive shell within the container. ```bash docker pull centos:6 docker run -i -t centos:6 /bin/bash ``` -------------------------------- ### Create AppRun Script for AppImage Source: https://github.com/appimage/appimagekit/wiki/Bundling-.NET-Core-apps Define the AppRun script, which sets up the environment and executes the main application binary within the AppImage. ```bash #!/bin/sh HERE="$(dirname "$(readlink -f "${0}")")" export PATH="${HERE}"/usr/bin/:"${PATH}" EXEC=$(grep -e '^Exec=.*' "${HERE}"/*.desktop | head -n 1 | cut -d "=" -f 2 | cut -d " " -f 1) exec "${EXEC}" $@ ``` -------------------------------- ### Get Script Directory in Shell Source: https://github.com/appimage/appimagekit/wiki/Bundling-shell-scripts Use this snippet to obtain the absolute path of the directory where the shell script is located. This is crucial for making scripts relocateable. ```bash #!/bin/sh HERE=$(dirname $(readlink -f "${0}")) echo "${HERE}" ```