import os import shutil import PyInstaller.__main__ from distutils.sysconfig import get_python_lib site_packages_path = get_python_lib() NAME = "T7xWD" SCRIPT = "T7xwd_package/T7xwd.py" ICON = "T7xwd_package/resources/ryuk.ico" PyInstaller.__main__.run([ "{}".format(SCRIPT), '--name', f"{NAME}", "--noconfirm", "--onefile", "--windowed", "--icon", f"{ICON}", "--add-data", "T7xwd_package/resources;resources", "--add-data", "T7xwd_package/src;imports", "--add-data", "T7xwd_package/src;helpers", "--add-data", "T7xwd_package/src;shared_vars", "--add-data", "T7xwd_package/src;library_tab", "--add-data", "T7xwd_package/src;settings_tab", "--add-data", "T7xwd_package/src;update_window", "--add-data", "T7xwd_package/src;main", "--add-data", f"{site_packages_path}/customtkinter;customtkinter", "--add-data", f"{site_packages_path}/CTkMessagebox;CTkMessagebox", "--add-data", f"{site_packages_path}/CTkToolTip;CTkToolTip", ]) current_directory = os.path.dirname(__file__) shutil.copy2(os.path.join(current_directory, "dist", "T7xWD.exe"), current_directory)