编译为exe的Cefpython脚本无法运行

时间:2014-11-27 13:16:22

标签: python chromium cx-freeze cefpython

我使用cx_Freezecefpython3脚本编译为正在运行的应用程序。 它运行但失败并显示以下调试信息:

[1127/050154:FATAL:content_main_runner.cc(720)] Check failed: base::i18n::InitializeICU(). 

这是我的设置文件:

def get_cefpython_path():
from cefpython3 import cefpython
path = os.path.dirname(cefpython.__file__)
return "%s%s" % (path, os.sep)

def get_data_files():
    cefp = get_cefpython_path()
    data_files = [('', ['%s/icudt.dll' % cefp,
          '%s/d3dcompiler_43.dll' % cefp,
          '%s/devtools_resources.pak' % cefp,
          '%s/ffmpegsumo.dll' % cefp,
          '%s/libEGL.dll' % cefp,
          '%s/libGLESv2.dll' % cefp,
          '%s/Microsoft.VC90.CRT.manifest' % cefp,
          '%s/msvcm90.dll' % cefp,
          '%s/msvcp90.dll' % cefp,
          '%s/msvcr90.dll' % cefp]),
        ('locales', ['%s/locales/en-US.pak' % cefp]),
        ]
    return data_files

from cx_Freeze import setup, Executable
cefp = get_cefpython_path()
includes = ["json", "lxml", "lxml._elementpath", "lxml.etree", "gzip"]
copyDependentFiles=True
setup(
    data_files = get_data_files(),
    name = "Name",
    options = {"build_exe": {"includes": includes}},
    executables = [Executable("script.pyw", base = "Win32GUI")])

我在这里https://github.com/rogerwang/node-webkit/issues/2126发现此错误表示文件icudt.dat丢失了。我的应用程序目录中有icudt.dll(cx_Freeze包含在文件夹本身中)。但我在icudt.dat包中的任何地方都没有cefpython个文件。所以我不知道缺少什么。而且我不理解错误的语义。感谢您的回复!

0 个答案:

没有答案