-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathinstaller
55 lines (43 loc) · 1.43 KB
/
installer
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
#!/bin/bash
DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")"
function error {
echo -e "\\e[91m$1\\e[39m"
exit 1
}
#Defining Variables
downloadlink=https://download.jetbrains.com/python/pycharm-community-2022.1.4.tar.gz
name=pycharm
# Get dependencies
sudo apt-get install openjdk-11-jdk
#Removing if pycharm-community-2022.1.4.tar.gz already downloaded
rm $name.tar.gz
#Removing pycharm-community-2022.1.4 if already extracted
sudo rm -r /opt/$name
#Downloading pycharm-community-2022.1.4.tar.gz
wget $downloadlink -O $name.tar.gz
#Extracting pycharm-community-2022.1.4.tar.gz to /opt
sudo mkdir /opt/$name
sudo tar xvzf $name.tar.gz -C /opt/$name
sudo mv /opt/$name/*/* /opt/$name/
#Deleting pycharm-community-2022.1.4.tar.gz
rm $name.tar.gz
#Making file executable
sudo chmod +x /opt/$name/bin/pycharm.sh
#Implementing terminal fix
git clone https://github.com/JetBrains/pty4j.git ~/pty4j
cd ~/pty4j/native
gcc -fPIC -c *.c
gcc -shared -o libpty.so *.o
sudo mkdir /opt/$name/lib/pty4j-native/linux/arm
sudo cp libpty.so /opt/$name/lib/pty4j-native/linux/arm
sudo rm -r ~/pty4j
#Creating desktop shortcut
echo "[Desktop Entry]
Type=Application
Name=PyCharm Community Edition
Icon=/opt/$name/bin/pycharm.svg
Exec=/opt/$name/bin/pycharm.sh %f
Comment=Python IDE
Categories=Development;IDE;Programming;
Terminal=false
StartupWMClass=jetbrains-pycharm-ce" > /usr/share/applications/jetbrains-pycharm-ce.desktop