Skip to content

Latest commit

 

History

History
130 lines (87 loc) · 6.83 KB

README.md

File metadata and controls

130 lines (87 loc) · 6.83 KB

Getting Started

This topic explains how to get the QGroundControl source code and build it either natively or within a Vagrant environment. It also provides information about optional or OS specific functionality.

Daily Builds

If you just want to test (and not debug) a recent build of QGroundControl you can use the Daily Build. Versions are provided for all platforms.

Source Code

Source code for QGroundControl is kept on GitHub here: https://github.com/mavlink/qgroundcontrol. It is dual-licensed under Apache 2.0 and GPLv3.

To get the source files:

  1. Clone the repo (or your fork) including submodules:
    git clone https://github.com/mavlink/qgroundcontrol.git --recursive
    
  2. Update submodules (required each time you pull new source code):
    git submodule update
    

Tip Github source-code zip files cannot be used because these do not contain the appropriate submodule source code. You must use git!

Build QGroundControl

Native Builds

QGroundControl builds are supported for macOS, Linux, Windows, iOS and Android. QGroundControl uses Qt as its cross-platform support library and uses QtCreator as its default build environment.

  • macOS: v10.11 or higher
  • Ubuntu: 64 bit, gcc compiler
  • Windows: Vista or higher, Visual Studio 2015 compiler (32 bit)
  • iOS: 10.0 and higher
  • Android: Jelly Bean (4.1) and higher. Standard QGC is built against ndk version 19.
  • Qt version: {{ book.qt_version }} (only)

Tip For more information see: Qt 5 supported platform list.

Note Native CentOS Builds are also supported, but are documented separately (as the tested environment is different).

Install Visual Studio 2015 (Windows Only) {#vs2015}

The Windows compiler can be found here: Visual Studio 2015 compiler (32 bit)

When installing, you must minimally select all Visual C++ components as shown: Visual Studio 2015 - Select all Visual C++ Components

Install Qt

You need to install Qt as described below instead of using pre-built packages from say, a Linux distribution, because QGroundControl needs access to private Qt headers.

To install Qt:

  1. Download and run the Qt Online Installer

    • Ubuntu:
      • Set the downloaded file to executable using: chmod +x.
      • Install to default location for use with ./qgroundcontrol-start.sh. If you install Qt to a non-default location you will need to modify qgroundcontrol-start.sh in order to run downloaded builds.
  2. In the installer Select Components dialog choose: {{ book.qt_version }}.

    Then install just the following components:

    • Windows: MSVC 2015 32 bit
    • MacOS: macOS
    • Linux: Desktop gcc 64-bit
    • All:
      • Qt Charts and Qt Remote Objects (TP)
      • Android ARMv7 (to build Android)
  3. Install Additional Packages (Platform Specific)

    • Ubuntu: sudo apt-get install speech-dispatcher libudev-dev libsdl2-dev
    • Fedora: sudo dnf install speech-dispatcher SDL2-devel SDL2 systemd-devel
    • Arch Linux: pacman -Sy speech-dispatcher
    • Windows: USB Driver to connect to Pixhawk/PX4Flow/3DR Radio
    • Android: Qt Android Setup

Building using Qt Creator

  1. Launch Qt Creator and open the qgroundcontrol.pro project.
  2. Select the appropriate kit for your needs:
  • OSX: Desktop Qt {{ book.qt_version }} clang 64 bit

    Note iOS builds must be built using XCode.

  • Ubuntu: Desktop Qt {{ book.qt_version }} GCC 64bit
  • Windows: Desktop Qt {{ book.qt_version }} MSVC2015 32bit
  • Android: Android for armeabi-v7a (GCC 4.9, Qt {{ book.qt_version }})
  1. Build using the "hammer" (or "play") icons:

    QtCreator Build Button

Vagrant

Vagrant can be used to build and run QGroundControl within a Linux virtual machine (the build can also be run on the host machine if it is compatible).

  1. Download and Install Vagrant
  2. From the root directory of the QGroundControl repository run vagrant up
  3. To use the graphical environment run vagrant reload

Additional Build Notes for all Supported OS

  • Parallel builds: For non Windows builds, you can use the -j# option to run parellel builds.
  • Location of built files: Individual build file results can be found in the build_debug or build_release directories. The built executable can be found in the debug or release directory.
  • If you get this error when running QGroundControl: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version 'GLIBCXX_3.4.20' not found., you need to either update to the latest gcc, or install the latest libstdc++.6 using: sudo apt-get install libstdc++6.
  • Unit tests: To run the unit tests, build in debug mode with UNITTEST_BUILD definition, and then copy deploy/qgroundcontrol-start.sh script into the debug directory before running the tests.

Optional/OS-Specific Functionality

QGroundControl has functionality that is dependent on the operating system and libraries installed by the user. The following sections describe these features, their dependencies, and how to disable/alter them during the build process. These features can be forcibly enabled/disabled by specifying additional values to qmake.

Video Streaming

Check the Video Streaming directory for further instructions.

Building QGC Installation Files

You can additionally create installation file(s) for QGroundControl as part of the normal build process.

Note On Windows you will need to first install NSIS.

To add support for installation file creation you need to add CONFIG+=installer to your project file, or when you call qmake.

To do this in Qt Creator:

  • Open Projects > Build > Build Steps > qmake > Additional arguments.
  • Enter CONFIG+=installer as shown: Installer