Add reinstall and uninstall options to configuration script

Former-commit-id: 0b9a5998b2
pull/1161/head
Dakota Benjamin 2017-04-06 12:22:42 -04:00
rodzic aaeaca736e
commit 8a4396a0ea
2 zmienionych plików z 121 dodań i 82 usunięć

Wyświetl plik

@ -32,7 +32,7 @@ OpenDroneMap can run natively on Ubuntu 14.04 or later, see [Build and Run Using
Current version: 0.2 (this software is in beta) Current version: 0.2 (this software is in beta)
1. Extract and enter the OpenDroneMap directory 1. Extract and enter the OpenDroneMap directory
2. Run `bash configure.sh` 2. Run `bash configure.sh install`
4. Copy the default settings file and edit it: `cp default.settings.yaml settings.yaml`. Set the `project-path` value to an empty directory (you will place sub-directories containing individual projects inside). You can add many options to this file, [see here](https://github.com/OpenDroneMap/OpenDroneMap/wiki/Run-Time-Parameters) 4. Copy the default settings file and edit it: `cp default.settings.yaml settings.yaml`. Set the `project-path` value to an empty directory (you will place sub-directories containing individual projects inside). You can add many options to this file, [see here](https://github.com/OpenDroneMap/OpenDroneMap/wiki/Run-Time-Parameters)
3. Download a sample dataset from [here](https://github.com/OpenDroneMap/odm_data_aukerman/archive/master.zip) (about 550MB) and extract it as a subdirectory in your project directory. 3. Download a sample dataset from [here](https://github.com/OpenDroneMap/odm_data_aukerman/archive/master.zip) (about 550MB) and extract it as a subdirectory in your project directory.
4. Run `./run.sh odm_data_aukerman` 4. Run `./run.sh odm_data_aukerman`
@ -47,7 +47,7 @@ See [here](https://github.com/OpenDroneMap/OpenDroneMap/tree/ebaaf802a1fb50e335b
Extract and enter the downloaded OpenDroneMap directory and compile all of the code by executing a single configuration script: Extract and enter the downloaded OpenDroneMap directory and compile all of the code by executing a single configuration script:
bash configure.sh bash configure.sh install
For Ubuntu 15.10 users, this will help you get running: For Ubuntu 15.10 users, this will help you get running:

Wyświetl plik

@ -1,95 +1,134 @@
#!/bin/bash #!/bin/bash
## Set up library paths install() {
RUNPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" ## Set up library paths
export PYTHONPATH=$RUNPATH/SuperBuild/install/lib/python2.7/dist-packages:$RUNPATH/SuperBuild/src/opensfm:$PYTHONPATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$RUNPATH/SuperBuild/install/lib
## Before installing export PYTHONPATH=$RUNPATH/SuperBuild/install/lib/python2.7/dist-packages:$RUNPATH/SuperBuild/src/opensfm:$PYTHONPATH
echo "Updating the system" export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$RUNPATH/SuperBuild/install/lib
sudo apt-get update
sudo add-apt-repository -y ppa:ubuntugis/ppa ## Before installing
sudo apt-get update echo "Updating the system"
sudo apt-get update
echo "Installing Required Requisites" sudo add-apt-repository -y ppa:ubuntugis/ppa
sudo apt-get install -y -qq build-essential \ sudo apt-get update
git \
cmake \
python-pip \
libgdal-dev \
gdal-bin \
libgeotiff-dev \
pkg-config
echo "Getting CMake 3.1 for MVS-Texturing" echo "Installing Required Requisites"
sudo apt-get install -y software-properties-common python-software-properties sudo apt-get install -y -qq build-essential \
sudo add-apt-repository -y ppa:george-edison55/cmake-3.x git \
sudo apt-get update -y cmake \
sudo apt-get install -y --only-upgrade cmake python-pip \
libgdal-dev \
gdal-bin \
libgeotiff-dev \
pkg-config
echo "Installing OpenCV Dependencies" echo "Getting CMake 3.1 for MVS-Texturing"
sudo apt-get install -y -qq libgtk2.0-dev \ sudo apt-get install -y software-properties-common python-software-properties
libavcodec-dev \ sudo add-apt-repository -y ppa:george-edison55/cmake-3.x
libavformat-dev \ sudo apt-get update -y
libswscale-dev \ sudo apt-get install -y --only-upgrade cmake
python-dev \
python-numpy \
libtbb2 \
libtbb-dev \
libjpeg-dev \
libpng-dev \
libtiff-dev \
libjasper-dev \
libflann-dev \
libproj-dev \
libxext-dev \
liblapack-dev \
libeigen3-dev \
libvtk5-dev
echo "Removing libdc1394-22-dev due to python opencv issue" echo "Installing OpenCV Dependencies"
sudo apt-get remove libdc1394-22-dev sudo apt-get install -y -qq libgtk2.0-dev \
libavcodec-dev \
libavformat-dev \
libswscale-dev \
python-dev \
python-numpy \
libtbb2 \
libtbb-dev \
libjpeg-dev \
libpng-dev \
libtiff-dev \
libjasper-dev \
libflann-dev \
libproj-dev \
libxext-dev \
liblapack-dev \
libeigen3-dev \
libvtk5-dev
## Installing OpenSfM Requisites echo "Removing libdc1394-22-dev due to python opencv issue"
echo "Installing OpenSfM Dependencies" sudo apt-get remove libdc1394-22-dev
sudo apt-get install -y -qq python-networkx \
libgoogle-glog-dev \
libsuitesparse-dev \
libboost-filesystem-dev \
libboost-iostreams-dev \
libboost-regex-dev \
libboost-python-dev \
libboost-date-time-dev \
libboost-thread-dev \
python-pyproj
sudo pip install -U PyYAML \ ## Installing OpenSfM Requisites
exifread \ echo "Installing OpenSfM Dependencies"
gpxpy \ sudo apt-get install -y -qq python-networkx \
xmltodict \ libgoogle-glog-dev \
appsettings libsuitesparse-dev \
libboost-filesystem-dev \
libboost-iostreams-dev \
libboost-regex-dev \
libboost-python-dev \
libboost-date-time-dev \
libboost-thread-dev \
python-pyproj
echo "Installing Ecto Dependencies" sudo pip install -U PyYAML \
sudo pip install -U catkin-pkg exifread \
sudo apt-get install -y -qq python-empy \ gpxpy \
python-nose \ xmltodict \
python-pyside appsettings
echo "Installing OpenDroneMap Dependencies" echo "Installing Ecto Dependencies"
sudo apt-get install -y -qq python-pyexiv2 \ sudo pip install -U catkin-pkg
python-scipy \ sudo apt-get install -y -qq python-empy \
jhead \ python-nose \
liblas-bin python-pyside
echo "Compiling SuperBuild" echo "Installing OpenDroneMap Dependencies"
cd SuperBuild sudo apt-get install -y -qq python-pyexiv2 \
mkdir -p build && cd build python-scipy \
cmake .. && make -j$(nproc) jhead \
liblas-bin
echo "Compiling build" echo "Compiling SuperBuild"
cd ../.. cd ${RUNPATH}/SuperBuild
mkdir -p build && cd build mkdir -p build && cd build
cmake .. && make -j$(nproc) cmake .. && make -j$(nproc)
echo "Configuration Finished" echo "Compiling build"
cd ${RUNPATH}
mkdir -p build && cd build
cmake .. && make -j$(nproc)
echo "Configuration Finished"
}
uninstall() {
echo "Removing SuperBuild and build directories"
cd ${RUNPATH}/SuperBuild
rm -rfv build src download install
cd ../
rm -rfv build
}
reinstall() {
echo "Reinstalling ODM modules"
uninstall
install
}
usage() {
echo "Usage:"
echo "bash configure.sh <install|update|uninstall|help>"
echo "Subcommands:"
echo " install"
echo " Installs all dependencies and modules for running OpenDroneMap"
echo " reinstall"
echo " Removes SuperBuild and build modules, then re-installs them. Note this does not update OpenDroneMap to the latest version. "
echo " uninstall"
echo " Removes SuperBuild and build modules. Does not uninstall dependencies"
echo " help"
echo " Displays this message"
}
if [[ $1 =~ ^(install|reinstall|uninstall|usage)$ ]]; then
RUNPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
"$1"
else
echo "Invalid instructions." >&2
usage
exit 1
fi