Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to bundle an application for Linux

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.

like image 775
trojanfoe Avatar asked Apr 26 '11 08:04

trojanfoe


2 Answers

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.
like image 130
Noufal Ibrahim Avatar answered Sep 18 '22 21:09

Noufal Ibrahim


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.

like image 20
Ignacio Vazquez-Abrams Avatar answered Sep 20 '22 21:09

Ignacio Vazquez-Abrams