forked from lispyclouds/medusa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL
executable file
·84 lines (74 loc) · 2.14 KB
/
INSTALL
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
#!/bin/bash
echo "Checking for Qt5 Libs..."
if dpkg -s qtdeclarative5-dev > /dev/null 2>&1
then
echo "Qt5 Libs found, moving on..."
else
echo "Qt5 Libs not found, installing..."
sudo apt-add-repository -y ppa:ubuntu-sdk-team/ppa
sudo apt-get update
sudo apt-get -y install qtdeclarative5-dev
fi
echo "Checking for Python 2.7 Installation..."
if type "python" > /dev/null 2>&1
then
echo "Python 2.7 found, moving on..."
else
echo "Python 2.7 not found, installing..."
sudo apt-get -y install python
fi
echo "Checking for Dart SDK Installation..."
if type "dart" > /dev/null 2>&1
then
echo "Dart SDK found, moving on..."
else
echo "Dart SDK not found, installing..."
sudo add-apt-repository -y ppa:hachre/dart
sudo apt-get update
sudo apt-get -y install dartsdk
fi
echo "Checking for C++ compilers..."
qmake_opt=""
if type "clang++" > /dev/null 2>&1
then
echo "clang++ found, using it."
qmake_opt="-recursive -spec linux-clang"
elif type "g++" > /dev/null 2>&1
then
echo "g++ found, using it."
else
echo "No C++ compilers found. Installing GNU bulid tools..."
sudo apt-get -y install build-essential
fi
echo "All dependencies satisified! We are good to go... :D"
echo "Starting Medusa build..."
echo "Setting Qt5 build home.."
if [ -d /usr/lib/x86_64-linux-gnu/qt5 ];
then
qHome="/usr/lib/x86_64-linux-gnu/qt5/bin"
else
qHome="/usr/lib/i686-linux-gnu/qt5/bin"
fi
echo "Qt5 build home set at: " $qHome
echo "moc'ing transform.h..."
$qHome/moc inc/transform.h > inc/transform_moc.h
echo "Done!"
echo "Generating Makefile..."
$qHome/qmake -o Makefile medusa.pro $qmake_opt
echo "Done"
echo "Buliding and Installing Medusa 2.7.3..."
make -j $(grep -c ^processor /proc/cpuinfo)
sudo make install
make clean
echo "Done!"
echo "Installing Medusa Enviroment 2.7.3..."
if [ ! -d $HOME/.medusa ];
then
echo "Creating Medusa Home Directory"
mkdir $HOME/.medusa
fi
echo "Installing Dart Libs"
cp -R bin/lib $HOME/.medusa
echo "Installing FPT Python Transformer"
cp bin/transform.py $HOME/.medusa
echo "Medusa 2.7.3 Successfully installed Yo! Runnable directly as 'medusavm' from the terminal. Happy Pythoning!"