-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.py
More file actions
26 lines (19 loc) · 745 Bytes
/
build.py
File metadata and controls
26 lines (19 loc) · 745 Bytes
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
# this works on Windows for now, macOS & Linux support coming soon
import os
import shutil
import platform
running_on = platform.system()
path = os.getcwd()
print('Build Started.')
os.system(f'pyinstaller --noconfirm --onedir --console --icon "{path}/images/logo.ico" --add-data "{path}/build;build/" --add-data "{path}/images;images/" --add-data "{path}/template;template/" --add-data "{path}/VERSION;." --add-data "{path}/LICENSE;." "{path}/run.py"')
shutil.rmtree(f'{path}/build/run')
if running_on == 'Darwin':
os.system('clear')
elif running_on == 'Linux':
os.system('clear')
elif running_on == 'Windows':
os.system('cls')
else:
pass
print('Executable is located in \"/dist/run/\" folder.')
print('Build complete.')