-
-
Notifications
You must be signed in to change notification settings - Fork 573
Bundling Qt apps
probonopd edited this page Oct 11, 2015
·
24 revisions
Download Qt from http://download.qt.io/online/qtsdkrepository - apparently it is built in a distro-agnostic way, which is good. This can be used both for building (e.g., on travis-ci) and for bundling.
You would think that there is an easy way to install Qt binaries from upstream without the need for a GUI, but so far I have not found an easy way yet. Hence the somewhat harder way below.
Assuming that we want to unpack Qt to /home/me/5.5
, we can use:
# 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='/home/me/5.5/gcc_64/lib'
# This is a super cool trick to bundle all libraries that are not part of the build host base system
apt-get install pax-utils
# ALL libraries needed by this binary
lddtree 5.5/gcc_64/bin/designer | grep "=>" | awk '{print $3}'
# All libraries needed by this binary that are NOT part of /lib of the build system
lddtree 5.5/gcc_64/bin/designer | grep "=>" | awk '{print $3}' | grep -ve "^/lib"