通过单一配置生成适用于Linux,Windows和MacOSX的安装程序的应用程序 [英] Application to generate installers for Linux, Windows and MacOSX from a single configuration
问题描述
这就是我想要的:
给出一组定义(最好在Python中),以定义要在何处安装什么文件以及要运行什么后安装脚本等.我希望该程序为三个主要平台生成安装程序:
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:
- Windows上的MSI
- 在MacOSX上为dmg
- 在Linux上具有install.sh(以及rpm/deb,如果可能的话)的棒球
例如,
installconfig.py:
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():
...
我希望该程序生成Foo-1.0.x86.msi,Foo-1.0.universal.dmg和Foo-1.0-linux-x86.tar.gz.
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.
您明白了.是否存在这样的程序? (它可以在后台使用Windows上的WiX.)
You get the idea. Does such a program exist? (It could, under the hood, make use of WiX on Windows).
注意1 :Foo
可以是用任何编程语言编写的应用程序.没关系.
NOTE 1: Foo
can be an application written in any programming language. That should not matter.
注意2 :特定于平台的内容应该是可能的.例如,我应该能够在Windows上指定合并模块.>
NOTE 2: Platform-specific things should be possible. For example, I should be able to specify merge modules on Windows.
推荐答案
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
这篇关于通过单一配置生成适用于Linux,Windows和MacOSX的安装程序的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!