9.5 KiB
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
-
Download the script from the OpenUxAS repository (install_most_deps.sh) OR cd to your git clone d OpenUxAS directory
-
Run the script at the terminal: ./install_most_deps.sh
-
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
-
Install git: in terminal
-
sudo apt-get install git
-
sudo apt-get install gitk
-
-
Install OpenGL development headers: in terminal
- sudo apt-get install libglu1-mesa-dev
-
Install unique ID creation library: in terminal
- sudo apt-get install uuid-dev
-
Install Boostlibraries (optional but recommended; see external dependencies section): in terminal
- sudo apt-get install libboost-filesystem-dev libboost-regex-dev libboost-system-dev
-
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
-
-
Install pip3: in terminal
-
sudo apt install python3-pip
-
sudo -H pip3 install –upgrade pip
-
-
Install ninja build system: in terminal
- sudo -H pip3 install ninja
-
Install meson build configuration: in terminal
- sudo -H pip3 install meson
-
Ensure dependency search for meson is supported: in terminal
- sudo apt-get install pkg-config
-
Install python plotting capabilities (optional): in terminal
-
sudo apt install python3-tk
-
sudo -H pip3 install matplotlib
-
sudo -H pip3 install pandas
-
-
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
-
-
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
-
-
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
-
Install XCode
-
Enable commandline tools. In terminal: xcode-select –install
-
Install homebrew (must be administrator). In terminal: sudo ruby -e “$(curl5 -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”
-
Add homebrew to path. In terminal: echo $(export Path=“/usr/local/bin:$PATH”) >> /.bash_profile
-
Install git. In termin0al: brew install git
-
Install unique ID library. In terminal: brew install ossp-uuid
-
Install Boost library and configure it in a fresh shell. In terminal:
-
brew install boost
-
echo ’export BOOST_ROOT=/usr/local’ >> /.bash_profile
-
bash
-
-
Install doxygen and related packages (optional). In terminal:
-
brew install doxygen
-
brew install graphviz
-
brew cask install mactex
-
-
Install pip3. In terminal:
- brew install python3
-
Install nonja build system. In terminal:
-
brew install cmake
-
brew install pkg-config
-
sudo -H pip3 install scikit-build
-
sudo -H pip3 install ninja
-
-
Install meson build configuration. In terminal:
- sudo -H pip3 install meson
-
Install python plotting capabilities (optional). In terminal:
-
sudo -H pip3 install matplotlib
-
sudo -H pip3 install pandas
-
-
Install Oracle Java run-time(required for LmcpGen)
-
Install NetBeans and Oracle JAva JDK (optional)
-
Download the Mac OSX version
-
Install .dmg
-
-
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
-
Install Visual Studio 2017 Community Edition
-
Ensure C++ selected in
Workloadstab -
Ensure
Git for Windowsis selected inIndividual componentstab
-
-
Install Git with Bash shell
-
Install Python 3
-
Make sure to check
Add Python 3.6 to PATH -
Choose standard install (
Install Now, requires admin) -
Verify installation by:
python --versionincmdprompt -
Verify pip is also installed:
pip --versionincmdprompt -
If unable to get python on path, follow this answer using location
C:\Users\[user]\AppData\Local\Programs\Python\Python36-32\
-
-
Install meson
- In
cmdprompt with admin priviledges:pip install meson
- In
-
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
- Note: the above link is for VS2017 pre-compiled libraries. To compile from source, you must install at the location:
-
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
-
-
Build OpenAMASE
- Load the OpenAMASE project in NetBeans and click
Build
- Load the OpenAMASE project in NetBeans and click
-
Auto-create the UxAS messaging library
-
Download released executable from GitHub
-
Place
LmcpGen.jarinLmcpGen/distfolder -
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.
-
-
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 2017application and switching the working directory to the root OpenUxAS directory -
python prepare -
meson.py build --backend=vsThis should create a Visual Studio solution in the build folder.
-
-
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
-
-
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
Propertiesfrom the context menu. -
Select
VC++ Directorieslocated within theConfiguration Propertiesnode in theuxas Properties PagesPop Up -
In under the general tab, there will be a
Library Directoriesoption. Add the absolute path of the boost libraries here. Given boost was setup with the instruction above, this path should beC:\local\boost_1_64_0\lib32-msvc-14.1
-
-
Build project with Visual Studio
-
Open project file
OpenUxAS.slnin theOpenUxAS/builddirectory -
In the
Solution Explorer, right-click theuxasproject, and selectBuildfrom 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.buildfiles, delete thebuilddirectory and runmeson.py build --backend=vsagain. The steps following themeson.buildcommand must also be performed. -
The UxAS test suite uses some hardcoded POSIX-style paths, and so does not currently work on Windows.