-
Notifications
You must be signed in to change notification settings - Fork 57
/
Copy pathpangolin.sh
executable file
·71 lines (63 loc) · 1.64 KB
/
pangolin.sh
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
# source: https://gist.github.com/phatblat/1713458
# Save script's current directory
DIR=$(pwd)
set -e
set -u
set -x
echo "############################"
echo "# pangolin https://github.com/stevenlovegrove/pangolin"
echo "############################"
echo ""
echo "Pangolin is a lightweight portable rapid development library for managing "
echo "OpenGL display / interaction and abstracting video input."
echo ""
OS=`uname`
case $OS in
'Linux')
OS='Linux'
. /etc/lsb-release # get ubuntu version number
# only install
if [ "$DISTRIB_RELEASE" = "14.04" ]; then
# https://launchpad.net/~mc3man/+archive/ubuntu/trusty-media
# https://www.ffmpeg.org/download.html#get-sources
sudo add-apt-repository ppa:mc3man/trusty-media -y
sudo apt-get update -y
fi
sudo apt-get install -y libglew-dev
sudo apt-get install -y ffmpeg libavcodec-dev libavutil-dev libavformat-dev libswscale-dev
sudo apt-get install -y libdc1394-22-dev libraw1394-dev
sudo apt-get install -y libjpeg-dev libpng12-dev libtiff5-dev libopenexr-dev
;;
'FreeBSD')
OS='FreeBSD'
alias ls='ls -G'
;;
'WindowsNT')
OS='Windows'
;;
'Darwin')
OS='Mac'
brew install ffmpeg jpeg tiff png glew
;;
'SunOS')
OS='Solaris'
;;
'AIX') ;;
*) ;;
esac
# install https://github.com/stevenlovegrove/pangolin
cd ~/src/
if [ ! -d ~/src/Pangolin ]
then
git clone git@github.com:stevenlovegrove/Pangolin.git
fi
sudo chmod -R u+rwx ~/src/Pangolin
sudo chmod -R g+rwx ~/src/Pangolin
cd Pangolin
git pull
mkdir -p build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local
cmake --build .
sudo cmake --build . --target install
cd $DIR