0
python setup.py build
を使用するたびに、ws.ini, tcl.dll, tk.dll
などのすべてのファイルがインポートされない場合があります。 このファイルを使用すると、app.exeが機能しません。 これらのファイルをコピーして貼り付けようとしましたが、アプリケーションは正常に動作しますが、自動的にインポートする方法が必要です。おかげさまで インポートファイルcx_Freeze
import sys, os
from cx_Freeze import setup, Executable
os.environ['TCL_LIBRARY'] = r'C:\Users\matheus.sales.GTONIATO\AppData\Local\Programs\Python\Python35\tcl\tcl8.6'
os.environ['TK_LIBRARY'] = r'C:\Users\matheus.sales.GTONIATO\AppData\Local\Programs\Python\Python35\tcl\tk8.6'
build_exe_options = {
"packages": ["os", "configparser", "glob", "xml.dom", "lxml"],
"includes": ["lxml.etree", "lxml._elementpath"],
"include_files": ["img/logo.png", "README.md", "ws.ini", "tcl86t.dll", "tk86t.dll"]
}
base = None
if sys.platform == "win32":
base = "Win32GUI"
setup(
name="myapp",
version="1.0.0",
description = "Web Service My App",
options = {"build.exe": build_exe_options},
executables = [Executable("interface.py", base=base)]
)