This repository has been archived by the owner on Jan 17, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathinstall.py
48 lines (40 loc) · 1.71 KB
/
install.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
import platform
import os
import migrate
def install_win():
os.system("python -m ensurepip & pip install -r requirements.txt")
os.system("cd frontend && npm i && npm run build")
migrate.database_sqlite3()
print("Installation is done! You can start the server by using command 'python .'")
def install_mac():
os.system("python3 -m ensurepip ; pip3 install -r requirements.txt")
os.system("cd frontend && npm i && npm run build")
migrate.database_sqlite3()
print("Installation is done! You can start the server by using command 'python3 .'")
def install_linux():
os.system("python3 -m ensurepip ; pip3 install -r requirements.txt")
os.system("cd frontend && npm i && npm run build")
migrate.database_sqlite3()
print("Installation is done! You can start the server by using command 'python3 .'")
def install():
if platform.system().lower() == "windows":
os.system("cls")
else:
os.system("clear")
print("This project is made under GNU General Public License v3.0")
print("\n")
print("You may use this project in any Commercial, Patent, Private usage. Please check the LICENSE file for more details.")
print("\n")
i_confirmation = input("Do you want to install this project in your current directory? [Default is yes, Y/N] >")
if (i_confirmation.lower() == 'y') or (i_confirmation.lower() == "yes") or (i_confirmation == ""):
if platform.system().lower() == "darwin":
install_mac()
elif platform.system().lower() == "windows":
install_win()
else:
install_linux()
else:
print("If you want to install, run this file again.")
quit()
if __name__ == '__main__':
install()