forked from mrmoein/warp-cloudflare-gui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.py
More file actions
27 lines (21 loc) · 689 Bytes
/
install.py
File metadata and controls
27 lines (21 loc) · 689 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
import os
import sys
from pathlib import Path
cur_path = sys.path[0]
os.system("pip3 install -U pip wheel setuptools")
os.system("pip3 install -r requirements.txt")
os.system("mkdir -p ~/.local/share/icons")
os.system("cp {}/icons/logo.png ~/.local/share/icons/warp_gui.png".format(cur_path))
desktop_file = '{}/.local/share/applications/warp-gui.desktop'.format(Path.home())
file = open(desktop_file, 'w+')
file.write('''[Desktop Entry]
Name=Warp Cloudflare
Version=1.0
Comment=A gui app base on warp-cli for linux
Exec=bash {}/main.sh
Icon=warp_gui
Terminal=false
Path={}
Type=Application
'''.format(cur_path, cur_path))
print('Desktop file created at "{}"'.format(desktop_file))