OpenDroneMap-ODM/configure.sh

132 wiersze
3.9 KiB
Bash
Czysty Zwykły widok Historia

2015-11-16 13:47:29 +00:00
#!/bin/bash
# Check OS
#if [ ! $(command -v apt-get) ]; then
# echo -e "\e[1;31mERROR: Not a Debian-based linux system.
# Impossible to install OpenCV with this script\e[0;39m"
# exit 1
#fi
2015-11-16 13:47:29 +00:00
## Before installing
#echo -e "\e[1;34mUpdating the system\e[0;39m"
2015-11-16 13:47:29 +00:00
sudo apt-get update
#END_CMD1=$?
2016-03-15 14:21:52 +00:00
# sudo apt-get upgrade -y
# END_CMD2=$?
#if [ $END_CMD1 -ne 0 ]
#then
# echo -e "\e[1;31mERROR: \e[39mWhen Updating the system\e[0m"
# exit 1
#fi
2015-11-16 13:47:29 +00:00
## Install Required Requisites
#echo -e "\e[1;34mInstalling Required Requisites\e[0;39m"
sudo apt-get install -y build-essential \
2015-11-16 13:47:29 +00:00
cmake \
git \
python-pip \
2016-02-25 20:26:58 +00:00
libgdal-dev \
2016-03-24 17:35:29 +00:00
gdal-bin \
2016-02-25 20:29:41 +00:00
libgeotiff-dev \
2016-03-15 14:21:52 +00:00
pkg-config -y -qq
2016-03-24 17:35:29 +00:00
# Upgrade CMake for mvs-texturing
sudo apt-get install -y software-properties-common python-software-properties
sudo add-apt-repository ppa:george-edison55/cmake-3.x -y
sudo apt-get update -y
sudo apt-get install cmake -y
2016-03-24 17:35:29 +00:00
#if [ $? -ne 0 ]
#then
# echo -e "\e[1;31mERROR: \e[39mWhen Installing Required Requisites\e[0m"
# exit 1
#fi
2015-11-16 13:47:29 +00:00
## Installing Optional Requisites
#echo -e "\e[1;34mInstalling OpenCV Dependencies\e[0;39m"
sudo apt-get install -y libgtk2.0-dev \
2015-12-01 09:52:14 +00:00
libavcodec-dev \
libavformat-dev \
libswscale-dev \
2015-12-16 15:10:38 +00:00
python-dev \
2015-11-16 13:47:29 +00:00
python-numpy \
libtbb2 \
libtbb-dev \
libjpeg-dev \
libpng-dev \
libtiff-dev \
libjasper-dev \
2015-11-20 12:34:34 +00:00
libflann-dev \
2015-11-23 11:23:30 +00:00
libproj-dev \
2015-12-16 15:10:38 +00:00
libxext-dev \
2015-11-16 13:47:29 +00:00
liblapack-dev \
libeigen3-dev \
2016-03-15 14:21:52 +00:00
libvtk5-dev -y -qq
#if [ $? -ne 0 ]
#then
# echo -e "\e[1;31mERROR: \e[39mError when Installing Dependencies Requisites\e[0m"
# exit 1
#fi
2015-11-16 13:47:29 +00:00
2015-12-01 09:52:14 +00:00
## Remove libdc1394-22-dev due to python opencv issue
#echo -e "\e[1;34mRemoving libdc1394-22-dev\e[0;39m"
2015-12-01 09:52:14 +00:00
sudo apt-get remove libdc1394-22-dev
## Installing OpenSfM Requisites
#echo -e "\e[1;34mInstalling OpenSfM Dependencies\e[0;39m"
sudo apt-get install -y python-networkx \
2015-12-01 09:52:14 +00:00
libgoogle-glog-dev \
libsuitesparse-dev \
2016-03-15 14:21:52 +00:00
libboost-filesystem-dev \
libboost-iostreams-dev \
libboost-regex-dev \
libboost-python-dev \
libboost-date-time-dev \
libboost-thread-dev -y -qq
2015-12-01 09:52:14 +00:00
sudo pip install -U PyYAML \
exifread \
gpxpy \
xmltodict
#if [ $? -ne 0 ]
#then
# echo -e "\e[1;31mERROR: \e[39mError when Installing OpenSfM Dependencies\e[0m"
# exit 1
#fi
2015-12-01 09:52:14 +00:00
## Installing Ecto Requisites
#echo -e "\e[1;34mInstalling Ecto Dependencies\e[0;39m"
2015-12-22 12:29:13 +00:00
sudo pip install -U catkin-pkg
sudo apt-get install -y python-empy \
2015-12-01 13:46:13 +00:00
python-nose \
2016-03-15 14:21:52 +00:00
python-pyside -y -qq
#if [ $? -ne 0 ]
#then
# echo -e "\e[1;31mERROR: \e[39mError when Installing Ecto Dependencies\e[0m"
# exit 1
#fi
2015-11-23 16:56:12 +00:00
2015-12-01 09:52:14 +00:00
## Installing OpenDroneMap Requisites
#echo -e "\e[1;34mInstalling OpenDroneMap Dependencies\e[0;39m"
sudo apt-get install -y python-pyexiv2 \
2015-12-01 13:46:13 +00:00
python-scipy \
2015-12-11 21:24:52 +00:00
jhead \
2016-03-15 14:21:52 +00:00
liblas-bin -y -qq
#if [ $? -ne 0 ]
#then
# echo -e "\e[1;31mERROR: \e[39mError when Installing OpenDroneMap Dependencies\e[0m"
# exit 1
#fi
2015-11-23 11:23:30 +00:00
2015-11-16 13:47:29 +00:00
## Get sys vars
#NUM_CORES=`grep -c processor /proc/cpuinfo`
2015-11-16 13:47:29 +00:00
2015-12-16 15:10:38 +00:00
## Add SuperBuild path to the python path
#export PYTHONPATH=$PYTHONPATH:`pwd`/SuperBuild/install/lib/python2.7/dist-packages:`pwd`/SuperBuild/src/opensfm
2015-12-16 15:10:38 +00:00
2015-11-16 13:47:29 +00:00
## Compile SuperBuild
2015-12-21 16:52:57 +00:00
cd SuperBuild
2015-11-16 13:47:29 +00:00
mkdir -p build && cd build
cmake .. && make -j8 #${NUM_CORES}
2015-12-01 13:33:04 +00:00
#echo -e "\e[1;34mScript finished\e[0;39m"