2

我曾经将脚本cx_Freeze编译到正在运行的应用程序中。cefpython3它运行但失败并显示以下调试信息:

[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所以我不知道缺少什么。而且我不理解错误的语义。感谢您的任何回复!

4

0 回答 0