单文件可执行文件 [英] Single-file executables

查看:128
本文介绍了单文件可执行文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Python应用程序的哪些Windows / Unix软件包构建器是否能够创建单文件可执行文件?
?我在想:


1. py2exe

2. Mcmillan Installer / PyInstaller

3. cxfreeze


我看过py2exe创建的应用程序根本不是单文件,

安装文件夹除了主程序外还有很多文件。我正在寻找一个将所有库,脚本和Python

运行时填充到一个文件中的解决方案。


-

Kevin Walzer

iReveal:文件搜索工具
http://www.wordtech-software.com

Which of the Windows/Unix package builders for Python applications is
capable of creating single-file executables? I''m thinking of:

1. py2exe
2. Mcmillan Installer/PyInstaller
3. cxfreeze

The apps I''ve seen created by py2exe aren''t single-file at all, the
install folder is full of files besides the main program. I''m looking
for a solution that stuffs all libraries, scripts, and the Python
runtime into one file.

--
Kevin Walzer
iReveal: File Search Tool
http://www.wordtech-software.com

推荐答案

Kevin Walzer写道:
Kevin Walzer wrote:
我看过py2exe创建的应用程序根本不是单文件,
安装文件夹中除了主程序之外还有很多文件。我正在寻找一个将所有库,脚本和Python运行时填充到一个文件中的解决方案。
The apps I''ve seen created by py2exe aren''t single-file at all, the
install folder is full of files besides the main program. I''m looking
for a solution that stuffs all libraries, scripts, and the Python
runtime into one file.




完全控制,以及真正的单二进制可执行文件,我建议使用冻结本身

。这需要更多的工作,但也提供更好的

结果。


问候,

马丁



For full control, and truly single-binary executables, I recommend
to use freeze itself. It takes a bit more work, but also gives better
results.

Regards,
Martin


实际上,py2exe(从版本0.6.1开始)确实创建单个文件

exes而没有任何其他依赖项。

Actually, py2exe (from version 0.6.1) onwards does create single file
exes without ANY additional dependencies.


Kevin Walzer写道:
Kevin Walzer wrote:
Python应用程序的哪个Windows / Unix软件包构建器能够创建单文件可执行文件?我在想:

1. py2exe
2. Mcmillan Installer / PyInstaller
3. cxfreeze

我见过的应用程序由py2exe创建的根本不是单文件,
安装文件夹除了主程序之外还有很多文件。我正在寻找一个将所有库,脚本和Python运行时填充到一个文件中的解决方案。
Which of the Windows/Unix package builders for Python applications is
capable of creating single-file executables? I''m thinking of:

1. py2exe
2. Mcmillan Installer/PyInstaller
3. cxfreeze

The apps I''ve seen created by py2exe aren''t single-file at all, the
install folder is full of files besides the main program. I''m looking
for a solution that stuffs all libraries, scripts, and the Python
runtime into one file.




我使用pyinstaller 。即使你有像pycrypto这样编译的依赖关系,它也很简单并且生成一个文件(我不认为冻结处理这些

这么好)。如果您想轻松安装Windows,请查看Inno

安装程序。它提供了一个可下载的安装程序,可帮助您解决未知出版商问题。问题和系统注册表编辑。在

摘要:pyinstaller + inno setup。


James



I use pyinstaller. Its easy and makes a single file, even if you have
compiled dependencies like pycrypto (I don''t think freeze handles these
so well). If you want ease of installation for windows, check out Inno
Setup. It gives a single downloadable installer that helps get around
the "unknown publisher" problem, and system registry editing. In
summary: pyinstaller + inno setup.

James


这篇关于单文件可执行文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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