views:

87

answers:

3

I have a closed-source Linux application that I want to distribute. This application is using wxWidgets/GTK so there is a huge list of shared libraries (60+) that this application depends on.

What is the prefered way to publish the application and support the maximum number of distros?

  • Is it to build the application for each supported distribution and publish them separately? This has the drawback of being complicated to build (a chroot and a build per distro) and will only work on supported distribution.

  • Is it to add all shared libraries in the installer and use them with the LD_LIBRARY_PATH env variable (like VMware)? This has the drawback of increasing the size of the installer.

  • Is it to build a completely static application? This is surely not possible as it will break some licenses.

  • Is it a mix of that or another option? How do most commercial vendors publish their own graphical (preferably GTK-based) application?

+2  A: 

In your installer, check which libraries are installed and then download the binaries for those which aren't.

For additional comfort of your users, if there is no connection to the Internet, have the installer generate a key which you can enter on your website to receive a ZIP archive which you can then feed to the installer.

For utmost comfort, check which libraries are available on the target distro and ask the user to use the standard admin tool to install them. That way, you won't pollute the computer with different versions of the same library.

That said: It might be smarter to put your valuable code into a link library and then provide that as binary blob in a source package. This way, your code is as protected as it would be in a pure binary and users can compile the glue code on their favorite system without you having to worry about stuff.

I mean: How much worth is the part of your code which sets up the UI? How much will you lose when someone steals that?

Aaron Digulla
+2  A: 
Esben Mose Hansen
Debian packages are quite likely to work on Ubuntu without modification.
Kristof Provost
You might find that your list of shared libraries is actually a lot shorter in package dependency form, since many may fall under a metapackage.
Jefromi
+2  A: 

You should have a look at the Linux Standard Base. It's designed specifically to help people in your position. It defines an environment that 3rd party application developers can rely upon - so there's set version of libc and other libraries, and certain programs and directories live in known places. All of the main Linux distribution support LSB.

That said, you should still probably package the result specifically for each major distribution - just so that your customers can manage your app with their familiar package management tools.

alex tingle