forked from faroukbmiled/BOIIIWD
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.py
34 lines (30 loc) · 1.13 KB
/
build.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import os
import PyInstaller.__main__
from distutils.sysconfig import get_python_lib
site_packages_path = get_python_lib()
NAME = "BOIIIWD"
SCRIPT = "boiiiwd_package/boiiiwd.py"
ICON = "boiiiwd_package/resources/ryuk.ico"
PyInstaller.__main__.run([
"{}".format(SCRIPT),
'--name', f"{NAME}",
"--noconfirm",
"--onefile",
"--windowed",
"--icon", f"{ICON}",
"--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",
"--add-data", f"{site_packages_path}/customtkinter;customtkinter",
"--add-data", f"{site_packages_path}/CTkMessagebox;CTkMessagebox",
"--add-data", f"{site_packages_path}/CTkToolTip;CTkToolTip",
])
# create symbolic hardlink to main directory
if os.path.exists("BOIIIWD.exe"):
os.remove("BOIIIWD.exe")
os.link('dist/BOIIIWD.exe', 'BOIIIWD.exe')