1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-01 09:24:10 +01:00

Merge remote-tracking branch 'origin/rel-12.10.2' into os/OP-758-windows-installer

This commit is contained in:
Oleg Semyonov 2012-12-10 17:57:50 +02:00
commit 0f24034433
21 changed files with 203 additions and 189 deletions

View File

@ -198,3 +198,6 @@ D: Russian translation of the GCS
N: Brian Webb
D: Modem lead developer
M: OP Modems
N: Dmitriy Zaitsev
D: AeroSim-RC HiTL plugin

View File

@ -13,3 +13,5 @@ following URL: http://bugs.openpilot.org/browse/OP-XXX
+ [OP-732] Import UAV Settings for inactive modules crashes the running firmware (board restarts).
Workaround: update firmware, power cycle, enable modules, power cycle, import configuration.
+ [OP-747] Board infinitely reboots itself after firmware upgrade (settings erase firmware is a workaround).
+ [OP-723] GCS uses the system language ot the 1st run. After restart it uses English (can be changed later).
+ [OP-725] GCS camera stab config error message disappears too fast (but config error is cleared as it should)

View File

@ -6,7 +6,7 @@
<Description>Default configuration</Description>
<Details>Default configuration built to work on all screen sizes</Details>
<ExpertMode>false</ExpertMode>
<OverrideLanguage>en_AU</OverrideLanguage>
<OverrideLanguage>C</OverrideLanguage>
<SaveSettingsOnExit>true</SaveSettingsOnExit>
<SettingsWindowHeight>700</SettingsWindowHeight>
<SettingsWindowWidth>800</SettingsWindowWidth>
@ -2592,27 +2592,18 @@
</side0>
<side1>
<side0>
<side0>
<classId>LoggingGadget</classId>
<type>uavGadget</type>
</side0>
<side1>
<classId>GpsDisplayGadget</classId>
<gadget>
<activeConfiguration>Flight GPS</activeConfiguration>
</gadget>
<type>uavGadget</type>
</side1>
<splitterOrientation>2</splitterOrientation>
<splitterSizes>@Variant(AAAACQAAAAIAAAACAAAAcAAAAAIAAAHo)</splitterSizes>
<type>splitter</type>
<classId>LoggingGadget</classId>
<type>uavGadget</type>
</side0>
<side1>
<classId>DebugGadget</classId>
<classId>GpsDisplayGadget</classId>
<gadget>
<activeConfiguration>Flight GPS</activeConfiguration>
</gadget>
<type>uavGadget</type>
</side1>
<splitterOrientation>2</splitterOrientation>
<splitterSizes>@Variant(AAAACQAAAAIAAAACAAAB3wAAAAIAAAEp)</splitterSizes>
<splitterSizes>@Variant(AAAACQAAAAIAAAACAAAAVAAAAAIAAAGu)</splitterSizes>
<type>splitter</type>
</side1>
<splitterOrientation>1</splitterOrientation>

View File

@ -8,6 +8,7 @@
<SaveSettingsOnExit>true</SaveSettingsOnExit>
<SettingsWindowHeight>700</SettingsWindowHeight>
<SettingsWindowWidth>800</SettingsWindowWidth>
<OverrideLanguage>C</OverrideLanguage>
<UDPMirror>false</UDPMirror>
<Description>Wide configuration</Description>
<Details>Default configuration built for wide screens (17"up)</Details>
@ -2604,27 +2605,18 @@
</side0>
<side1>
<side0>
<side0>
<classId>LoggingGadget</classId>
<type>uavGadget</type>
</side0>
<side1>
<classId>GpsDisplayGadget</classId>
<gadget>
<activeConfiguration>Flight GPS</activeConfiguration>
</gadget>
<type>uavGadget</type>
</side1>
<splitterOrientation>2</splitterOrientation>
<splitterSizes>@Variant(AAAACQAAAAIAAAACAAAAcAAAAAIAAAHo)</splitterSizes>
<type>splitter</type>
<classId>LoggingGadget</classId>
<type>uavGadget</type>
</side0>
<side1>
<classId>DebugGadget</classId>
<classId>GpsDisplayGadget</classId>
<gadget>
<activeConfiguration>Flight GPS</activeConfiguration>
</gadget>
<type>uavGadget</type>
</side1>
<splitterOrientation>2</splitterOrientation>
<splitterSizes>@Variant(AAAACQAAAAIAAAACAAAB3wAAAAIAAAEp)</splitterSizes>
<splitterSizes>@Variant(AAAACQAAAAIAAAACAAAAVAAAAAIAAAGu)</splitterSizes>
<type>splitter</type>
</side1>
<splitterOrientation>1</splitterOrientation>

View File

@ -241,6 +241,11 @@ int main(int argc, char **argv)
#ifdef Q_OS_LINUX
QApplication::setAttribute(Qt::AA_X11InitThreads, true);
#endif
//Set the default locale to EN, if this is not set the system locale will be used
//and as of now we dont want that behaviour.
QLocale::setDefault(QLocale::English);
QApplication::setGraphicsSystem("raster");
SharedTools::QtSingleApplication app((QLatin1String(appNameC)), argc, argv);

View File

@ -278,7 +278,7 @@ void ConfigGadgetWidget::updatePipXStatus(UAVObject *object)
icon->addFile(":/configgadget/images/pipx-selected.png", QSize(), QIcon::Selected, QIcon::Off);
QWidget *qwd = new ConfigPipXtremeWidget(this);
ftw->insertTab(ConfigGadgetWidget::pipxtreme, qwd, *icon, QString("PipXtreme"));
ftw->insertTab(ConfigGadgetWidget::pipxtreme, qwd, *icon, QString("OPLink"));
pipxConnected = true;
}
}

View File

@ -4,8 +4,7 @@ Without the work of the people in this file OpenPilot would not be what it is to
<p>It is sorted alphabetically by name</p>
<pre>
Connor Abbott
<pre>Connor Abbott
David Ankers
Sergiy Anikeyev
Pedro Assuncao
@ -75,6 +74,7 @@ Brian Webb
Justin Welander
Mat Wellington
Kendal Wells
Dmitriy Zaitsev
</pre>
</html>

View File

@ -35,8 +35,6 @@ namespace Constants {
#define GCS_VERSION_MAJOR 1
#define GCS_VERSION_MINOR 0
#define GCS_VERSION_RELEASE 0
const char * const GCS_VERSION_TYPE = "Alpha";
const char * const GCS_VERSION_CODENAME = "Pascal";
#define STRINGIFY_INTERNAL(x) #x
#define STRINGIFY(x) STRINGIFY_INTERNAL(x)
@ -46,18 +44,34 @@ const char * const GCS_VERSION_CODENAME = "Pascal";
"." STRINGIFY(GCS_VERSION_RELEASE)
const char * const GCS_VERSION_LONG = GCS_VERSION;
const char * const GCS_AUTHOR = "OpenPilot Project";
const char * const GCS_YEAR = "2012";
const char * const GCS_HELP = "http://wiki.openpilot.org";
#ifdef GCS_REVISION
const char * const GCS_REVISION_STR = STRINGIFY(GCS_REVISION);
const char * const GCS_REVISION_STR = GCS_REVISION;
#else
const char * const GCS_REVISION_STR = "N/A";
#endif
#ifdef GCS_YEAR
const char * const GCS_YEAR_STR = GCS_YEAR;
#else
const char * const GCS_YEAR_STR = "2013";
#endif
#ifdef GCS_ORIGIN
const char * const GCS_ORIGIN_STR = GCS_ORIGIN;
#else
const char * const GCS_ORIGIN_STR = "unknown repository";
#endif
#ifdef UAVO_HASH
const char * const UAVOSHA1_STR = STRINGIFY(UAVO_HASH);
#else
const char * const GCS_REVISION_STR = "";
const char * const UAVOSHA1_STR = "";
#endif
const char * const GCS_AUTHOR = "The OpenPilot Project";
const char * const GCS_HELP = "http://wiki.openpilot.org";
#undef GCS_VERSION
#undef STRINGIFY
#undef STRINGIFY_INTERNAL

View File

@ -10,47 +10,47 @@ importSettings::importSettings(QWidget *parent) :
ui(new Ui::importSettings)
{
ui->setupUi(this);
connect(ui->cbConfigs,SIGNAL(currentIndexChanged(int)),this,SLOT(updateDetails(int)));
connect(ui->btnLoad,SIGNAL(clicked()),this,SLOT(accept()));
QTimer::singleShot(500,this,SLOT(repaint()));
connect(ui->cbConfigs, SIGNAL(currentIndexChanged(int)), this, SLOT(updateDetails(int)));
connect(ui->btnLoad, SIGNAL(clicked()), this, SLOT(accept()));
QTimer::singleShot(500, this, SLOT(repaint()));
}
void importSettings::loadFiles(QString path)
{
QDir myDir(path);
QStringList filters;
filters << "*.xml";
QStringList list = myDir.entryList(filters,QDir::Files);
int x=0;
foreach(QString fileStr, list)
{
fileInfo * info=new fileInfo;
QSettings settings(path+QDir::separator()+fileStr, XmlConfig::XmlSettingsFormat);
int x = 0;
foreach(QString fileStr, list) {
fileInfo *info = new fileInfo;
QSettings settings(path+QDir::separator() + fileStr, XmlConfig::XmlSettingsFormat);
settings.beginGroup("General");
info->description=settings.value("Description","None").toString();
info->details=settings.value("Details","None").toString();
info->description = settings.value("Description", "None").toString();
info->details = settings.value("Details", "None").toString();
settings.endGroup();
info->file=path+QDir::separator()+fileStr;
info->file = path + QDir::separator() + fileStr;
configList.insert(x,info);
ui->cbConfigs->addItem(info->description,x);
ui->cbConfigs->addItem(info->description, x);
++x;
}
}
void importSettings::updateDetails(int index)
{
fileInfo * info=configList.value(ui->cbConfigs->itemData(index).toInt());
fileInfo *info = configList.value(ui->cbConfigs->itemData(index).toInt());
ui->lblDetails->setText(info->details);
}
QString importSettings::choosenConfig()
{
fileInfo * info=configList.value(ui->cbConfigs->itemData(ui->cbConfigs->currentIndex()).toInt());
fileInfo *info = configList.value(ui->cbConfigs->itemData(ui->cbConfigs->currentIndex()).toInt());
return info->file;
}
importSettings::~importSettings()
{
foreach(fileInfo * info,configList.values())
{
foreach(fileInfo * info,configList.values()) {
delete info;
}
delete ui;

View File

@ -1,3 +1,4 @@
#ifndef IMPORTSETTINGS_H
#define IMPORTSETTINGS_H
@ -10,8 +11,7 @@ class importSettings;
class importSettings : public QDialog
{
Q_OBJECT
struct fileInfo
{
struct fileInfo {
QString file;
QString description;
QString details;
@ -23,9 +23,11 @@ public:
void loadFiles(QString path);
QString choosenConfig();
private:
Ui::importSettings *ui;
QMap<int,fileInfo*> configList;
private slots:
void updateDetails(int);
};

View File

@ -266,18 +266,15 @@ void MainWindow::modeChanged(Core::IMode */*mode*/)
void MainWindow::extensionsInitialized()
{
QSettings* qs = m_settings;
QSettings * settings;
QSettings *qs = m_settings;
QSettings *settings;
QString commandLine;
if ( ! qs->allKeys().count() ){
foreach(QString str,qApp->arguments())
{
if(str.contains("configfile"))
{
qDebug()<<"ass";
commandLine=str.split("=").at(1);
qDebug()<<commandLine;
if ( ! qs->allKeys().count() ) {
foreach(QString str, qApp->arguments()) {
if(str.contains("configfile")) {
qDebug() << "ass";
commandLine = str.split("=").at(1);
qDebug() << commandLine;
}
}
QDir directory(QCoreApplication::applicationDirPath());
@ -289,37 +286,34 @@ void MainWindow::extensionsInitialized()
directory.cd("share");
directory.cd("openpilotgcs");
#endif
directory.cd("default_configurations");
directory.cd("default_configurations");
qDebug() << "Looking for default config files in: " + directory.absolutePath();
bool showDialog=true;
qDebug() << "Looking for default config files in: " + directory.absolutePath();
bool showDialog = true;
QString filename;
if(!commandLine.isEmpty())
{
if(QFile::exists(directory.absolutePath()+QDir::separator()+commandLine))
{
filename=directory.absolutePath()+QDir::separator()+commandLine;
qDebug()<<"Load configuration from command line";
settings=new QSettings(filename, XmlConfig::XmlSettingsFormat);
showDialog=false;
if(!commandLine.isEmpty()) {
if(QFile::exists(directory.absolutePath() + QDir::separator()+commandLine)) {
filename = directory.absolutePath() + QDir::separator()+commandLine;
qDebug() << "Load configuration from command line";
settings = new QSettings(filename, XmlConfig::XmlSettingsFormat);
showDialog = false;
}
}
if(showDialog)
{
importSettings * dialog=new importSettings(this);
if(showDialog) {
importSettings *dialog = new importSettings(this);
dialog->loadFiles(directory.absolutePath());
dialog->exec();
filename=dialog->choosenConfig();
settings=new QSettings(filename, XmlConfig::XmlSettingsFormat);
filename = dialog->choosenConfig();
settings = new QSettings(filename, XmlConfig::XmlSettingsFormat);
delete dialog;
}
qs=settings;
qDebug() << "Load default config from resource "<<filename;
qs = settings;
qDebug() << "Load default config from resource " << filename;
}
qs->beginGroup("General");
m_config_description=qs->value("Description","none").toString();
m_config_details=qs->value("Details","none").toString();
m_config_stylesheet=qs->value("StyleSheet","none").toString();
m_config_description=qs->value("Description", "none").toString();
m_config_details=qs->value("Details", "none").toString();
m_config_stylesheet=qs->value("StyleSheet", "none").toString();
loadStyleSheet(m_config_stylesheet);
qs->endGroup();
m_uavGadgetInstanceManager = new UAVGadgetInstanceManager(this);
@ -799,16 +793,6 @@ void MainWindow::registerDefaultActions()
mhelp->addAction(cmd, Constants::G_HELP_ABOUT);
#endif
//About Plugins Action
tmpaction = new QAction(QIcon(Constants::ICON_PLUGIN), tr("About &Plugins..."), this);
cmd = am->registerAction(tmpaction, Constants::ABOUT_PLUGINS, m_globalContext);
mhelp->addAction(cmd, Constants::G_HELP_ABOUT);
tmpaction->setEnabled(true);
#ifdef Q_WS_MAC
cmd->action()->setMenuRole(QAction::ApplicationSpecificRole);
#endif
connect(tmpaction, SIGNAL(triggered()), this, SLOT(aboutPlugins()));
// About GCS Action
#ifdef Q_WS_MAC
tmpaction = new QAction(QIcon(Constants::ICON_OPENPILOT), tr("About &OpenPilot GCS"), this); // it's convention not to add dots to the about menu
@ -823,6 +807,16 @@ void MainWindow::registerDefaultActions()
#endif
connect(tmpaction, SIGNAL(triggered()), this, SLOT(aboutOpenPilotGCS()));
//About Plugins Action
tmpaction = new QAction(QIcon(Constants::ICON_PLUGIN), tr("About &Plugins..."), this);
cmd = am->registerAction(tmpaction, Constants::ABOUT_PLUGINS, m_globalContext);
mhelp->addAction(cmd, Constants::G_HELP_ABOUT);
tmpaction->setEnabled(true);
#ifdef Q_WS_MAC
cmd->action()->setMenuRole(QAction::ApplicationSpecificRole);
#endif
connect(tmpaction, SIGNAL(triggered()), this, SLOT(aboutPlugins()));
//Credits Action
tmpaction = new QAction(QIcon(Constants::ICON_PLUGIN), tr("About &Authors..."), this);
cmd = am->registerAction(tmpaction, Constants::ABOUT_AUTHORS, m_globalContext);

View File

@ -59,16 +59,7 @@ VersionDialog::VersionDialog(QWidget *parent)
QGridLayout *layout = new QGridLayout(this);
layout->setSizeConstraint(QLayout::SetFixedSize);
QString version = QLatin1String(GCS_VERSION_LONG);
version += QDate(2007, 25, 10).toString(Qt::SystemLocaleDate);
QString ideRev;
#ifdef GCS_REVISION
//: This gets conditionally inserted as argument %8 into the description string.
ideRev = tr("From revision %1<br/>").arg(QString::fromLatin1(GCS_REVISION_STR).left(60));
#endif
QString uavoHashStr;
#ifdef UAVO_HASH
#ifdef UAVO_HASH
//: This gets conditionally inserted as argument %11 into the description string.
QByteArray uavoHashArray;
QString uavoHash = QString::fromLatin1(Core::Constants::UAVOSHA1_STR);
@ -85,31 +76,41 @@ VersionDialog::VersionDialog(QWidget *parent)
{
gcsUavoHashStr.append(QString::number(i,16).right(2));
}
uavoHashStr = tr("UAVO hash %1<br/>").arg(gcsUavoHashStr);
#endif
QString uavoHashStr = gcsUavoHashStr;
#else
QString uavoHashStr = "N/A";
#endif
const QString description = tr(
"<h3>OpenPilot GCS %1 %9 (%10)</h3>"
"Based on Qt %2 (%3 bit)<br/>"
"<h3>OpenPilot Ground Control Station</h3>"
"GCS Revision: <b>%1</b><br/>"
"UAVO Hash: %2<br/>"
"<br/>"
"Built on %4 at %5<br />"
"Built from %3<br/>"
"Built on %4 at %5<br/>"
"Based on Qt %6 (%7 bit)<br/>"
"<br/>"
"%8"
"&copy; %8, 2010-%9. All rights reserved.<br/>"
"<br/>"
"%11"
"<small>This program is free software; you can redistribute it and/or modify<br/>"
"it under the terms of the GNU General Public License as published by<br/>"
"the Free Software Foundation; either version 3 of the License, or<br/>"
"(at your option) any later version.<br/>"
"<br/>"
"Copyright 2010-%6 %7. All rights reserved.<br/>"
"<br/>"
"<small>This program is free software; you can redistribute it and/or modify<br/>"
"it under the terms of the GNU General Public License as published by<br/>"
"the Free Software Foundation; either version 3 of the License, or<br/>"
"(at your option) any later version.<br/><br/>"
"The program is provided AS IS with NO WARRANTY OF ANY KIND, "
"INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A "
"PARTICULAR PURPOSE.</small><br/>")
.arg(version, QLatin1String(QT_VERSION_STR), QString::number(QSysInfo::WordSize),
QLatin1String(__DATE__), QLatin1String(__TIME__), QLatin1String(GCS_YEAR),
(QLatin1String(GCS_AUTHOR)), ideRev).arg(QLatin1String(GCS_VERSION_TYPE), QLatin1String(GCS_VERSION_CODENAME), uavoHashStr);
"PARTICULAR PURPOSE.</small>"
).arg(
QString::fromLatin1(GCS_REVISION_STR).left(60), // %1
uavoHashStr, // %2
QLatin1String(GCS_ORIGIN_STR), // $3
QLatin1String(__DATE__), // %4
QLatin1String(__TIME__), // %5
QLatin1String(QT_VERSION_STR), // %6
QString::number(QSysInfo::WordSize), // %7
QLatin1String(GCS_AUTHOR), // %8
QLatin1String(GCS_YEAR_STR) // %9
);
QLabel *copyRightLabel = new QLabel(description);
copyRightLabel->setWordWrap(true);

View File

@ -123,7 +123,7 @@ void ControllerPage::setupBoardTypes()
ui->boardTypeCombo->addItem(tr("OpenPilot CopterControl 3D"), SetupWizard::CONTROLLER_CC3D);
ui->boardTypeCombo->addItem(tr("OpenPilot Revolution"), SetupWizard::CONTROLLER_REVO);
//ui->boardTypeCombo->model()->setData(ui->boardTypeCombo->model()->index(ui->boardTypeCombo->count() - 1, 0), v, Qt::UserRole - 1);
ui->boardTypeCombo->addItem(tr("OpenPilot PipX Radio Modem"), SetupWizard::CONTROLLER_PIPX);
ui->boardTypeCombo->addItem(tr("OpenPilot OPLink Radio Modem"), SetupWizard::CONTROLLER_PIPX);
//ui->boardTypeCombo->model()->setData(ui->boardTypeCombo->model()->index(ui->boardTypeCombo->count() - 1, 0), v, Qt::UserRole - 1);
}

View File

@ -148,7 +148,7 @@ QString SetupWizard::getSummaryText()
summary.append(tr("OpenPilot Revolution"));
break;
case CONTROLLER_PIPX:
summary.append(tr("OpenPilot PipX Radio Modem"));
summary.append(tr("OpenPilot OPLink Radio Modem"));
break;
default:
summary.append(tr("Unknown"));

View File

@ -22,7 +22,7 @@ public:
return QString("OpenPilot INS");
break;
case 0x0301://PipX
return QString("PipXtreme");
return QString("OPLink");
break;
case 0x0401://Coptercontrol
return QString("CopterControl");

View File

@ -158,6 +158,20 @@ class Repo:
else:
return clean
def label(self):
"""Return package label (tag if defined, or date-hash if no tag)"""
if self._tag == None:
return ''.join([self.time('%Y%m%d'), "-", self.hash(8, 'untagged'), self.dirty()])
else:
return ''.join([self.tag(''), self.dirty()])
def revision(self):
"""Return full revison string (tag if defined, or branch:hash date time if no tag)"""
if self._tag == None:
return ''.join([self.branch('no-branch'), ":", self.hash(8, 'no-hash'), self.dirty(), self.time(' %Y%m%d %H:%M')])
else:
return ''.join([self.tag(''), self.dirty()])
def info(self):
"""Print some repository info"""
print "path: ", self.path()
@ -169,6 +183,8 @@ class Repo:
print "branch: ", self.branch()
print "commit tag: ", self.tag('')
print "dirty: ", self.dirty('yes', 'no')
print "label: ", self.label()
print "revision: ", self.revision()
def file_from_template(tpl_name, out_name, dict):
"""Create or update file from template using dictionary
@ -380,10 +396,15 @@ string given.
TAG = r.tag(''),
TAG_OR_BRANCH = r.tag(r.branch('unreleased')),
TAG_OR_HASH8 = r.tag(r.hash(8, 'untagged')),
LABEL = r.label(),
REVISION = r.revision(),
DIRTY = r.dirty(),
FWTAG = xtrim(r.tag(r.branch('unreleased')), r.dirty(), 25),
UNIXTIME = r.time(),
DATE = r.time('%Y%m%d'),
DAY=r.time('%d'),
MONTH=r.time('%m'),
YEAR=r.time('%Y'),
DATETIME = r.time('%Y%m%d %H:%M'),
BOARD_TYPE = args.type,
BOARD_REVISION = args.revision,

View File

@ -25,8 +25,16 @@
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#define GCS_REVISION ${TAG_OR_BRANCH}:${HASH8}${DIRTY} ${DATETIME}
#define UAVO_HASH "{ ${UAVOSHA1} }"
#ifndef _GCSVERSIONINFO_H
#define _GCSVERSIONINFO_H
#define GCS_REVISION "${REVISION}"
#define GCS_YEAR "${YEAR}"
#define GCS_ORIGIN "${ORIGIN}"
#define UAVO_HASH "{ ${UAVOSHA1} }"
#endif // _GCSVERSIONINFO_H
/**
* @}
*/

View File

@ -14,13 +14,7 @@ ROOT_DIR := $(realpath $(WHEREAMI)/../)
# Set up some macros
BUILD_DIR := $(ROOT_DIR)/build
VERSION_CMD := python $(ROOT_DIR)/make/scripts/version-info.py --path="$(ROOT_DIR)"
# If there is a tag, use it for label instead of date-hash string
PACKAGE_TAG := $(shell $(VERSION_CMD) --format=\$${TAG})
ifneq ($(PACKAGE_TAG),)
PACKAGE_LBL := $(shell $(VERSION_CMD) --format=\$${TAG}\$${DIRTY})
else
PACKAGE_LBL := $(shell $(VERSION_CMD) --format=\$${DATE}-\$${TAG_OR_HASH8}\$${DIRTY})
endif
PACKAGE_LBL := $(shell $(VERSION_CMD) --format=\$${LABEL})
PACKAGE_DIR := $(BUILD_DIR)/package-$(PACKAGE_LBL)
FW_DIR := $(PACKAGE_DIR)/firmware-$(PACKAGE_LBL)
BL_DIR := $(FW_DIR)/bootloaders

View File

@ -2,75 +2,62 @@
# Linux-specific packaging
#
define CP_DEB_FILES_TEMPLATE
.PHONY: $(2)/$(1)
$(2)/$(1): $(3)/$(1)
$(V1)cp -a $$< $$@
endef
# Update this number for every formal release. The Deb packaging system relies on this to know to update a
# package or not. Otherwise, the user has to uninstall first.
VERNUM := 0.1.0
# Until we do that, package name does NOT include $(VERNUM) and uses $(PACKAGE_LBL) only
VERNUM := 0.1.0
VERSION_FULL := $(VERNUM)-$(PACKAGE_LBL)
FLIGHT_FW := coptercontrol revolution
DEB_BUILD_DIR := $(ROOT_DIR)/debian
SED_DATE_STRG = $(shell date -R)
SED_SCRIPT = s/<VERSION>/$(VERSION_FULL)/;s/<DATE>/$(SED_DATE_STRG)/
SED_SCRIPT = s/<VERSION>/$(PACKAGE_LBL)/;s/<DATE>/$(SED_DATE_STRG)/
DEB_CFG_CMN := $(ROOT_DIR)/package/linux/deb_common
DEB_CFG_CMN_FILES := $(shell ls $(DEB_CFG_CMN))
DEB_CFG_CMN := $(ROOT_DIR)/package/linux/deb_common
DEB_CFG_I386_DIR := $(ROOT_DIR)/package/linux/deb_i386
DEB_CFG_I386_FILES := $(shell ls $(DEB_CFG_I386_DIR))
DEB_CFG_AMD64_DIR := $(ROOT_DIR)/package/linux/deb_amd64
DEB_CFG_CMN_FILES := $(shell ls $(DEB_CFG_CMN))
DEB_CFG_I386_FILES := $(shell ls $(DEB_CFG_I386_DIR))
DEB_CFG_AMD64_FILES := $(shell ls $(DEB_CFG_AMD64_DIR))
DEB_PLATFORM := amd64
DEB_MACHINE_DIR := $(DEB_CFG_AMD64_DIR)
DEB_MACHINE_FILES := $(DEB_CFG_AMD64_FILES)
MACHINE_TYPE := $(shell uname -m)
ifneq ($(MACHINE_TYPE), x86_64)
DEB_PLATFORM := i386
DEB_MACHINE_DIR := $(DEB_CFG_I386_DIR)
DEB_MACHINE_FILES := $(DEB_CFG_I386_FILES)
DEB_PLATFORM := i386
DEB_MACHINE_DIR := $(DEB_CFG_I386_DIR)
DEB_MACHINE_FILES := $(DEB_CFG_I386_FILES)
endif
DEB_PACKAGE_NAME := openpilot_$(PACKAGE_LBL)_$(DEB_PLATFORM)
ALL_DEB_FILES = $(foreach f, $(DEB_CFG_CMN_FILES), $(DEB_BUILD_DIR)/$(f))
ALL_DEB_FILES += $(foreach f, $(DEB_MACHINE_FILES), $(DEB_BUILD_DIR)/$(f))
DEB_PACKAGE_NAME := openpilot_$(VERSION_FULL)_$(DEB_PLATFORM)
linux_deb_package: $(ALL_DEB_FILES) gcs package_flight
$(V1) echo "Building Linux package, please wait..."
$(V1) mkdir -p $(DEB_BUILD_DIR)
$(V1) $(shell echo $(FW_DIR) > $(BUILD_DIR)/package_dir)
$(V1) sed -i -e "$(SED_SCRIPT)" $(DEB_BUILD_DIR)/changelog
$(V1) cd .. && dpkg-buildpackage -b -us -uc
$(V1) mv $(ROOT_DIR)/../$(DEB_PACKAGE_NAME).deb $(BUILD_DIR)
$(V1) mv $(ROOT_DIR)/../$(DEB_PACKAGE_NAME).changes $(BUILD_DIR)
$(V1) rm -rf $(DEB_BUILD_DIR)
linux_deb_package: deb_build gcs
@echo $@ starting
cd .. && dpkg-buildpackage -b -us -uc
$(V1)mv $(ROOT_DIR)/../$(DEB_PACKAGE_NAME).deb $(BUILD_DIR)
$(V1)mv $(ROOT_DIR)/../$(DEB_PACKAGE_NAME).changes $(BUILD_DIR)
$(V1)rm -rf $(DEB_BUILD_DIR)
$(ALL_DEB_FILES): | uavobjects
deb_build: | $(DEB_BUILD_DIR) $(ALL_DEB_FILES) $(BUILD_DIR)/build
@echo $@ starting
$(V1)$(shell echo $(FW_DIR) > $(BUILD_DIR)/package_dir)
$(V1)sed -i -e "$(SED_SCRIPT)" $(DEB_BUILD_DIR)/changelog
$(BUILD_DIR)/build: package_flight
$(DEB_BUILD_DIR):
@echo $@ starting
$(V1)mkdir -p $(DEB_BUILD_DIR)
define CP_DEB_FILES_TEMPLATE
.PHONY: $(2)/$(1)
$(2)/$(1): $(3)/$(1)
$(V1) mkdir -p $(2)
$(V1) cp -a $$< $$@
endef
$(foreach cpfile, $(DEB_CFG_CMN_FILES), $(eval $(call CP_DEB_FILES_TEMPLATE,$(cpfile),$(DEB_BUILD_DIR),$(DEB_CFG_CMN))))
$(foreach cpfile, $(DEB_MACHINE_FILES), $(eval $(call CP_DEB_FILES_TEMPLATE,$(cpfile),$(DEB_BUILD_DIR),$(DEB_MACHINE_DIR))))
gcs: uavobjects
@echo "Linux Package Make of GCS."
$(V1) $(MAKE) -C $(ROOT_DIR) GCS_BUILD_CONF=release $@
identify:
@echo ""
@echo "We are in the Linux Package Make system."
@echo ""
ground_package: | linux_deb_package
ground_package: | identify linux_deb_package
.PHONY: identify gcs ground_package linux_deb_package deb_build $(DEB_BUILD_DIR)
.PHONY: gcs ground_package linux_deb_package

View File

@ -11,5 +11,5 @@ Vcs-Browser: http://git.openpilot.org/changelog/OpenPilot
Package: openpilot
Architecture: amd64
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: OpenPilot GCS & FW
OpenPilot GCS and Firmware for CopterControl (CC) board.
Description: OpenPilot GCS
OpenPilot Ground Control Station software

View File

@ -11,5 +11,5 @@ Vcs-Browser: http://git.openpilot.org/changelog/OpenPilot
Package: openpilot
Architecture: i386
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: OpenPilot GCS & FW
OpenPilot GCS and Firmware for CopterControl (CC) board.
Description: OpenPilot GCS
OpenPilot Ground Control Station software