T7x-Workshop-Downloader/build.py

34 lines
1.1 KiB
Python
Raw Normal View History

2023-10-07 10:09:42 -04:00
import os
import shutil
2023-09-19 01:34:22 -04:00
import PyInstaller.__main__
from distutils.sysconfig import get_python_lib
site_packages_path = get_python_lib()
NAME = "BOIIIWD"
2023-09-20 00:58:20 -04:00
SCRIPT = "boiiiwd_package/boiiiwd.py"
ICON = "boiiiwd_package/resources/ryuk.ico"
2023-09-19 01:34:22 -04:00
PyInstaller.__main__.run([
"{}".format(SCRIPT),
'--name', f"{NAME}",
"--noconfirm",
"--onefile",
"--windowed",
"--icon", f"{ICON}",
2023-09-20 00:58:20 -04:00
"--add-data", "boiiiwd_package/resources;resources",
"--add-data", "boiiiwd_package/src;imports",
"--add-data", "boiiiwd_package/src;helpers",
"--add-data", "boiiiwd_package/src;shared_vars",
"--add-data", "boiiiwd_package/src;library_tab",
"--add-data", "boiiiwd_package/src;settings_tab",
"--add-data", "boiiiwd_package/src;update_window",
"--add-data", "boiiiwd_package/src;main",
2023-10-07 10:09:42 -04:00
"--add-data", f"{site_packages_path}/customtkinter;customtkinter",
"--add-data", f"{site_packages_path}/CTkMessagebox;CTkMessagebox",
"--add-data", f"{site_packages_path}/CTkToolTip;CTkToolTip",
2023-09-19 01:34:22 -04:00
])
2023-10-07 10:09:42 -04:00
current_directory = os.path.dirname(__file__)
shutil.copy2(os.path.join(current_directory, "dist", "BOIIIWD.exe"), current_directory)