Application to generate installers for Linux, Wind

2019-04-14 01:40发布

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.

3条回答
相关推荐>>
2楼-- · 2019-04-14 02:20

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

查看更多
欢心
3楼-- · 2019-04-14 02:21

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.

查看更多
SAY GOODBYE
4楼-- · 2019-04-14 02:22

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.

查看更多
登录 后发表回答