-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.cmd
90 lines (76 loc) · 2.01 KB
/
install.cmd
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
@ECHO OFF
cls
WHERE /Q python3
ECHO Archon installer
IF %ERRORLEVEL% NEQ 0 (
ECHO Python 3 is required
EXIT /B 0
)
FOR /F "tokens=2" %%G IN ('python -V') do (SET version_raw=%%G)
SET modified=%version_raw:.=%
SET /A num=%modified%+0
IF %num% LSS 3100 (
ECHO Python 3.10.0 or newer is required
EXIT /B 0
) ELSE (
ECHO Python %version_raw% found
)
WHERE /Q pip3
IF %ERRORLEVEL% NEQ 0 (
ECHO PIP 3 is required
EXIT /B 0
) ELSE (
pip3 install pymongo
pip3 install pyyaml
pip3 install pyopenssl
pip3 install pyIsEmail
pip3 install psutil
pip3 install websocket
pip3 install websocket-client
pip3 install dnspython
pip3 install python-slugify
pip3 install asyncssh
pip3 install nest_asyncio
pip3 install requests
pip3 install uvicorn
pip3 install fastapi
pip3 install mysql-connector-python
pip3 install colorama
pip3 install jinja2
pip3 install pytz
IF exist storage\sites (
echo storage\sites exists
) ELSE (
mkdir storage\sites && echo storage\sites created
)
IF exist storage\devices (
echo storage\devices exists
) ELSE (
mkdir storage\devices && echo storage\devices created
)
IF exist storage\resources (
echo storage\resources exists
) ELSE (
mkdir storage\resources && echo storage\resources created
)
IF exist storage\logs (
echo storage\logs exists
) ELSE (
mkdir storage\logs && echo storage\logs created
)
IF exist config\app.yaml (
echo config\app.yaml exists
) ELSE (
copy config\sample.app.yaml config\app.yaml && echo config\app.yaml created
)
IF exist config\api.yaml (
echo config\api.yaml exists
) ELSE (
copy config\sample.api.yaml config\api.yaml && echo config\api.yaml created
)
IF exist config\smtp.yaml (
echo config\smtp.yaml exists
) ELSE (
copy config\sample.smtp.yaml config\smtp.yaml && echo config\smtp.yaml created
)
)