views:

186

answers:

6

Hi,

I'm developing a small cross-platform application and I need some advice on how to install it in Linux. I am using InnoSetup in Windows and an application bundle in OSX but I have no idea how to get my app installed in Linux, are there any opensource installer creators for Linux?

Thanks.

+7  A: 

The standard all mighty universally available installer on *nix systems (and not only) is Autotools.

# the user will install like so:
./configure --with-stuff
make # if package is from source
make install

You can also provide distribution specific installers like a RPM on RedHat or CentOS or deb for Debian, Ubuntu, although once you have the Makefile spitted by Autotools, making these is a breeze.

# the user will install like so:
yum install your-package-1.0.rpm # on redhat or
apt-get install your-package-1.0.deb # on debian

Autotools also known as "the GNU build system" is a little scary on the first sight, and the new user is puzzled when meeting things like the ancient m4 macro system & co. but nota bene this is the way most people do it and is pretty easy once you get the hang of it.

Learning resources

clyfe
Just write a clean `autotools` setup, and let the distribution folks figure out the rest for their needs for the time being.
honk
+1 for autotools; it just takes a little bit of expertise to use autotools.Here's a link: http://www.lrde.epita.fr/~adl/dl/autotools.pdf
rmk
@rmk I wanted to put that pdf in my answer but couldn't find it.
clyfe
Thanks for the details. I was under the impression that I would have to distribute source with autotools which is not something I want to do but I'll have a read of the PDF. Thanks
+1  A: 

Write a really robust makefile! or use CMake

Hortinstein
+1  A: 

If possible, opt for not requiring an installer but using a simple extract-and-run approach. This will allow the user to put the file(s) anywhere they want and run it.

But, you do have other options, such as:

  1. Using autoconf,
  2. Using CMake,
  3. Using a Java installer like IZPack
  4. etc
Kaleb Pederson
+2  A: 

Take a look at InstallJammer. You can write a single project for both your Windows and your Linux installer, and the Mac support is coming very soon.

Damon
I'm looking at InstallJammer at the moment, it looks very promising so far! Thanks.
A: 

I started writing unistall for situations when you had to install binary packages on a variety of distros.

It attempts to do a few things:

  • Realize the OS type and package manager, allowing you to use the system package manager to pull in any dependencies that your program might require. For instance, it will know to use apt-get install libncurses5-dev if using debian/ubuntu, yum install libncurses-devel if using RHEL/Fedora/CentOS
  • Understand what mechanism is used to update init, if needed
  • Create a safe un-installer
  • Work on any shell (bash, dash, zsh, pdksh, busybox ash, etc)

I leave the repo up because its full of useful bits, however I quickly gave up on the idea of an install sheild type program for Linux distributions. You'll find that its much, much better to produce installable packages for .deb , .rpm and (possibly) slackware .tgz formats.

This can be integrated into your build system using a tool like checkinstall. Note, the packages that checkinstall generates are not always perfect, according to strict lint guidelines set out by Debian and others, however the packages work just fine.

The best installation experience you can provide a user is allowing them to install (and update) your software using their native package manager.

Tim Post
A: 

You may want to take a look at our tool InstallBuilder. It is commercial, but allows you to create self-contained installers, RPM and DEB packages

Daniel Lopez