windows Py2exe:在没有 GUI 界面的情况下编译 Web 服务器时是否需要清单文件和 w9xpopen.exe?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1904724/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Py2exe: Are manifest files and w9xpopen.exe required when compiling a web server without GUI interface?
提问by Malcolm
I'm using Py2exe to compile a CherryPy (3.1) server using Python 2.6 (32-bit) on Windows 7 Pro (64-bit).
我正在使用 Py2exe 在 Windows 7 Pro(64 位)上使用 Python 2.6(32 位)编译 CherryPy(3.1)服务器。
This server will run without a GUI.
该服务器将在没有 GUI 的情况下运行。
Questions:
问题:
Do I need to be concerned about adding a manifest file for this application if it runs without a GUI?
Do I need to include w9xpopen.exe with my exe?
如果此应用程序在没有 GUI 的情况下运行,我是否需要担心为该应用程序添加清单文件?
我需要在我的 exe 文件中包含 w9xpopen.exe 吗?
So far, my limited testing has indicated that I don't need to include a manifest file or w9xpopen.exe with my executable in order for it to work.
到目前为止,我的有限测试表明我不需要在我的可执行文件中包含清单文件或 w9xpopen.exe 才能使其工作。
Comments appreciated.
评论赞赏。
Thank you, Malcolm
谢谢你,马尔科姆
回答by YOU
w9xpopen.exe is for windows 95/98, So If you don't use those you will not need it.
w9xpopen.exe 适用于 Windows 95/98,因此如果您不使用那些,您将不需要它。
You can add dll_excludes=['w9xpopen.exe']
in your setup file for py2exe to exclude that.
您可以dll_excludes=['w9xpopen.exe']
在 py2exe 的安装文件中添加以排除它。
and of course you will not need manifest file if you don't use GUI too.
当然,如果您也不使用 GUI,您将不需要清单文件。
回答by Prav
A manifest file will not be required for console applications. w9xpopen.exe
is not required for Win XP and later.
控制台应用程序不需要清单文件。w9xpopen.exe
Win XP 及更高版本不需要。
回答by Matt Coubrough
A manifest should not be required.
And you can exclude w9xpopen.exe (for Win XP and above)
不应要求清单。
您可以排除 w9xpopen.exe(适用于 Win XP 及更高版本)
For what it's worth, using py2exe v 0.6.9 to automatically exclude w9xpopen I had to set dll_excludes
as a py2exe option within my setup.py file. Here's an example for "myapp.py":
对于它的价值,使用 py2exe v 0.6.9 自动排除 w9xpopen 我必须dll_excludes
在我的 setup.py 文件中设置为 py2exe 选项。这是“myapp.py”的示例:
from distutils.core import setup
import py2exe, sys, os
sys.argv.append('py2exe')
setup(
name = "...",
version = '1.0',
description = "...",
author = "...",
windows = [{'script': 'myapp.py',
'icon_resources': [(1, 'myapp.ico')]
}],
zipfile = None,
data_files=[],
options = {
'py2exe': {
'optimize':2,
'bundle_files': 2,
'compressed': True,
'excludes':[],
'dll_excludes':['w9xpopen.exe']
}
}
)
For apps running sans gui, you could use console=[...]
instead of windows=[...]
.
对于应用程序运行SANS贵,你可以使用console=[...]
的替代windows=[...]
。