8

I am writing a (closed-source) application and will provide binaries for all three major platforms (MacOS X, Linux and Windows). It uses Qt under the LGPL license so I am required to dynamically link with the Qt libraries. I understand how to bundle the application for MacOS and Windows by simply providing the Qt dynamic library with the application, but I am unsure how to do this properly for Linux.

It's traditional to provide the application as a package (.deb and .rpm) and allow the package system to resolve the dependencies. Should use this method? If so which distros should I be aiming for (I am assuming Ubuntu and Fedora)? If anyone has any experience with this, I'd be interested in hearing it.

trojanfoe
  • 120,358
  • 21
  • 212
  • 242
  • 1
    Since this is closed source... I suggest you get a team member on board that has the required expertise. As it is, this question seems way to broad. And yes, _obviously_ you should use the distro's packaging system if you intend on getting any users – sehe Apr 26 '11 at 08:35
  • @sehe: You seem to imply that I cannot ask for help on stackoverflow unless I am providing an open source application? – trojanfoe Apr 26 '11 at 08:37
  • 1
    not quite, but close: I _am_ suggesting that it will be hard for me to actually help you since I'll not be able to get full disclosure on the details. As in: I can not actually whip up a package as a starting point, and I am not about to painstakingly interrogate you about details that I cannot readily see :) – sehe Apr 26 '11 at 08:40

3 Answers3

3

deb, rpm and tarballs are the right ways to go. There are a few non-standard ways that I know of which you might want to consider as well which are more distro agnostic.

  • Makeself - Self extracting shell scripts that contain your application. This is quite widely used by closed source software distributors.
  • ZeroInstall - useful for non-root installations.
  • Listaller - Merged with autoinstall and it seems to be unstable as of now.
Noufal Ibrahim
  • 71,383
  • 13
  • 135
  • 169
  • Thanks for the answer - I would obviously like to cut down the amount of work required as much as possible, so I will investigate these alternative options. – trojanfoe Apr 26 '11 at 09:24
  • 3
    You're welcome. The "solutions" are *very* non-standard so don't really sit well with Linux users in general. Nevertheless, they do exist. – Noufal Ibrahim Apr 26 '11 at 09:31
2

You need to provide at least 3 packages for Linux; a .deb for Debian-based systems, a .rpm for RPM-based systems, and a tarball for everything else. Some find it necessary to refine it to provide three or four different .rpm packages, for Fedora, SuSE, Mandriva, and RHEL, depending on the exact library requirements the software has.

Ignacio Vazquez-Abrams
  • 776,304
  • 153
  • 1,341
  • 1,358
  • That's useful, thank you. I imagine it can be difficult to maintain all the systems required to support all Linux variants. – trojanfoe Apr 26 '11 at 08:40
  • 1
    @trojanfoe: your saving grace will be that Qt is ubiquitously well-packaged, so you'll actually have way less work than if you wanted to distribute it with your app (and you won't have to run emergency updates in case someone fixes a security issue in Qt) – sehe Apr 26 '11 at 08:42
0

There are many ways to do so... but if you want a distribution generic way to bundle an application for Linux, you may check this ( http://codevarium.gameka.com.br/deploying-cc-linux-applications-supporting-both-32-bit-and-64-bit/ ) tutorial. It shows how to copy all the dependencies to a library folder and make a shell script to properly execute the bundle.

Igor Augusto
  • 362
  • 1
  • 3