-
-
Notifications
You must be signed in to change notification settings - Fork 80
/
build.py
53 lines (41 loc) · 1.14 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import os
import PyInstaller.__main__
import shutil
from distutils.dir_util import copy_tree
version = "145 MSIX build 3"
print("\nBuilding Dashboard...")
PyInstaller.__main__.run([
'manager.py',
'-i=assets/icon.ico',
'-w',
'-y',
'-n=GWSL',
#'--hidden-import=pkg_resources.py2_warn'
])
print("\nBuilding Service...")
PyInstaller.__main__.run([
'main.py',
'-i=assets/icon.ico',
'-w',
'-y',
'-n=GWSL_service',
'--hidden-import=pkg_resources',
'--hidden-import=infi.systray',
#'--hidden-import=pkg_resources.py2_warn'
])
print(f"\nCreating dist/GWSL_{version}")
try:
os.mkdir(f"dist/GWSL_{version}")
except:
print("Deleting Old Build")
shutil.rmtree(f"dist/GWSL_{version}")
os.mkdir(f"dist/GWSL_{version}")
print("Copying Assets...")
folders = ["assets", "locale", "PULSE", "PUTTY", "VCXSRV", "sv_ttk"]
for folder in folders:
print("Merging:", folder)
shutil.copytree(folder, f"dist/GWSL_{version}/" + str(folder))
print("Merging: Dashboard...")
copy_tree("dist/GWSL/", f"dist/GWSL_{version}/")
print("Merging: Service...")
copy_tree("dist/GWSL_service/", f"dist/GWSL_{version}/")