views:

238

answers:

3

Here's what I want:

Given a set of definitions (preferably in Python) on what files to install where and what post-install script to run, etc.. I would like this program to generate installers for the three major platforms:

  • MSI on Windows
  • dmg on MacOSX
  • Tarball w/ install.sh (and rpm/deb, if possible) on Linux

For example,

installconfig.py:

name = 'Foo'
version = '1.0'

components = {
    'core': {'recursive-include': 'image/'
              'target_dir': '$APPDIR'}
    'plugins': {'recursive-include': 'contrib/plugins',
                 'target_dir': '$APPDIR/plugins'}
}

def post_install():
    ...

And I want this program to generate Foo-1.0.x86.msi, Foo-1.0.universal.dmg and Foo-1.0-linux-x86.tar.gz.

You get the idea. Does such a program exist? (It could, under the hood, make use of WiX on Windows).

NOTE 1: Foo can be an application written in any programming language. That should not matter.

NOTE 2: Platform-specific things should be possible. For example, I should be able to specify merge modules on Windows.

A: 

Your requirements are probably such that hand-rolling a make script to do these things is the order of the day. Or write it in python if you don't like make. It will be more flexible and probably faster than trying to learn some proprietary scripting language from some installer creator. Anything with a fancy gui and checkboxes and so on is unlikely to be able to automatically do anything rational on linux.

Paul McMillan
1) Actually I would like to have a *generic* application (written in Python) that does it. 2) As for Linux installer, it does not have to be a GUI installer; CLI installer (like that of ActivePython) is also fine.
Sridhar Ratnakumar
Speaking of Linux installers, automatically creating the deb repository that users can add to their /etc/apt/sources.list would be way cooler that I originally expected.
Sridhar Ratnakumar
So hand-roll your generic application to do it. Your specific requirements aren't likely to be exactly met by a commercial application.
Paul McMillan
A: 

perhaps paver can be made to meet your needs? you'd have to add the msi, dmg, tgz, etc parts as tasks using some external library, but i believe it can be done.

Autoplectic
+1  A: 

Look into CPack. It works very well with CMake, if you use that for your build system, but it also works without it. This uses CMake-type syntax, not Python, but it can generate NSIS installers, ZIP archives, binary executables on Linux, RPMs, DEBs, and Mac OS X bundles

thekidder