Skip to content

Makes Linux applications self-contained by copying in the Qt libraries and plugins that the application uses.

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENSE.GPLv3
Unknown
LICENSE.LGPLv3
Notifications You must be signed in to change notification settings

carlos22/linuxdeployqt

 
 

Repository files navigation

linuxdeployqt Build Status discourse Gitter irc

This Linux Deployment Tool for Qt, linuxdeployqt, takes an application as input and makes it self-contained by copying in the Qt libraries and plugins that the application uses into a bundle. This can optionally be put into an AppImage, and, using fpm, into cross-distro deb and rpm packages.

Differences to macdeployqt

This tool is conceptually based on the Mac Deployment Tool, macdeployqt in the tools applications of the Qt Toolkit, but has been changed to a slightly different logic and other tools needed for Linux.

  • Instead of an .app bundle for macOS, this produces an AppDir for Linux
  • Instead of a .dmg disk image for macOS, this produces an AppImage for Linux which is quite similar to a dmg but executes the contained application rather than just opening a window on the desktop from where the application can be launched

Known issues

This may not be fully working yet. See GitHub Issues for known issues. Use with care, run with maximum verbosity, submit issues and pull requests. Help is appreciated.

Installation

Please download linuxdeployqt-x86_64.AppImage from the Releases page and chmod a+x it. If you would like to build linuxdeployqt from source instead, see BUILDING.md.

Usage

Open in Qt Creator and build your application. Run it from the command line and inspect it with ldd to make sure the correct libraries from the correct locations are getting loaded, as linuxdeployqt will use ldd internally to determine from where to copy libraries into the bundle.

Important: linuxdeployqt deploys the Qt instance that qmake on the $PATH points to, so make sure that it is the correct one. Verify that qmake finds the correct Qt instance like this before running the linuxdeployqt tool:

qmake -v

QMake version 3.0
Using Qt version 5.7.0 in /tmp/.mount_QtCreator-5.7.0-x86_64/5.7/gcc_64/lib

If this does not show the correct path to your Qt instance that you want to be bundled, then adjust your $PATH to find the correct qmake.

Before running linuxdeployqt it may be wise to delete unneeded files that you do not wish to distribute from the build directory. These may be autogenerated during the build. You can delete them like so:

find $HOME/build-*-*_Qt_* \( -name "moc_*" -or -name "*.o" -or -name "qrc_*" -or -name "Makefile*" -or -name "*.a" \) -exec rm {} \;

Alternatively, you could use $DESTDIR.

Usage: linuxdeployqt app-binary [options]

Options:
   -verbose=<0-3>      : 0 = no output, 1 = error/warning (default), 2 = normal, 3 = debug
   -no-plugins         : Skip plugin deployment
   -appimage           : Create an AppImage
   -no-strip           : Don't run 'strip' on the binaries
   -bundle-non-qt-libs : Also bundle non-core, non-Qt libraries
   -executable=<path>  : Let the given executable use the deployed libraries too
   -qmldir=<path>      : Scan for QML imports in the given path
   -always-overwrite   : Copy files even if the target file exists

linuxdeployqt takes an application as input and makes it
self-contained by copying in the Qt libraries and plugins that
the application uses.

Contributing

These are my first steps with Qt and with C++ for that matter, and it is still very young, so I'd appreciate your testing, comments, and (ideally) code review. Please discuss in the forum or using GitHub issues and pull requests.

Projects using linuxdeployqt

These projects are already using Travis CI and linuxdeployqt to provide AppImages of their builds:

This project is already using linuxdeployqt in a custom Jenkins workflow:

These projects are already using linuxdeployqt:

This project on GitLab uses linuxdeployqt:

These can be bundled successfully using linuxdeployqt:

About

Makes Linux applications self-contained by copying in the Qt libraries and plugins that the application uses.

Resources

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENSE.GPLv3
Unknown
LICENSE.LGPLv3

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 87.5%
  • Shell 6.3%
  • QML 3.7%
  • QMake 2.5%