Я пытаюсь сгенерировать .exe для моего python проекта. Открытие сгенерированного .exe дает мне следующую ошибку, я не знаю, как включить .py из подкаталога в файл setup.py с помощью cx-Freeze.
Вот моя структура каталогов: directory
Вот мой файл setup.py:
from cx_Freeze import *
import sys
if 'bdist_msi' in sys.argv:
sys.argv += ['--initial-target-dir', 'C:\Service Solution']
shortcut_table = [
("DesktopShortcut", # Shortcut
"DesktopFolder", # Directory_
"Service Solution", # Name
"TARGETDIR", # Component_
"[TARGETDIR]main.exe", # Target
None, # Arguments
None, # Description
None, # Hotkey
None, # Icon
None, # IconIndex
None, # ShowCmd
'TARGETDIR' # WkDir
)
]
msi_data = {"Shortcut": shortcut_table}
bdist_msi_options = {'data': msi_data}
exe = Executable(
script=r"main.py",
base='Win32GUI',
icon="service.ico",
)
exebuildOptions = dict(packages=[],
excludes=[],
includes=[],
include_files=['file', 'images'])
setup(
name="Service Solution",
version="1.0",
description="VAT Express Service Solution",
author="VAT Express",
author_email="vatexpress.bd@gmail.com",
options={'build_exe': exebuildOptions, 'bdist_msi': bdist_msi_options},
executables=[exe]
)
ошибка после установки .exe файл ошибка