Application to generate installers for Linux, Windows and MacOSX from a single configuration

ε祈祈猫儿з 提交于 2019-12-06 09:49:42

问题


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.


回答1:


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




回答2:


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.




回答3:


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.



来源:https://stackoverflow.com/questions/1430497/application-to-generate-installers-for-linux-windows-and-macosx-from-a-single-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!