2

I am having a TON of trouble deploying an application for Linux on Qt. I know there are a ton of articles on it, but I just feel like everyone is out to get you more confused, and that's why I am here. I have tried a few things, as I will explain below.

First, I just Googled "deploy qt application linux" and ended up with this article that is suppose to make your life so much easier, which it doesn't. I downloaded that LSB SDK, and then tried running the install.sh, but of course ended up with an error:

error: could not find configuration

It is also clearly there, as there is a inst-config in the same directory, and if I view that install.sh script I see that that's what it checks:

if [ \! -e ./inst-config ]; then
echo "error: could not find configuration" >&2
exit 1
fi

I tried editing that path to the direct location, it got passed that error, but just led to more errors with it so I decided that wasn't the easiest way to go.


Next I went to Nokia directly, where I found this article. I read a little, and I saw it was asking if I wanted to build statically or dynamically. All I want is a working application the easiest way, so I figured that Shared Library is easiest because on Windows all I need to do is open Dependency Walker and drag a few DLLs with the application. Of course, this wasn't the case.

One thing that has annoyed me most, is throughout the tutorial it refrences:

path/to/qt

Where I cannot seem to find correctly. I found this path:

/usr/share/qt4

But it obviously wasn't correct, as it doesn't even have an 'examples' folder, as the tutorial says to use "plugandpaint" which is located in there.

I am a very, very new user to Linux, and I am on the latest version of Ubuntu. I don't know much about Linux, and I guess that's why I am here, even though it seems that deploying applications on Qt are just impossible. Thanks.

hetelek
  • 3,776
  • 5
  • 35
  • 56
  • What is your problem exactly? Did you install Qt? Did you get your app built? Is it failing to compile or to run? – Mat May 27 '12 at 18:46
  • When running through Qt Creator, all is good. I debugged it, fixed bugs, and now I'm ready to release/distribute it to people. – hetelek May 27 '12 at 18:47
  • Yes, and what exact problem are you having doing so? What distros are you targeting? Are you going to release sources? Binaries? Both? You're not showing a specific problem in this question, so it's a bit hard to tell you what to do to fix it, and "Packaging an app on Linux" is a **very** broad question - each distro has its favorite packaging ecosystem. – Mat May 27 '12 at 18:52
  • I want it to be ran on Ubuntu, if that's what you're asking. Also, I am releasing both the source, and binaries. I actually have it on GitHub already if that would clear things up: https://github.com/hetelek/XDBF-Manager/downloads – hetelek May 27 '12 at 18:55
  • 1
    Ok, so what _specific_ problem do you have? What are you currently doing that is failing? – Mat May 27 '12 at 18:58
  • To be honest, I am just clueless on what to do. I tried the LSB, and it through the error saying that it can't find the config file. And then Nokia's tutorial is just confusing because I don't know where my Qt is installed. How could I find that? Also, thanks for bearing with me. – hetelek May 27 '12 at 19:00
  • Did you follow any of this https://wiki.ubuntu.com/PackagingGuide/QtApplication ? – Mat May 27 '12 at 19:01
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/11799/discussion-between-hetelek-and-mat) – hetelek May 27 '12 at 19:24

2 Answers2

1

If you have problems finding the dynamic libraries of Qt, they can be installed in two possible locations:

  • /usr/lib for the non-multiarchitecture versions (e.g. Ubuntu 11.04), and
  • /usr/lib/x86_64-linux-gnu/ for the multiarchitecture ones (e.g. Ubuntu 11.10).

Search those folders and look at the file names for some libQt....so filename pattern.

felixgaal
  • 2,403
  • 15
  • 24
1

It seems to me that the OP is asking about distributing the app. If this is the case, you may want to have a read here: https://wiki.ubuntu.com/PackagingGuide/Complete.

Alternatively, here is a more quick and dirty guide: http://ubuntuforums.org/showthread.php?t=910717.

The idea is that you will put your application into the .deb archive and specify all the dependencies. The user of the program will then have their package manager download everything they need to run it. With Linux, you don't have to worry about supplying all the libraries yourself if they are in the repositories.

If you want to double-check what libraries your program is using, you can run the ldd command on the binary, or strace if you need a lot of details.

One thing that you have to keep in mind is that different distributions on Linux have different packaging systems. By far the most popular are DEB (Ubuntu, Debian) and RPM (Fedora, Mandriva, OpenSUSE), but there are also systems that distribute tgz files. Typically if you release software for all these distros you want to write a shell script that will run through the steps of generating all the packages your are interested in.

MrFox
  • 1,244
  • 1
  • 11
  • 24