Python:如何在从 setup.py 生成的 msi 安装程序中显示许可证文本

发布于 2024-10-06 09:09:35 字数 337 浏览 0 评论 0 原文

在 setup.py 中,对 setup 函数的调用可能如下所示:

setup(name="my_package",
      version="1.0",
      packages = ['pack1', 'pack2'],
      license = "We're all mad here"
)

我使用非常好的功能来生成 msi 安装程序:

python setup.py bdist_msi

有没有办法让许可证文本“We’re all mad here”显示在MSI 安装程序向导?

谢谢。

In setup.py the call to the setup function may look like this:

setup(name="my_package",
      version="1.0",
      packages = ['pack1', 'pack2'],
      license = "We're all mad here"
)

And I use the very nice feature to generate an msi installer:

python setup.py bdist_msi

Is there any way to get the license text "We're all mad here" to be displayed in the msi installer wizard?

thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

柠檬色的秋千 2024-10-13 09:09:35

乐观、详细的答案:您扩展distutils,基于bdist_msi。您可能需要创建一个新的 PyDialog< /a> (相当于) bdist_msi.添加_ui。我认为您必须将对话框添加到 UI 序列。最简单的对话框似乎是 准备对话框。了解msilib,它的Dialog 类以及“另请参阅”下的参考文献肯定会有所帮助。

现实的答案:你不会,除非你投入大量的精力。您使用另一种安装程序机制,编辑 MSI,找出一些涉及 .rtf 文件的技巧。但扩展 distutils 很难,扩展 bdist_msi 更难。

Optimistic, detailed answer: you extend distutils, creating a new command based on bdist_msi. You'll probably have to create a new PyDialog in (your equivalent to) bdist_msi.add_ui. I think you'll have to add your dialog to UI Sequences. The simplest dialog seems to be Prepare Dialog. Knowing your way around msilib, its Dialog class and the references under "See also" there would certainly help.

Realistic answer: you don't, not without investing considerable energy in it. You use another installer mechanism, you edit the MSI, you figure out some trick involving .rtf files. But extending distutils is hard, extending bdist_msi is harder.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文