Commit 29ef19a6 authored by Bryant's avatar Bryant

Updating QUpgrade build process.

Now properly checks for if QUpgrade submodule has been cloned.
Allows for disabled QUpgrade compilation.
Altered some code so that compiling without the QUpgrade module could
succeed.
Updated README about QUpgrade submodule.
parent 084ebb71
......@@ -26,11 +26,16 @@ WindowsBuild {
}
#
# QUpgrade
# QUpgrade support.
#
exists(qupgrade) {
message(Including support for QUpgrade)
# Allow the user to override QUpgrade compilation through a DISABLE_QUPGRADE
# define like: `qmake DEFINES=DISABLE_QUPGRADE`
contains(DEFINES, DISABLE_QUPGRADE) {
message("Skipping support for QUpgrade (manual override)")
}
# If the QUpgrade submodule has been initialized, build in support by default.
else:exists(qupgrade/.git) {
message("Including support for QUpgrade")
DEFINES += QUPGRADE_SUPPORT
......@@ -58,8 +63,10 @@ exists(qupgrade) {
LinuxBuild:CONFIG += qesp_linux_udev
include(qupgrade/libs/qextserialport/src/qextserialport.pri)
} else {
message(Skipping support for QUpgrade)
}
# Otherwise notify the user and don't compile it.
else {
message("Skipping support for QUpgrade (missing submodule, see README)")
}
#
......
......@@ -20,19 +20,14 @@ Please make sure to delete your build folder before re-building. Independent of
build system you use (this is not related to Qt or your OS) the dependency checking and
cleaning is based on the current project revision. So if you change the project and don't remove the build folder before your next build, incremental building can leave you with stale object files.
## QGC2.0 Tech Preview
Developers: In order to build the tech preview branch you need to:
### QUpgrade
QUpgrade is a submodule (a Git feature like a sub-repository) that contains extra functionality. It is compiled in by default if it has initialized and updated. It can be disabled by specifying the DISABLE_QUPGRADE definition when calling qmake `qmake DEFINES=DISABLE_QUPGRADE`.
git clone https://github.com/mavlink/qgroundcontrol -b config qgc2
git submodule init
git submodule update
This procedure:
* Clones the config branch (which contains QGC2) from github into your qgc2 directory
* initializes all the submodules required for QGC, such as qupdate, the firmware installer
* gets the latest code for all submodules
To include QUpgrade functionality run the following (only needs to be done once after cloning the qggroundcontrol git repository):
* `git submodule init`
* `git submodule update`
The QUpgrade module relies on `libudev` on Linux platforms.
# Build on Mac OSX
......
......@@ -23,7 +23,10 @@
#include "ui_QGCPX4VehicleConfig.h"
#include "px4_configuration/QGCPX4AirframeConfig.h"
#include "px4_configuration/QGCPX4SensorCalibration.h"
#ifdef QUPGRADE_SUPPORT
#include <dialog_bare.h>
#endif
#define WIDGET_INDEX_FIRMWARE 0
#define WIDGET_INDEX_RC 1
......@@ -106,7 +109,6 @@ QGCPX4VehicleConfig::QGCPX4VehicleConfig(QWidget *parent) :
connect(firmwareDialog, SIGNAL(connectLinks()), LinkManager::instance(), SLOT(connectAll()));
connect(firmwareDialog, SIGNAL(disconnectLinks()), LinkManager::instance(), SLOT(disconnectAll()));
#else
#error Please check out QUpgrade from http://github.com/LorenzMeier/qupgrade/ into the QGroundControl folder.
QLabel* label = new QLabel(this);
label->setText("THIS VERSION OF QGROUNDCONTROL WAS BUILT WITHOUT QUPGRADE. To enable firmware upload support, checkout QUpgrade WITHIN the QGroundControl folder");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment