Python文件到MSI Windows安装程序 [英] Python files to an MSI Windows installer

查看:308
本文介绍了Python文件到MSI Windows安装程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我可以使用PyInstaller来制作一个文件可执行文件并在文件夹中的其他文件中制作标准可执行文件.

So I can use PyInstaller to make a one-file executable and to make a standard executable among other files in a folder.

但是,如何将Python文件转换为MSI安装程序,以使其在桌面上创建快捷方式变得万无一失? (用于分发,这样用户无需安装Python)

But how do I turn Python files into an MSI installer so that it's fool-proof where it makes a shortcut on the desktop? (For distribution so that it isn't required for the user to have Python installed)

(当我对MSI安装程序说Python文件时,我的意思是常规PyInstaller到文件夹输出,但对于普通用户而言,它可以很容易地将可执行文件的快捷方式放到桌面上) (如果有其他选择,则不必是PyInstaller).

(When I say Python files to an MSI installer I mean the regular PyInstaller to folder output but with a way of getting a shortcut to the executable onto the desktop very easily for a regular user) (It doesn't have to be PyInstaller if there's an alternative).

推荐答案

Pyinstaller不能集成这样的工具.

Pyinstaller does not intergrate such a tool.

您可以获取第三方安装程序(此处有些建议如何为Windows创建一个健壮,最小的安装程序?)并向其中添加输出exe并以这种方式安装,如果您选择了正确的工具,便可以将其添加到桌面(以及许多其他操作,例如作为添加到路径等).

You could get a third party installer (some suggested here How to create a robust, minimal installer for Windows?) and add your output exe to it and install that way, if you choose the right tool you will be able to add to desktop (plus a lot of other actions such as adding to path ect).

或者您可以使用内置的cx_Freeze.运行安装脚本时,只需添加

Or you could use cx_Freeze which has it built in. When running the setup script just add the bdist_msi flag.

它可以添加到快捷方式桌面,但在其他方面有一定的局限性(或者您可能需要进行一些修改).

It can add to shortcut desktop but is fairly limited in other ways (or you may need to perform some hack).

要使用cx_Freeze添加到桌面,请参见

To add to desktop with cx_Freeze see Use cx-freeze to create an msi that adds a shortcut to the desktop.

这篇关于Python文件到MSI Windows安装程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆