Skip to content

Commit

Permalink
Revert "set QGC version from git"
Browse files Browse the repository at this point in the history
  • Loading branch information
DonLakeFlyer committed Aug 29, 2015
1 parent f10e77c commit 633178e
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 65 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,3 @@ ui_*
*.so*
*.moc
*.prl
git_version.cpp
git_version.obj
3 changes: 1 addition & 2 deletions QGCApplication.pro
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@
# -------------------------------------------------

include(QGCCommon.pri)
include(git_version.pri)

TARGET = qgroundcontrol
TEMPLATE = app
TEMPLATE = app

# Load additional config flags from user_config.pri
exists(user_config.pri):infile(user_config.pri, CONFIG) {
Expand Down
27 changes: 8 additions & 19 deletions deploy/ubuntu_ppa
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,28 +1,17 @@
#! /bin/bash

tmpdir=`mktemp -d`
long_version=`git describe --always --tags`
short_version=`git describe --always --tags | cut -d "-" -f 1,2`
version="2.4"
rsync -av --delete --exclude=.git ~/git/qgroundcontrol/ ~/tmp/qgroundcontrol-${version}/

version=${long_version:1}
dir_version=${short_version:1}
echo $version
cd ~/tmp
tar pczf qgroundcontrol_${version}.orig.tar.gz qgroundcontrol-${version}

debchange -v ${version} --distribution trusty

qmake -r qgroundcontrol.pro
make git_ver

rsync -av --delete --exclude={.git,build-release,release,Makefile\*} . ${tmpdir}/qgroundcontrol-${dir_version}/

cd ${tmpdir}
tar pczf qgroundcontrol_${dir_version}.orig.tar.gz qgroundcontrol-${dir_version}

cd ${tmpdir}/qgroundcontrol-${dir_version}/
cd ~/tmp/qgroundcontrol-${version}/
debuild -S

dput ppa:qgroundcontrol/ppa ${tmpdir}/qgroundcontrol_${version}_source.changes
dput ppa:qgroundcontrol/ppa qgroundcontrol_${version}-0ubuntu1_source.changes



# test building the source deb locally
#debuild --prepend-path=/usr/lib/ccache -sa
debuild --prepend-path=/usr/lib/ccache -sa
26 changes: 0 additions & 26 deletions git_version.pri

This file was deleted.

5 changes: 0 additions & 5 deletions qgroundcontrol.pro
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ CONFIG += ordered
SUBDIRS = ./QGCLocationPlugin.pro
SUBDIRS += ./QGCApplication.pro

include(git_version.pri)

QGCApplication.depends = QGCLocationPlugin

message(Qt version $$[QT_VERSION])
Expand All @@ -32,6 +30,3 @@ message(Qt version $$[QT_VERSION])
error("Unsupported Qt version, 5.4+ is required")
}

message(QGroundControl version $${GIT_DESCRIBE})
git_ver.commands = $$QGC_GIT_VER
QMAKE_EXTRA_TARGETS += git_ver
11 changes: 4 additions & 7 deletions src/QGCApplication.cc
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ GST_PLUGIN_STATIC_DECLARE(QTVIDEOSINK_NAME);
G_END_DECLS
#endif

#include "git_version.h"
#include "configuration.h"
#include "QGC.h"
#include "QGCApplication.h"
Expand Down Expand Up @@ -256,12 +255,10 @@ QGCApplication::QGCApplication(int &argc, char* argv[], bool unitTesting)
setOrganizationName(QGC_ORG_NAME);
setOrganizationDomain(QGC_ORG_DOMAIN);

QString versionString(git_version());
// stable versions are on tags (v1.2.3)
// development versions are full git describe versions (v1.2.3-18-g879e8b3)
if (versionString.length() > 8) {
versionString.append(" (Development)");
}
// Version string is build from component parts. Format is:
// vMajor.Minor.BuildNumber BuildType
QString versionString("v%1.%2.%3 %4");
versionString = versionString.arg(QGC_APPLICATION_VERSION_MAJOR).arg(QGC_APPLICATION_VERSION_MINOR).arg(QGC_APPLICATION_VERSION_BUILDNUMBER).arg(QGC_APPLICATION_VERSION_BUILDTYPE);
this->setApplicationVersion(versionString);

// Set settings format
Expand Down
17 changes: 17 additions & 0 deletions src/QGCConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,21 @@
#define QGC_ORG_NAME "QGroundControl.org"
#define QGC_ORG_DOMAIN "org.qgroundcontrol"

#define QGC_APPLICATION_VERSION_MAJOR 2
#define QGC_APPLICATION_VERSION_MINOR 7

// The following #definess can be overriden from the command line so that automated build systems can
// add additional build identification.

// Only comes from command line
//#define QGC_APPLICATION_VERSION_COMMIT "..."

#ifndef QGC_APPLICATION_VERSION_BUILDNUMBER
#define QGC_APPLICATION_VERSION_BUILDNUMBER 1
#endif

#ifndef QGC_APPLICATION_VERSION_BUILDTYPE
#define QGC_APPLICATION_VERSION_BUILDTYPE "(Stable)"
#endif

#endif // QGC_CONFIGURATION_H
2 changes: 1 addition & 1 deletion src/comm/MAVLinkProtocol.cc
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ void MAVLinkProtocol::_linkStatusChanged(LinkInterface* link, bool connected)
// Send command to start MAVLink
// XXX hacky but safe
// Start NSH
const char init[] = {0x0d, 0x0d, 0x0d, 0x0d};
const char init[] = {0x0d, 0x0d, 0x0d};
link->writeBytes(init, sizeof(init));
const char* cmd = "sh /etc/init.d/rc.usb\n";
link->writeBytes(cmd, strlen(cmd));
Expand Down
3 changes: 0 additions & 3 deletions src/git_version.h

This file was deleted.

0 comments on commit 633178e

Please sign in to comment.