1

我有个问题

我有 Eclipse 工作空间,它包含来自另一个项目的 4project 每个项目引用。当我需要使用 cx_Freeze 制作可执行文件时,它无法将其他引用的项目导入其中?

谢谢

我试过这段代码:

base = None
from cx_Freeze import setup, Executable
if sys.platform == "win32":
    base = "Win32GUI"
exe = Executable(
    script="MyForm.py",
     base="Win32GUI",packages=['QtCore', 'QtGui',     'QtSvg','tkinter','time','os','cls_MyForm','threading','sys','DAL','FS_Watch_Collection'],
     compress=False, copyDependentFiles=False)    

setup(
    name = "First Version of File Watcher",
    version = "1",
    description = "File Watcher Program",
    executables = [exe])

这个代码:

from cx_Freeze import setup, Executable
#http://www.youtube.com/watch?v=XHcDHSWRCRQ
#http://www.python-forum.org/pythonforum/viewtopic.php?f=4&t=34501&hilit=cxfreeze
includefiles = ['README.txt', 'CHANGELOG.txt']
includes = []
excludes = ['tkinter']
packages = ['pk_LocalStore','QtCore', 'QtGui', 'QtSvg','time','os','threading','sys']

setup(
    name = 'First Version of File Watcher',
    version = '0.1',
    description = 'File Watcher Program',
    author = 'ITE CO',
    author_email = 'info@from-masr.com',
    options = {'build_exe': {'excludes':excludes,'packages':packages,'include_files':includefiles}}, 
    executables = [Executable('MyForm.py')]
)

但它不能正常工作

4

0 回答 0