Files
OpenUxAS/doc/reference/UserManual/Installation/Installation.md
2017-10-17 13:57:17 -04:00

9.5 KiB
Raw Permalink Blame History

Dependencies

The primary tools and dependencies to obtain, build, document, and simulate UxAS are:

  • Git

  • OpenGL

  • UUID library

  • Boost

  • Python 3

  • Meson

  • Ninja

  • LmcpGen

  • OpenAMASE (optional, simulation)

  • NetBeans with Java JDK (optional, simulation)

  • Doxygen (optional, documentation)

  • LaTeX (optional, documentation)

The UxAS build system will download and compile the following external libraries

  • Google Test (gTest)

  • ZeroMQ (zeromq, czmq, cppzmq, zyre)

  • SQLite

  • Zlib

  • Minizip

  • Serial

Libraries for XML and GPS message parsing have numerous forks without centralized repository control. Code to build the following libraries is included with UxAS.

  • PugiXML

  • TinyGPS

Supported platforms

For an Ubuntu 16.04 or Mac OS X system with the listed prerequisite tools installed, UxAS should build from source without issue. Support for Windows is available on Windows 7 and 10 using Visual Studio.

Installing Prerequisite Tools on Ubuntu Linux -or- Mac OS X (Partially-Automated)

The following is a bash script that helps to partially-automation the “installing prerequisite tools” processes that are documented in this README.md file below.

This has been tested-working on Ubuntu 16.04, as of 2017-05-23

  1. Download the script from the OpenUxAS repository (install_most_deps.sh) OR cd to your git clone d OpenUxAS directory

  2. Run the script at the terminal: ./install_most_deps.sh

  3. Follow the on-screen instructions

Note that the most up-to-date instructions on the dependencies-needed for UxAS are available below.

Installing Prerequisite Tools on Ubuntu Linux

  1. Install git: in terminal

    • sudo apt-get install git

    • sudo apt-get install gitk

  2. Install OpenGL development headers: in terminal

    • sudo apt-get install libglu1-mesa-dev
  3. Install unique ID creation library: in terminal

    • sudo apt-get install uuid-dev
  4. Install Boostlibraries (optional but recommended; see external dependencies section): in terminal

    • sudo apt-get install libboost-filesystem-dev libboost-regex-dev libboost-system-dev
  5. Install doxygen and related packages optional: in terminal

    • sudo apt-get install doxygen

    • sudo apt-get install graphviz

    • sudo apt-get install texlive

    • sudo apt-get install texlive-latex-extra

  6. Install pip3: in terminal

    • sudo apt install python3-pip

    • sudo -H pip3 install upgrade pip

  7. Install ninja build system: in terminal

    • sudo -H pip3 install ninja
  8. Install meson build configuration: in terminal

    • sudo -H pip3 install meson
  9. Ensure dependency search for meson is supported: in terminal

    • sudo apt-get install pkg-config
  10. Install python plotting capabilities (optional): in terminal

    • sudo apt install python3-tk

    • sudo -H pip3 install matplotlib

    • sudo -H pip3 install pandas

  11. Install NetBeans and Oracle Java JDK (optional)

    • Download the Linux x64 version

    • Run downloaded install script. In terminal: cd  Downloads; sh jdk-9u131-nb-8_w-linux-x64.sh

    • Click Next three times, then Install

  12. Enable C/C++ plug-in in NetBeans (optional)

    • Open NetBeans (in Ubuntu search, type NetBeans)

    • Choose Tools->Plugins from the top menu

    • In the Available Plugins tab, search for C++

    • Select C/C++ and click Install

  13. Install Oracle Java run-time (required from LmcpGen): in terminal

    • sudo add-apt-repository ppa:webupd8team/java

    • sudo apt update; sudo apt install oracle-java8-installer

    • sudo apt install oracle-java8-set-default

Installing Prerequisites on Mac OS X

  1. Install XCode

  2. Enable commandline tools. In terminal: xcode-select install

  3. Install homebrew (must be administrator). In terminal: sudo ruby -e “$(curl5 -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”

  4. Add homebrew to path. In terminal: echo $(export Path=“/usr/local/bin:$PATH”) >>  /.bash_profile

  5. Install git. In termin0al: brew install git

  6. Install unique ID library. In terminal: brew install ossp-uuid

  7. Install Boost library and configure it in a fresh shell. In terminal:

    • brew install boost

    • echo export BOOST_ROOT=/usr/local >>  /.bash_profile

    • bash

  8. Install doxygen and related packages (optional). In terminal:

    • brew install doxygen

    • brew install graphviz

    • brew cask install mactex

  9. Install pip3. In terminal:

    • brew install python3
  10. Install nonja build system. In terminal:

    • brew install cmake

    • brew install pkg-config

    • sudo -H pip3 install scikit-build

    • sudo -H pip3 install ninja

  11. Install meson build configuration. In terminal:

    • sudo -H pip3 install meson
  12. Install python plotting capabilities (optional). In terminal:

    • sudo -H pip3 install matplotlib

    • sudo -H pip3 install pandas

  13. Install Oracle Java run-time(required for LmcpGen)

  14. Install NetBeans and Oracle JAva JDK (optional)

    • Download the Mac OSX version

    • Install .dmg

  15. Enable C++ plug-in in NetBeans (optional)

    • Open NetBeans

    • Choose Tools->Plugins from the top menu

    • In the Available Plugins tab, search for C++

    • Select C/C++ and click Install

Prep and Build on Native Windows

  1. Install Visual Studio 2017 Community Edition

    • Ensure C++ selected in Workloads tab

    • Ensure Git for Windows is selected in Individual components tab

  2. Install Git with Bash shell

  3. Install Python 3

    • Make sure to check Add Python 3.6 to PATH

    • Choose standard install (Install Now, requires admin)

    • Verify installation by: python --version in cmd prompt

    • Verify pip is also installed: pip --version in cmd prompt

    • If unable to get python on path, follow this answer using location C:\Users\[user]\AppData\Local\Programs\Python\Python36-32\

  4. Install meson

    • In cmd prompt with admin priviledges: pip install meson
  5. Install Boost

    • Note: the above link is for VS2017 pre-compiled libraries. To compile from source, you must install at the location: C:\local\boost_1_64_0
  6. Pull UxAS repositories (from Git Bash shell)

    • git -c http.sslVerify=false clone https://github.com/afrl-rq/OpenUxAS.git

    • git -c http.sslVerify=false clone https://github.com/afrl-rq/LmcpGen.git

    • git -c https://github.com/afrl-rq/OpenAMASE.git

  7. Build OpenAMASE

    • Load the OpenAMASE project in NetBeans and click Build
  8. Auto-create the UxAS messaging library

    • Download released executable from GitHub

    • Place LmcpGen.jar in LmcpGen/dist folder

    • From the Git Bash shell in the root UxAS directory, run sh RunLmcpGen.sh

    • Note: For simplicity, make sure the LMCPGen, OpenUxAS, and OpenAMASE repositories follow the folder structure labeled in the Configure UxAS and Related Projects section.

  9. Prepare build

    • Open VS command prompt (Tools -> Visual Studio Command Prompt)

    • Note: If the Visual Studio Command Prompt is absent from Visual Studio, it is also possible to perform the following actions by searching for the Developer Command Prompt for VS 2017 application and switching the working directory to the root OpenUxAS directory

    • python prepare

    • meson.py build --backend=vs This should create a Visual Studio solution in the build folder.

  10. Set UxAS as the Startup Project

    • Open the OpenUxAS.sln with Visual Studio, right-click the UxAS project found in the Solution Explorer

    • Select Set as StartUp Project

  11. Add the boost library to the Library Directories for the dependent projects

    • With the OpenUxAS solution open in Visaul Studio, right-click the uxas project from the Solution Explorer and select Properties from the context menu.

    • Select VC++ Directories located within the Configuration Properties node in the uxas Properties Pages Pop Up

    • In under the general tab, there will be a Library Directories option. Add the absolute path of the boost libraries here. Given boost was setup with the instruction above, this path should be C:\local\boost_1_64_0\lib32-msvc-14.1

  12. Build project with Visual Studio

    • Open project file OpenUxAS.sln in the OpenUxAS/build directory

    • In the Solution Explorer, right-click the uxas project, and select Build from the context menu

Caveats

  • The Visual Studio backend for Meson mostly works, but will fail when regenerating build files. If you modify one of the meson.build files, delete the build directory and run meson.py build --backend=vs again. The steps following the meson.build command must also be performed.

  • The UxAS test suite uses some hardcoded POSIX-style paths, and so does not currently work on Windows.