Open NooRMaseR opened 1 year ago
import sys from cx_Freeze import setup, Executable
build_exe_options = {
"packages": ["tkinter", 'customtkinter'], # List of packages to include
"excludes": ['flask', 'ttkthemes',], # List of packages to exclude
"include_files": ['icons/', 'C:/Users/Tech/AppData/Local/Programs/Python/Python310/Lib/site-packages/customtkinter/assets'], # List of files to include
"include_msvcr": True, # This include Microsoft Visual C++ runtime
"optimize": 2, #These increase the speed of the software in terms of the perfomance
"zip_include_packages": ['icons/tools'],
# "zip_exclude_dlls": [],
}
shortcuttable = [#This defines the shorcut to be created for the frozen executable ("DesktopShortcut", # Shortcut "DesktopFolder", # Directory "Modern Calculator", # Desktop icon Name "TARGETDIR", # Component_ "[TARGETDIR]desk.exe", # Target None, # Arguments None, # Description None, # Hotkey None, # Icon None, # IconIndex None, # ShowCmd "TARGETDIR", # WkDir ), ]
msi_data = {"Shortcut": shortcut_table}
base = None #this will set the base of the application to a GUI application on Windows. if sys.platform == "win32": base = "Win32GUI"
script_path = "desk.py" # Replace with the path to your Python script
setup( name="Modern Calculator", version="1.0", description="My Python script", options={ "build_exe": build_exe_options, "bdist_msi": {"data": msi_data}, }, executables=[Executable(script_path, base=base, icon="icons/logo.ico", shortcut_name="main")], author="Software", )
Please that is the cx_freeze script i use to compile customtkinter script and it work for me perfectly
the app that I'm working on is working correctly in vs code but when i convert the file to EXE nothing shows up literally an empty app it was good before using customtkiner , after using it that's what happened , any suggestions about how to solve this ?