cx_Freeze - a tool can package your project to excutable/installer
demo.py
, we need setup.py
below.import sys
from cx_Freeze import setup, Executable
# Dependencies are automatically detected, but it might need fine tuning.
build_exe_options = {
"excludes": ["tkinter"],
"include_files":[('./platforms','./platforms')] # need qwindows.dll for qt5 application
}
# GUI applications require a different base on Windows (the default is for a
# console application).
base = None
if sys.platform == "win32":
base = "Win32GUI"
setup( name = "demo",
version = "0.1",
description = "demo",
options = {"build_exe": build_exe_options},
executables = [Executable("demo.py", base=base)])
python .\setup.py build
python .\setup.py bdist_msi