-
Notifications
You must be signed in to change notification settings - Fork 415
Home
Willkommen • Welcome • 歡迎 • Bienvenue • Benvenuto • Bienvenido • ようこそ • Mabuhay • Välkommen • أهلا وسهلا • добро пожаловать • Merhaba
linuxdeployqt
makes Linux applications self-contained by copying in the Qt libraries and plugins that the application uses. If you find bugs, please report them to GitHub Issues or, even better, send a Pull Request.
Some examples on how to bundle real-world Qt 5 based applications from GitHub using linuxdeployqt
. Note that many projects do this as part of their continuous build pipeline, e.g., on each push to GitHub, using Travis CI. For those, see the examples given in README.md.
# Compile LibrePCB as usual
git clone --recursive https://github.com/LibrePCB/LibrePCB.git && cd LibrePCB
qmake -r ../librepcb.pro
sudo apt-get install libglu1-mesa-dev openssl zlib1g zlib1g-dev
make -j 8
# Copy into AppDir FHS-like stucture
mkdir -p LibrePCB.AppDir/usr
cp -r generated/unix LibrePCB.AppDir/usr/bin
cp -r generated/{lib,share} LibrePCB.AppDir/usr/
# Get and run linuxdeployqt
wget -c https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage
chmod a+x linuxdeployqt-continuous-x86_64.AppImage
# Create AppImage using linuxdeployqt
./linuxdeployqt-continuous-x86_64.AppImage ./LibrePCB.AppDir/usr/bin/librepcb
( cd LibrePCB.AppDir/ ; cp ./usr/share/applications/librepcb.desktop . )
( cd LibrePCB.AppDir/ ; cp ./usr/share/pixmaps/librepcb.svg . )
export VERSION=$(git rev-list --count HEAD).$(git describe --tags | cut -d - -f 3)
./linuxdeployqt-continuous-x86_64.AppImage ./LibrePCB.AppDir/usr/bin/librepcb -appimage
# Success!
ls -lh LibrePCB*AppImage
# -rwxr-xr-x 1 me me 31M Feb 19 15:34 LibrePCB-864.gf0d32a2-x86_64.AppImage
Note that no wrapper script, no LD_LIBRARY_PATH
, and no qt.conf
file are used.
# Compile as usual
git clone https://github.com/fathomssen/redtimer.git
cd redtimer
git submodule update --init
qmake -r
make -j 4
# Create AppDir and start populating
mkdir -p appdir/usr/bin
cp gui/redtimer appdir/usr/bin/
cp ./.travis/redtimer.desktop appdir/
cp gui/icons/clock_red.svg appdir/redtimer.svg
# Deploy to AppDir
wget -c https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage
chmod a+x linuxdeployqt-continuous-x86_64.AppImage
./linuxdeployqt-continuous-x86_64.AppImage appdir/usr/bin/redtimer -qmldir=gui/
# Generate AppImage
./linuxdeployqt-continuous-x86_64.AppImage appdir/usr/bin/redtimer -qmldir=gui/ -appimage
# Result is ./RedTimer-x86_64.AppImage
Note that some fine-tuning may be needed, such as properly copying icons and other resources into the AppDir manually. Also note that no wrapper script, no LD_LIBRARY_PATH
, and no qt.conf
file are used.
Minimal Qt deployment test application for Linux, Windows and macOS.
linuxdeployqt -- Software packaging for Linux made simple! ❤️
Linuxdeployqt is the one-in-all solution for packaging application. If it doesn't do the job, we consider it a bug of the software. Please open an issue and suggest your idaes!
Support our mission for a revolution of the Linux desktop and application deployment therefore! Visit http://appimage.org for more information on AppImage, related technologies, user and open source project lead voices, and examples!