Skip to content

DFO-Ocean-Navigator/Navigator2Go

Repository files navigation

Navigator2Go

Codacy Badge CodeFactor

Tool to manage your local Ocean Navigator installation.

Navigator2Go Manual

Code Documentation

Navigator2Go

Features

  • Control local gUnicorn and Apache Tomcat (THREDDS) servers.
  • Apply the full power of the Ocean Navigator to your own data by importing as a netCDF.
  • Customize your Navigator with easy-to-use configuration editors.
  • Download netCDF datasets from remote Navigator servers.

Getting Started

Use the Navigator installation script to set up some pre-requisites first, then continue below.

For more details about the Qt build process go here: http://doc.qt.io/qt-5/linux-building.html

  1. Install GCC 7 or newer to get access to all the latest and greatest C++ 17 features. For Ubuntu 16.04:
    • sudo add-apt-repository ppa:jonathonf/gcc-7.1
    • sudo apt update
    • sudo apt install -y gcc-7 g++-7
  2. Install dependencies using the following:
sudo apt install build-essential valgrind zlib1g-dev libgl1-mesa-dev libfontconfig1-dev libfreetype6-dev libx11-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libx11-xcb-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync0-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev doxygen-gui binutils-dev libnetcdf-c++4 libnetcdf-c++4-dev
  1. Go ahead and clone this repository into a directory of your choice:
git clone https://github.com/DFO-Ocean-Navigator/Navigator2Go.git
  1. Install Qt 5.11 Open Source: https://www.qt.io/download. Make sure you also check "Sources" when using the installer.
  2. Navigate to the Qt installation directory.
  3. Run mkdir static. Now we need to build Qt as a static library. This allows us to create a one-file executable.
  4. cd 5.11.0/Src/
  5. Run the following to configure Qt:
./configure -static -release -verbose -opensource -confirm-license -prefix $QT_INSTALL_DIRECTORY/static -qt-xcb -no-glib -no-pulseaudio -no-alsa -opengl desktop -nomake examples -nomake tests -skip wayland -skip qtdeclarative -static-runtime
  1. Then run: make -j12 clean. The -j12 tells make how many jobs it should spawn to build the project. Normally the number specified is the number of physical cores in your system.
  2. Run make -j12.
  3. Assuming no errors occoured (which shouldn't), finally run make -j12 install.
  4. Et Voila! Vous avez terminé!

Building for Release

So, you've made some changes to my lovely code that made it even more awesome. Time to send it out to the masses.

  1. Navigate to the source folder Navigator2Go/app/.
  2. Run ./Make_Release.sh. The script will compile the code, generate a tar.gz file, and calculate the MD5 hash of that tar.gz in the build/ folder.
  3. Go to Github and create a new release (upload Navigator2Go.tar.gz and Navigator2Go.tar.gz.md5).

Jenkins CI

Jenkins will run a series of unit tests (some of which exist in the tests/ folder) andcppcheck for static analysis after every commit, and before a pull request may be merged into master. Top-quality modern C++ is very important. Jenkins will also check for VERSION.TXT existing in the project root.

Updating Code Documentation

  1. To update the Github pages, run doxywizard from your terminal.
  2. Open the doxyfile in the app/ folder and increment the version number if needed to match VERSION.txt.
  3. Click the Run tab and then click on the Run Doxygen button.
  4. Commit and push your changes. The site will update automatically.

Incrementing Version Number

The program's version number is stored in VERSION.txt. This is included in Config_Tool.pro to make the number accessible to qmake and to C++. DO NOT remove or move this file, since this file is queried by the Navigator2Go update function. After changing the number as needed:

  • Run qmake from Qt Creator.
  • Clean and re-build the project.
  • Run the output binary and verify the number by going to Help -> About.