如何将许可证文本添加到cx_freeze bdist_msi? [英] how to add license text to cx_freeze bdist_msi?
问题描述
我有一个小型python应用程序,我想向cx_Freeze生成的MSI包中添加GNU GPL许可证文本。
I have a small python application and i want to add GNU GPL license text to MSI package, which cx_Freeze produces.
我使用带有bdist_msi选项的安装脚本:
I use this setup scrip, with bdist_msi option:
import sys
from cx_Freeze import setup, Executable
path = sys.path + ["app"]
build_exe_options = {
"path": path,
"icon": "resources\icons\clock.ico"}
base = None
if sys.platform == "win32":
base = "Win32GUI"
setup( name = "app",
version = "1.1",
description = "My Application",
options = {"build_exe": build_exe_options},
executables = [Executable("app.py", base=base,
targetName="app.exe",
shortcutName="Application",
shortcutDir="DesktopFolder")])
我该怎么做?
推荐答案
根据文档 a>,cx_Freeze能够构建一个简单安装程序,该安装程序可以y不包括显示许可证(或者至少我在文档中找不到)。
但是,您可以使用 python setup.py build运行安装脚本
,然后使用诸如 Inno Setup 之类的专业安装程序将文件打包 NSIS 。两者都是免费的,您可以自定义几乎所有想要的东西,包括显示许可证。
According to the documentation, cx_Freeze is able to build a simple installer which probably doesn't include showing a license (or at least I couldn't find it in the docs).
However, you can run your setup script with python setup.py build
and then package the files up using a professional installer like Inno Setup or NSIS. Both of them are free and let you customize pretty much everything you want, including showing a license.
这篇关于如何将许可证文本添加到cx_freeze bdist_msi?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!