How can I create the application bundle in Linux?
-
Hello,
I am using Ubuntu 18.04 and Qt 5.13.1.
I am able to compile application, and it is run perfectly from Qt creator.
if I will trying to run from output then it is giving me error because of executable file is not able to find dependency.executable file name:
SquidStat
dependency name:libqtcsv.so.1
Location
of executable and dependency files are at same directory.Here the output of
~/Desktop/Application Bundle/_SquidStat$ ldd SquidStat
./SquidStat: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.13' not found (required by ./SquidStat) linux-vdso.so.1 (0x00007ffcd6ffd000) libqtcsv.so.1 => not found libSquidstatLibrary.so.1 => not found libqwt.so.6 => not found libhidapi-libusb.so.0 => /usr/local/lib/libhidapi-libusb.so.0 (0x00007fad82d15000) libQt5Widgets.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 (0x00007fad824ce000) libQt5Gui.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5 (0x00007fad81d65000) libQt5SerialPort.so.5 => not found libQt5Core.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 (0x00007fad8161a000) libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fad81291000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fad80ef3000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fad80cdb000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fad808ea000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fad806e2000) libusb-1.0.so.0 => /lib/x86_64-linux-gnu/libusb-1.0.so.0 (0x00007fad804ca000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fad802ab000) libGL.so.1 => /usr/lib/x86_64-linux-gnu/libGL.so.1 (0x00007fad8001f000) libpng16.so.16 => /usr/lib/x86_64-linux-gnu/libpng16.so.16 (0x00007fad7fded000) libharfbuzz.so.0 => /usr/lib/x86_64-linux-gnu/libharfbuzz.so.0 (0x00007fad7fb4f000) libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fad7f932000) libicui18n.so.60 => /usr/lib/x86_64-linux-gnu/libicui18n.so.60 (0x00007fad7f491000) libicuuc.so.60 => /usr/lib/x86_64-linux-gnu/libicuuc.so.60 (0x00007fad7f0da000) libdouble-conversion.so.1 => /usr/lib/x86_64-linux-gnu/libdouble-conversion.so.1 (0x00007fad7eec9000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fad7ecc5000) libglib-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007fad7e9ae000) /lib64/ld-linux-x86-64.so.2 (0x00007fad839e8000) libudev.so.1 => /lib/x86_64-linux-gnu/libudev.so.1 (0x00007fad7e790000) libGLX.so.0 => /usr/lib/x86_64-linux-gnu/libGLX.so.0 (0x00007fad7e55f000) libGLdispatch.so.0 => /usr/lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007fad7e2a9000) libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007fad7dff5000) libgraphite2.so.3 => /usr/lib/x86_64-linux-gnu/libgraphite2.so.3 (0x00007fad7ddc8000) libicudata.so.60 => /usr/lib/x86_64-linux-gnu/libicudata.so.60 (0x00007fad7c21f000) libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007fad7bfad000) libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007fad7bc75000) libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007fad7ba4d000) libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007fad7b849000) libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007fad7b643000) libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007fad7b42e000)
which approach is better to inform executable file where to search dependency?
-
define the path w.r.t to executable using
rpath
and$ORIGIN
.
if this is better then?
How to I write the rpath for SquidStat(executable file)?
-
SquidStat application is find all qt library from
libQt5Core.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
.
if this is better then?
How can I set my all dependent library of my application at /usr/lib/ similar like qt application did while installing?
-
-
There's a ticket associated with that warning that explains why it's there and how you can continue anyway.
-
Hi,
Depending on your end goal the linuxdeployqt project might be of interest.
-
Thank you for quick response. I tried that tool but it may not support the new Ubuntu 18.04. I am not sure but I am getting error like below.
~/Desktop/Application Bundle$ ./linuxdeployqt-6-x86_64.AppImage linuxdeployqt 5 (commit 37631e5), build 631 built on 2019-01-25 22:47:58 UTC ERROR: The host system is too new. Please run on a system with a glibc version no newer than what comes with the oldest still-supported mainstream distribution, which currently is glibc 2.20. This is so that the resulting bundle will work on most still-supported Linux distributions. For more information, please see https://github.com/probonopd/linuxdeployqt/issues/340
-
There's a ticket associated with that warning that explains why it's there and how you can continue anyway.
-
Thank you @SGaist for reply. I am able to collect all Qt libraries with help of CQtDeployer tool. I used CQTDeployer from
https://github.com/QuasarApp/CQtDeployer
.it is lunch application by calling below script from terminal.
SquidStat.sh contain:
#!/bin/sh BASE_DIR=$(dirname "$(readlink -f "$0")") export LD_LIBRARY_PATH="$BASE_DIR"/lib:"$BASE_DIR":$LD_LIBRARY_PATH export QML_IMPORT_PATH="$BASE_DIR"/qml:QML_IMPORT_PATH export QML2_IMPORT_PATH="$BASE_DIR"/qml:QML2_IMPORT_PATH export QT_PLUGIN_PATH="$BASE_DIR"/plugins:QT_PLUGIN_PATH export QTDIR="$BASE_DIR" export QT_QPA_PLATFORM_PLUGIN_PATH="$BASE_DIR"/plugins/platforms:QT_QPA_PLATFORM_PLUGIN_PATH "$BASE_DIR"/bin/SquidStat "$@"
is it any way to to create the SquidStat.sh somthing like binary executable. So that user can just create double click on executable and it is open application instead of calling script from terminal.
Here my file tree.
.
├── bin
│ ├── elements
│ │ ├── libConstantCurrentAdv.so
│ │ ├── libConstantCurrent.so
│ │ ├── libConstantPotentialAdv.so
│ │ ├── libConstantPotential.so
│ │ ├── libConstantPower.so
│ │ ├── libConstantResistance.so
│ │ ├── libCyclicVoltammetryElement.so
│ │ ├── libDCCurrentSweep.so
│ │ ├── libDCPotentialSweep.so
│ │ ├── libDiffPulseVoltammetry_galv.so
│ │ ├── libDiffPulseVoltammetry.so
│ │ ├── libEISGalvanostatic.so
│ │ ├── libEISPotentiostatic.so
│ │ ├── libMaxPower.so
│ │ ├── libNormalPulseVoltammetry_galv.so
│ │ ├── libNormalPulseVoltammetry.so
│ │ ├── libOpenCircuit.so
│ │ └── libSqrWaveVoltammetry_element.so
│ ├── prebuilt
│ │ ├── libBatteryCapacity.so
│ │ ├── libChargeDischarge1.so
│ │ ├── libChargeDischarge2.so
│ │ ├── libChargeDischarge3AC_galv.so
│ │ ├── libChargeDischarge4.so
│ │ ├── libChronoamperometry.so
│ │ ├── libChronopotentiometry.so
│ │ ├── libConstantPower.so
│ │ ├── libConstantResistance.so
│ │ ├── libCyclicVoltammetry.so
│ │ ├── libDiffPulseVoltammetry.so
│ │ ├── libEISGalvanostatic.so
│ │ ├── libEISPotentiostatic.so
│ │ ├── libGITT.so
│ │ ├── libLinearSweepVoltammetry.so
│ │ ├── libMottSchottky.so
│ │ ├── libNormalPulseVoltammetry.so
│ │ ├── libOpenCircuit.so
│ │ ├── libPITT.so
│ │ ├── libSqrWaveVoltammetry.so
│ │ └── libStaircaseVoltammetry.so
│ └── SquidStat
├── lib
│ ├── libhidapi-libusb.so.0
│ ├── libicudata.so.56
│ ├── libicui18n.so.56
│ ├── libicuuc.so.56
│ ├── libQt5Core.so.5
│ ├── libQt5DBus.so.5
│ ├── libQt5EglFSDeviceIntegration.so.5
│ ├── libQt5Gui.so.5
│ ├── libQt5Network.so.5
│ ├── libQt5OpenGL.so.5
│ ├── libQt5PrintSupport.so.5
│ ├── libQt5SerialPort.so.5
│ ├── libQt5Svg.so.5
│ ├── libQt5WaylandClient.so.5
│ ├── libQt5Widgets.so.5
│ ├── libQt5XcbQpa.so.5
│ ├── libqtcsv.so.1
│ ├── libqwt.so.6
│ └── libSquidstatLibrary.so.1
├── plugins
│ ├── iconengines
│ │ └── libqsvgicon.so
│ ├── imageformats
│ │ ├── libqgif.so
│ │ ├── libqicns.so
│ │ ├── libqico.so
│ │ ├── libqjpeg.so
│ │ ├── libqsvg.so
│ │ ├── libqtga.so
│ │ ├── libqtiff.so
│ │ ├── libqwbmp.so
│ │ └── libqwebp.so
│ ├── platforms
│ │ ├── libqeglfs.so
│ │ ├── libqlinuxfb.so
│ │ ├── libqminimalegl.so
│ │ ├── libqminimal.so
│ │ ├── libqoffscreen.so
│ │ ├── libqvnc.so
│ │ ├── libqwayland-egl.so
│ │ ├── libqwayland-generic.so
│ │ ├── libqwayland-xcomposite-egl.so
│ │ ├── libqwayland-xcomposite-glx.so
│ │ └── libqxcb.so
│ ├── printsupport
│ │ └── libcupsprintersupport.so
│ └── xcbglintegrations
│ ├── libqxcb-egl-integration.so
│ └── libqxcb-glx-integration.so
├── SquidStat.desktop
├── Squidstat.png
├── SquidStat.sh
└── translations
├── qtbase_ar.qm
├── qtbase_bg.qm
├── qtbase_ca.qm
├── qtbase_cs.qm
├── qtbase_da.qm
├── qtbase_de.qm
├── qtbase_en.qm
├── qtbase_es.qm
├── qtbase_fi.qm
├── qtbase_fr.qm
├── qtbase_gd.qm
├── qtbase_he.qm
├── qtbase_hu.qm
├── qtbase_it.qm
├── qtbase_ja.qm
├── qtbase_ko.qm
├── qtbase_lv.qm
├── qtbase_pl.qm
├── qtbase_ru.qm
├── qtbase_sk.qm
├── qtbase_uk.qm
├── qtbase_zh_TW.qm
├── qtserialport_de.qm
├── qtserialport_en.qm
├── qtserialport_es.qm
├── qtserialport_ja.qm
├── qtserialport_ko.qm
├── qtserialport_pl.qm
├── qtserialport_ru.qm
└── qtserialport_uk.qmmy SquidStat.desktop containe:
[Desktop Entry] Version=1.0 Encoding=UTF-8 Type=Application Name=Squidstat Comment=Squidstat NoDsiplay=true Exec=SquidStat.sh Icon=Squidstat.png Name[en_US]=SquidStat.desktop
any one give me direction for creating custom launcher from SquidStat.sh?
I am trying to achieve:
whenever user will install the application bundle then application can install at give location and popup in while search.