-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
build_shade.py
50 lines (39 loc) · 1.26 KB
/
build_shade.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import os
import PyInstaller.__main__
import shutil
from distutils.dir_util import copy_tree
# Opticos Program Builder
program_name = "oiw"
main = "main.py"
version = "alpha88"
icon = "assets/icon_centered.ico"
folders = ["assets", "ttkbootstrap"]
print("\nBuilding Dashboard in nuitka...")
"""
PyInstaller.__main__.run([
f'{main}',
f'-i={icon}',
'-w',
'-y',
f'-n={program_name}'
])
"""
os.system("py -3.7 -m nuitka --follow-imports --standalone --plugin-enable=tk-inter "
"--plugin-enable=pkg-resources --windows-disable-console --windows-icon-from-ico=assets/icon_centered.ico main.py")
"""
print(f"\nCreating dist/{program_name}_{version}")
try:
os.mkdir(f"main.dist/{program_name}_{version}")
except:
print("Deleting Old Build")
shutil.rmtree(f"main.dist/{program_name}_{version}")
os.mkdir(f"main.dist/{program_name}_{version}")
print("Copying Assets...")
for folder in folders:
print("Merging:", folder)
shutil.copytree(folder, f"main.dist/{program_name}_{version}/" + str(folder))
print("Merging: Main...")
copy_tree(f"main.dist/{program_name}/", f"dist/{program_name}_{version}/")
#print("Merging: Service...")
#copy_tree("dist/GWSL_service/", f"dist/GWSL_{version}/")
"""