Open cztomczak opened 7 years ago
I got somewhere with this one Windows. Happy to formalize this into a detailed example if needed.
Zip Installer is obtained by
python setup.py bdist
MSI Installer is obtained by
python setup.py bdist_msi
#setup.py
from distutils.sysconfig import get_python_lib
from os.path import join
from glob import glob
from cx_Freeze import setup, Executable
# Basically just copy all of the CEF distribution into the installer
# I have only tested this on windows
cefPath = join(get_python_lib(), "cefpython3")
CEF_INCLUDES = glob(join(cefPath, "*"))
CEF_INCLUDES.remove(join(cefPath, "examples"))
setup(
name = "MyAppName",
version = "1.0.0",
options = {
"build_exe": {
'packages': ["os","sys","ctypes","win32con", "json"],
'include_files': CEF_INCLUDES + ['otherResourceFolder'],
'include_msvcr': True,
}},
executables = [Executable("app.py", base="Win32GUI")]
)
@josephmartin09 In order to thank you, I specially registered this account, you are so powerful! thank you again~
This appears to no longer work:
[0511/153708.613:ERROR:icu_util.cc(172)] Invalid file descriptor to ICU data received.
Completely deleting icudtl.dat
gives the same error. Likely the path to the file is build in an incompatible way.
This appears to no longer work: [0511/153708.613:ERROR:icu_util.cc(172)] Invalid file descriptor to ICU data received.
I got the same error using PyInstaller.
See https://anthony-tuininga.github.io/cx_Freeze/
See also: