1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-19 04:52:12 +01:00

Merge pull request #7 from parched/OP-1879_remove_openpilot_hardcoding

OP-1879 remove openpilot hardcoding
This commit is contained in:
a*morale 2015-07-11 14:23:29 +02:00
commit e84ad7abff
366 changed files with 849 additions and 296 deletions

View File

@ -51,6 +51,20 @@ export DIST_DIR := $(ROOT_DIR)/build/dist
DIRS = $(DL_DIR) $(TOOLS_DIR) $(BUILD_DIR) $(PACKAGE_DIR) $(DIST_DIR) DIRS = $(DL_DIR) $(TOOLS_DIR) $(BUILD_DIR) $(PACKAGE_DIR) $(DIST_DIR)
# Function to convert to all lowercase
lc = $(subst A,a,$(subst B,b,$(subst C,c,$(subst D,d,$(subst E,e,$(subst F,f,$(subst G,g,$(subst H,h,$(subst I,i,$(subst J,j,$(subst K,k,$(subst L,l,$(subst M,m,$(subst N,n,$(subst O,o,$(subst P,p,$(subst Q,q,$(subst R,r,$(subst S,s,$(subst T,t,$(subst U,u,$(subst V,v,$(subst W,w,$(subst X,x,$(subst Y,y,$(subst Z,z,$1))))))))))))))))))))))))))
# Function to make all lowercase and replace spaces with -
EMPTY :=
SPACE := $(EMPTY) $(EMPTY)
smallify = $(subst $(SPACE),-,$(call lc,$1))
# Naming for binaries and packaging etc,.
OP_BIG_NAME := LibrePilot
GCS_BIG_NAME := ${OP_BIG_NAME} GCS
# These should be lowercase with no spaces
OP_SMALL_NAME := $(call smallify,$(OP_BIG_NAME))
GCS_SMALL_NAME := $(call smallify,$(GCS_BIG_NAME))
# Set up default build configurations (debug | release) # Set up default build configurations (debug | release)
GCS_BUILD_CONF := release GCS_BUILD_CONF := release
GOOGLE_API_VERSION := 14 GOOGLE_API_VERSION := 14
@ -456,7 +470,7 @@ else
GCS_SILENT := silent GCS_SILENT := silent
endif endif
OPENPILOTGCS_DIR := $(BUILD_DIR)/openpilotgcs_$(GCS_BUILD_CONF) OPENPILOTGCS_DIR := $(BUILD_DIR)/$(GCS_SMALL_NAME)_$(GCS_BUILD_CONF)
DIRS += $(OPENPILOTGCS_DIR) DIRS += $(OPENPILOTGCS_DIR)
OPENPILOTGCS_MAKEFILE := $(OPENPILOTGCS_DIR)/Makefile OPENPILOTGCS_MAKEFILE := $(OPENPILOTGCS_DIR)/Makefile
@ -465,7 +479,8 @@ OPENPILOTGCS_MAKEFILE := $(OPENPILOTGCS_DIR)/Makefile
openpilotgcs_qmake $(OPENPILOTGCS_MAKEFILE): | $(OPENPILOTGCS_DIR) openpilotgcs_qmake $(OPENPILOTGCS_MAKEFILE): | $(OPENPILOTGCS_DIR)
$(V1) cd $(OPENPILOTGCS_DIR) && \ $(V1) cd $(OPENPILOTGCS_DIR) && \
$(QMAKE) $(ROOT_DIR)/ground/openpilotgcs/openpilotgcs.pro \ $(QMAKE) $(ROOT_DIR)/ground/openpilotgcs/openpilotgcs.pro \
-spec $(QT_SPEC) -r CONFIG+=$(GCS_BUILD_CONF) CONFIG+=$(GCS_SILENT) $(GCS_QMAKE_OPTS) -spec $(QT_SPEC) -r CONFIG+=$(GCS_BUILD_CONF) CONFIG+=$(GCS_SILENT) \
'GCS_BIG_NAME="$(GCS_BIG_NAME)"' GCS_SMALL_NAME=$(GCS_SMALL_NAME) $(GCS_QMAKE_OPTS)
.PHONY: openpilotgcs .PHONY: openpilotgcs
openpilotgcs: uavobjgenerator $(OPENPILOTGCS_MAKEFILE) openpilotgcs: uavobjgenerator $(OPENPILOTGCS_MAKEFILE)
@ -717,7 +732,7 @@ endif
# Define some variables # Define some variables
PACKAGE_LBL := $(shell $(VERSION_INFO) --format=\$${LABEL}) PACKAGE_LBL := $(shell $(VERSION_INFO) --format=\$${LABEL})
PACKAGE_NAME := OpenPilot PACKAGE_NAME := $(subst $(SPACE),,$(OP_BIG_NAME))
PACKAGE_SEP := - PACKAGE_SEP := -
PACKAGE_FULL_NAME := $(PACKAGE_NAME)$(PACKAGE_SEP)$(PACKAGE_LBL) PACKAGE_FULL_NAME := $(PACKAGE_NAME)$(PACKAGE_SEP)$(PACKAGE_LBL)

View File

@ -98,12 +98,6 @@ isEmpty(TEST):CONFIG(debug, debug|release) {
} }
} }
isEmpty(GCS_LIBRARY_BASENAME) {
GCS_LIBRARY_BASENAME = lib
}
DEFINES += GCS_LIBRARY_BASENAME=\\\"$$GCS_LIBRARY_BASENAME\\\"
equals(TEST, 1) { equals(TEST, 1) {
QT +=testlib QT +=testlib
DEFINES += WITH_TESTS DEFINES += WITH_TESTS
@ -132,25 +126,35 @@ isEmpty(TOOLS_DIR) {
isEmpty(TOOLS_DIR):TOOLS_DIR = $$clean_path($$ROOT_DIR/tools) isEmpty(TOOLS_DIR):TOOLS_DIR = $$clean_path($$ROOT_DIR/tools)
} }
GCS_APP_PATH = $$GCS_BUILD_TREE/bin # Set the default name of the application
isEmpty(GCS_SMALL_NAME):GCS_SMALL_NAME = openpilotgcs
isEmpty(GCS_BIG_NAME) {
GCS_BIG_NAME = "OpenPilot GCS"
} else {
# Requote for safety and because of QTBUG-46224
GCS_BIG_NAME = "$$GCS_BIG_NAME"
}
macx { macx {
GCS_APP_TARGET = "OpenPilot GCS" GCS_APP_TARGET = $$GCS_BIG_NAME
GCS_LIBRARY_PATH = $$GCS_APP_PATH/$${GCS_APP_TARGET}.app/Contents/Plugins GCS_PATH = $$GCS_BUILD_TREE/$${GCS_APP_TARGET}.app/Contents
GCS_APP_PATH = $$GCS_PATH/MacOS
GCS_LIBRARY_PATH = $$GCS_PATH/Plugins
GCS_PLUGIN_PATH = $$GCS_LIBRARY_PATH GCS_PLUGIN_PATH = $$GCS_LIBRARY_PATH
GCS_QT_QML_PATH = $$GCS_APP_PATH/$${GCS_APP_TARGET}.app/Contents/Imports GCS_QT_QML_PATH = $$GCS_PATH/Imports
GCS_LIBEXEC_PATH = $$GCS_APP_PATH/$${GCS_APP_TARGET}.app/Contents/Resources GCS_DATA_PATH = $$GCS_PATH/Resources
GCS_DATA_PATH = $$GCS_APP_PATH/$${GCS_APP_TARGET}.app/Contents/Resources
GCS_DATA_BASENAME = Resources
GCS_DOC_PATH = $$GCS_DATA_PATH/doc GCS_DOC_PATH = $$GCS_DATA_PATH/doc
copydata = 1 copydata = 1
copyqt = 1 copyqt = 1
} else { } else {
GCS_LIBRARY_PATH = $$GCS_BUILD_TREE/$$GCS_LIBRARY_BASENAME/openpilotgcs GCS_APP_TARGET = $$GCS_SMALL_NAME
GCS_PATH = $$GCS_BUILD_TREE
GCS_APP_PATH = $$GCS_PATH/bin
GCS_LIBRARY_PATH = $$GCS_PATH/lib/$$GCS_SMALL_NAME
GCS_PLUGIN_PATH = $$GCS_LIBRARY_PATH/plugins GCS_PLUGIN_PATH = $$GCS_LIBRARY_PATH/plugins
GCS_LIBEXEC_PATH = $$GCS_APP_PATH # FIXME GCS_DATA_PATH = $$GCS_PATH/share/$$GCS_SMALL_NAME
GCS_DATA_PATH = $$GCS_BUILD_TREE/share/openpilotgcs GCS_DOC_PATH = $$GCS_PATH/share/doc
GCS_DATA_BASENAME = share/openpilotgcs
GCS_DOC_PATH = $$GCS_BUILD_TREE/share/doc
!isEqual(GCS_SOURCE_TREE, $$GCS_BUILD_TREE):copydata = 1 !isEqual(GCS_SOURCE_TREE, $$GCS_BUILD_TREE):copydata = 1
@ -164,14 +168,11 @@ macx {
MESAWIN_DIR = $$(MESAWIN_DIR) MESAWIN_DIR = $$(MESAWIN_DIR)
isEmpty(MESAWIN_DIR):MESAWIN_DIR = $${TOOLS_DIR}/mesawin isEmpty(MESAWIN_DIR):MESAWIN_DIR = $${TOOLS_DIR}/mesawin
GCS_APP_TARGET = openpilotgcs
GCS_QT_PLUGINS_PATH = $$GCS_APP_PATH GCS_QT_PLUGINS_PATH = $$GCS_APP_PATH
GCS_QT_QML_PATH = $$GCS_APP_PATH GCS_QT_QML_PATH = $$GCS_APP_PATH
copyqt = $$copydata copyqt = $$copydata
} else { } else {
GCS_APP_TARGET = openpilotgcs
GCS_QT_BASEPATH = $$GCS_LIBRARY_PATH/qt5 GCS_QT_BASEPATH = $$GCS_LIBRARY_PATH/qt5
GCS_QT_LIBRARY_PATH = $$GCS_QT_BASEPATH/lib GCS_QT_LIBRARY_PATH = $$GCS_QT_BASEPATH/lib
GCS_QT_PLUGINS_PATH = $$GCS_QT_BASEPATH/plugins GCS_QT_PLUGINS_PATH = $$GCS_QT_BASEPATH/plugins
@ -187,9 +188,6 @@ macx {
} }
DEFINES += GCS_DATA_BASENAME=\\\"$$GCS_DATA_BASENAME\\\"
INCLUDEPATH += \ INCLUDEPATH += \
$$GCS_SOURCE_TREE/src/libs $$GCS_SOURCE_TREE/src/libs

View File

@ -31,6 +31,6 @@ CONFIG += ordered
DEFINES += USE_PATHPLANNER DEFINES += USE_PATHPLANNER
SUBDIRS = src share copydata SUBDIRS = src copydata
copydata.file = copydata.pro copydata.file = copydata.pro

View File

@ -3,7 +3,12 @@ include(../shared/qtsingleapplication/qtsingleapplication.pri)
TEMPLATE = app TEMPLATE = app
TARGET = $$GCS_APP_TARGET TARGET = $$GCS_APP_TARGET
DESTDIR = $$GCS_APP_PATH macx {
# .app is 3 levels above the executable
DESTDIR = $$GCS_APP_PATH/../../..
} else {
DESTDIR = $$GCS_APP_PATH
}
QT += xml widgets QT += xml widgets
@ -15,6 +20,9 @@ include(../libs/version_info/version_info.pri)
LIBS *= -l$$qtLibraryName(ExtensionSystem) -l$$qtLibraryName(Aggregation) LIBS *= -l$$qtLibraryName(ExtensionSystem) -l$$qtLibraryName(Aggregation)
DEFINES += PLUGIN_REL_PATH=$$shell_quote(\"$$relative_path($$GCS_PLUGIN_PATH, $$GCS_APP_PATH)\")
DEFINES += GCS_NAME=$$shell_quote(\"$$GCS_BIG_NAME\")
win32 { win32 {
RC_FILE = openpilotgcs.rc RC_FILE = openpilotgcs.rc
target.path = /bin target.path = /bin
@ -30,8 +38,8 @@ win32 {
} else { } else {
target.path = /bin target.path = /bin
INSTALLS += target INSTALLS += target
QMAKE_RPATHDIR = \'\$$ORIGIN\'/$$relative_path($$GCS_LIBRARY_PATH, $$GCS_APP_PATH) QMAKE_RPATHDIR = $$shell_quote(\$$ORIGIN/$$relative_path($$GCS_LIBRARY_PATH, $$GCS_APP_PATH))
QMAKE_RPATHDIR += \'\$$ORIGIN\'/$$relative_path($$GCS_QT_LIBRARY_PATH, $$GCS_APP_PATH) QMAKE_RPATHDIR += $$shell_quote(\$$ORIGIN/$$relative_path($$GCS_QT_LIBRARY_PATH, $$GCS_APP_PATH))
include(../rpath.pri) include(../rpath.pri)
equals(copyqt, 1) { equals(copyqt, 1) {

View File

@ -79,6 +79,7 @@
#include "qtsingleapplication.h" #include "qtsingleapplication.h"
#include "utils/xmlconfig.h" #include "utils/xmlconfig.h"
#include "utils/pathutils.h"
#include "gcssplashscreen.h" #include "gcssplashscreen.h"
#include <extensionsystem/pluginmanager.h> #include <extensionsystem/pluginmanager.h>
@ -110,19 +111,11 @@ typedef QMap<QString, QString> AppOptionValues;
const int OptionIndent = 4; const int OptionIndent = 4;
const int DescriptionIndent = 24; const int DescriptionIndent = 24;
const QLatin1String APP_NAME("OpenPilot GCS"); const QLatin1String APP_NAME(GCS_NAME);
const QLatin1String ORG_NAME("OpenPilot");
const QLatin1String CORE_PLUGIN_NAME("Core"); const QLatin1String CORE_PLUGIN_NAME("Core");
const QLatin1String SETTINGS_ORG_NAME("OpenPilot");
const QLatin1String SETTINGS_APP_NAME("OpenPilotGCS_config");
#ifdef Q_OS_MAC
const QLatin1String SHARE_PATH("/../Resources");
#else
const QLatin1String SHARE_PATH("/../share/openpilotgcs");
#endif
const char *DEFAULT_CONFIG_FILENAME = "OpenPilotGCS.xml"; const char *DEFAULT_CONFIG_FILENAME = "OpenPilotGCS.xml";
const char *fixedOptionsC = " [OPTION]... [FILE]...\n" const char *fixedOptionsC = " [OPTION]... [FILE]...\n"
@ -306,25 +299,12 @@ void logInit(QString fileName)
inline QStringList getPluginPaths() inline QStringList getPluginPaths()
{ {
QStringList rc; QStringList rc;
// Figure out root: Up one from 'bin'
QDir rootDir = QApplication::applicationDirPath();
rootDir.cdUp(); QString pluginPath = QApplication::applicationDirPath();
const QString rootDirPath = rootDir.canonicalPath();
// 1) "plugins" (Win/Linux)
QString pluginPath = rootDirPath;
pluginPath += QLatin1Char('/'); pluginPath += QLatin1Char('/');
pluginPath += QLatin1String(GCS_LIBRARY_BASENAME); pluginPath += QLatin1String(PLUGIN_REL_PATH);
pluginPath += QLatin1Char('/');
pluginPath += QLatin1String("openpilotgcs");
pluginPath += QLatin1Char('/');
pluginPath += QLatin1String("plugins");
rc.push_back(pluginPath);
// 2) "PlugIns" (OS X)
pluginPath = rootDirPath;
pluginPath += QLatin1Char('/');
pluginPath += QLatin1String("Plugins");
rc.push_back(pluginPath); rc.push_back(pluginPath);
return rc; return rc;
} }
@ -362,7 +342,7 @@ AppOptionValues parseCommandLine(SharedTools::QtSingleApplication &app,
void loadFactoryDefaults(QSettings &settings, AppOptionValues &appOptionValues) void loadFactoryDefaults(QSettings &settings, AppOptionValues &appOptionValues)
{ {
QDir directory(QCoreApplication::applicationDirPath() + SHARE_PATH + QString("/default_configurations")); QDir directory(Utils::PathUtils().GetDataPath() + QString("default_configurations"));
qDebug() << "Looking for factory defaults configuration files in:" << directory.absolutePath(); qDebug() << "Looking for factory defaults configuration files in:" << directory.absolutePath();
@ -434,8 +414,7 @@ void overrideSettings(QSettings &settings, int argc, char * *argv)
void loadTranslators(QString language, QTranslator &translator, QTranslator &qtTranslator) void loadTranslators(QString language, QTranslator &translator, QTranslator &qtTranslator)
{ {
const QString &creatorTrPath = QCoreApplication::applicationDirPath() + SHARE_PATH const QString &creatorTrPath = Utils::PathUtils().GetDataPath() + QLatin1String("translations");
+ QLatin1String("/translations");
if (translator.load(QLatin1String("openpilotgcs_") + language, creatorTrPath)) { if (translator.load(QLatin1String("openpilotgcs_") + language, creatorTrPath)) {
const QString &qtTrPath = QLibraryInfo::location(QLibraryInfo::TranslationsPath); const QString &qtTrPath = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
@ -464,6 +443,10 @@ int main(int argc, char * *argv)
// create application // create application
SharedTools::QtSingleApplication app(APP_NAME, argc, argv); SharedTools::QtSingleApplication app(APP_NAME, argc, argv);
QCoreApplication::setApplicationName(APP_NAME);
QCoreApplication::setOrganizationName(ORG_NAME);
QSettings::setDefaultFormat(XmlConfig::XmlSettingsFormat);
// initialize the plugin manager // initialize the plugin manager
ExtensionSystem::PluginManager pluginManager; ExtensionSystem::PluginManager pluginManager;
pluginManager.setFileExtension(QLatin1String("pluginspec")); pluginManager.setFileExtension(QLatin1String("pluginspec"));
@ -489,11 +472,11 @@ int main(int argc, char * *argv)
// load user settings // load user settings
// Must be done before any QSettings class is created // Must be done before any QSettings class is created
// keep this in sync with the MainWindow ctor in coreplugin/mainwindow.cpp // keep this in sync with the MainWindow ctor in coreplugin/mainwindow.cpp
QString settingsPath = QCoreApplication::applicationDirPath() + SHARE_PATH; QString settingsPath = Utils::PathUtils().GetDataPath();
qDebug() << "Loading system settings from" << settingsPath; qDebug() << "Loading system settings from" << settingsPath;
QSettings::setPath(XmlConfig::XmlSettingsFormat, QSettings::SystemScope, settingsPath); QSettings::setPath(XmlConfig::XmlSettingsFormat, QSettings::SystemScope, settingsPath);
qDebug() << "Loading user settings from" << SETTINGS_ORG_NAME << "/" << SETTINGS_APP_NAME; QSettings settings;
QSettings settings(XmlConfig::XmlSettingsFormat, QSettings::UserScope, SETTINGS_ORG_NAME, SETTINGS_APP_NAME); qDebug() << "Loading user settings from" << settings.fileName();
// need to reset all user settings? // need to reset all user settings?
if (appOptionValues.contains(RESET_OPTION)) { if (appOptionValues.contains(RESET_OPTION)) {

View File

@ -6,7 +6,7 @@ include(extensionsystem_dependencies.pri)
unix:!macx:!freebsd*:LIBS += -ldl unix:!macx:!freebsd*:LIBS += -ldl
DEFINES += GCS_TEST_DIR=\\\"$$GCS_SOURCE_TREE\\\" DEFINES += GCS_TEST_DIR=$$shell_quote(\"$$GCS_SOURCE_TREE\")
QT += widgets QT += widgets

View File

@ -29,6 +29,7 @@
#include "xmlconfig.h" #include "xmlconfig.h"
#include <stdint.h> #include <stdint.h>
#include <QDebug> #include <QDebug>
#include <QStandardPaths>
namespace Utils { namespace Utils {
@ -42,15 +43,9 @@ PathUtils::PathUtils()
*/ */
QString PathUtils::GetDataPath() QString PathUtils::GetDataPath()
{ {
// This routine works with "/" as the standard: QString dataPath = QApplication::applicationDirPath();
// Figure out root: Up one from 'bin'
QDir rootDir = QApplication::applicationDirPath();
rootDir.cdUp();
const QString rootDirPath = rootDir.canonicalPath();
QString dataPath = rootDirPath;
dataPath += QLatin1Char('/'); dataPath += QLatin1Char('/');
dataPath += QLatin1String(GCS_DATA_BASENAME); dataPath += QLatin1String(DATA_REL_PATH);
dataPath += QLatin1Char('/'); dataPath += QLatin1Char('/');
return dataPath; return dataPath;
} }
@ -95,19 +90,7 @@ QString PathUtils::InsertDataPath(QString path)
*/ */
QString PathUtils::GetStoragePath() QString PathUtils::GetStoragePath()
{ {
// This routine works with "/" as the standard: return QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + QLatin1Char('/');
// Work out where the settings are stored on the machine
QSettings set(XmlConfig::XmlSettingsFormat, QSettings::UserScope, QLatin1String("OpenPilot"), QLatin1String("OpenPilotGCS_config"));
QFileInfo f(set.fileName());
QDir dir(f.absoluteDir());
const QString homeDirPath = dir.canonicalPath();
QString storagePath = homeDirPath;
storagePath += QLatin1Char('/');
// storagePath += QLatin1String("OpenPilot");
// storagePath += QLatin1Char('/');
return storagePath;
} }
/** /**

View File

@ -13,6 +13,8 @@ DEFINES += QTCREATOR_UTILS_LIB
include(../../openpilotgcslibrary.pri) include(../../openpilotgcslibrary.pri)
DEFINES += DATA_REL_PATH=$$shell_quote(\"$$relative_path($$GCS_DATA_PATH, $$GCS_APP_PATH)\")
SOURCES += reloadpromptutils.cpp \ SOURCES += reloadpromptutils.cpp \
settingsutils.cpp \ settingsutils.cpp \
filesearch.cpp \ filesearch.cpp \

View File

@ -17,8 +17,8 @@ macx {
target.path = /bin target.path = /bin
target.files = $$DESTDIR/$${TARGET}.dll target.files = $$DESTDIR/$${TARGET}.dll
} else { } else {
QMAKE_RPATHDIR = \'\$$ORIGIN\' QMAKE_RPATHDIR = $$shell_quote(\$$ORIGIN)
QMAKE_RPATHDIR += \'\$$ORIGIN\'/$$relative_path($$GCS_QT_LIBRARY_PATH, $$GCS_LIBRARY_PATH) QMAKE_RPATHDIR += $$shell_quote(\$$ORIGIN/$$relative_path($$GCS_QT_LIBRARY_PATH, $$GCS_LIBRARY_PATH))
include(rpath.pri) include(rpath.pri)
target.path = /$$GCS_LIBRARY_BASENAME/openpilotgcs target.path = /$$GCS_LIBRARY_BASENAME/openpilotgcs

View File

@ -30,9 +30,9 @@ TARGET = $$qtLibraryName($$TARGET)
macx { macx {
QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../Plugins/$${PROVIDER}/ QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../Plugins/$${PROVIDER}/
} else:linux-* { } else:linux-* {
QMAKE_RPATHDIR = \'\$$ORIGIN\' QMAKE_RPATHDIR = $$shell_quote(\$$ORIGIN)
QMAKE_RPATHDIR += \'\$$ORIGIN\'/$$relative_path($$GCS_LIBRARY_PATH, $$DESTDIR) QMAKE_RPATHDIR += $$shell_quote(\$$ORIGIN/$$relative_path($$GCS_LIBRARY_PATH, $$DESTDIR))
QMAKE_RPATHDIR += \'\$$ORIGIN\'/$$relative_path($$GCS_QT_LIBRARY_PATH, $$DESTDIR) QMAKE_RPATHDIR += $$shell_quote(\$$ORIGIN/$$relative_path($$GCS_QT_LIBRARY_PATH, $$DESTDIR))
include(rpath.pri) include(rpath.pri)
} }

View File

@ -102,12 +102,11 @@ MainWindow::MainWindow() :
m_globalContext(QList<int>() << Constants::C_GLOBAL_ID), m_globalContext(QList<int>() << Constants::C_GLOBAL_ID),
m_additionalContexts(m_globalContext), m_additionalContexts(m_globalContext),
// keep this in sync with main() in app/main.cpp // keep this in sync with main() in app/main.cpp
m_settings(new QSettings(XmlConfig::XmlSettingsFormat, QSettings::UserScope, m_settings(new QSettings(this)),
QLatin1String("OpenPilot"), QLatin1String("OpenPilotGCS_config"), this)),
m_globalSettings(new QSettings(XmlConfig::XmlSettingsFormat, QSettings::SystemScope, m_globalSettings(new QSettings(XmlConfig::XmlSettingsFormat, QSettings::SystemScope,
QLatin1String("OpenPilot"), QLatin1String("OpenPilotGCS_config"), this)), m_settings->organizationName(), m_settings->applicationName(), this)),
m_settingsDatabase(new SettingsDatabase(QFileInfo(m_settings->fileName()).path(), m_settingsDatabase(new SettingsDatabase(QFileInfo(m_settings->fileName()).path(),
QLatin1String("OpenPilotGCS_config"), QFileInfo(m_settings->fileName()).baseName(),
this)), this)),
m_dontSaveSettings(false), m_dontSaveSettings(false),
m_actionManager(new ActionManagerPrivate(this)), m_actionManager(new ActionManagerPrivate(this)),
@ -138,11 +137,6 @@ MainWindow::MainWindow() :
#ifndef Q_WS_MAC #ifndef Q_WS_MAC
qApp->setWindowIcon(QIcon(":/core/images/openpilot_logo_128.png")); qApp->setWindowIcon(QIcon(":/core/images/openpilot_logo_128.png"));
#endif #endif
QCoreApplication::setApplicationName(QLatin1String("OpenPilotGCS"));
QCoreApplication::setApplicationVersion(QLatin1String(Core::Constants::GCS_VERSION_LONG));
QCoreApplication::setOrganizationName(QLatin1String("OpenPilot"));
QCoreApplication::setOrganizationDomain(QLatin1String("openpilot.org"));
QSettings::setDefaultFormat(XmlConfig::XmlSettingsFormat);
qApp->setStyle(QStyleFactory::create("Fusion")); qApp->setStyle(QStyleFactory::create("Fusion"));
setDockNestingEnabled(true); setDockNestingEnabled(true);

View File

@ -4,7 +4,6 @@ QT += core gui network widgets
TEMPLATE = app TEMPLATE = app
TARGET = udp_test TARGET = udp_test
DESTDIR = $$GCS_APP_PATH
HEADERS += \ HEADERS += \
udptestwidget.h udptestwidget.h

View File

@ -48,7 +48,6 @@
#include <uavtalk/telemetrymanager.h> #include <uavtalk/telemetrymanager.h>
#include <utils/pathutils.h> #include <utils/pathutils.h>
const char *VehicleTemplateExportDialog::EXPORT_BASE_NAME = "../share/openpilotgcs/cloudconfig";
const char *VehicleTemplateExportDialog::EXPORT_FIXEDWING_NAME = "fixedwing"; const char *VehicleTemplateExportDialog::EXPORT_FIXEDWING_NAME = "fixedwing";
const char *VehicleTemplateExportDialog::EXPORT_MULTI_NAME = "multirotor"; const char *VehicleTemplateExportDialog::EXPORT_MULTI_NAME = "multirotor";
const char *VehicleTemplateExportDialog::EXPORT_HELI_NAME = "helicopter"; const char *VehicleTemplateExportDialog::EXPORT_HELI_NAME = "helicopter";

View File

@ -1,4 +1,4 @@
include(../openpilotgcs.pri) include(../../openpilotgcs.pri)
TEMPLATE = aux TEMPLATE = aux
@ -6,8 +6,8 @@ DATACOLLECTIONS = cloudconfig default_configurations dials models pfd sounds dia
equals(copydata, 1) { equals(copydata, 1) {
for(dir, DATACOLLECTIONS) { for(dir, DATACOLLECTIONS) {
exists($$GCS_SOURCE_TREE/share/openpilotgcs/$$dir) { exists($$GCS_SOURCE_TREE/src/share/$$dir) {
addCopyDirTarget($$dir, $$GCS_SOURCE_TREE/share/openpilotgcs, $$GCS_DATA_PATH) addCopyDirTarget($$dir, $$GCS_SOURCE_TREE/src/share, $$GCS_DATA_PATH)
} }
} }
} }

View File

Before

Width:  |  Height:  |  Size: 109 KiB

After

Width:  |  Height:  |  Size: 109 KiB

View File

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 47 KiB

View File

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 59 KiB

View File

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

View File

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 58 KiB

View File

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB

View File

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

View File

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

View File

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 61 KiB

View File

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

View File

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 66 KiB

View File

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

View File

Before

Width:  |  Height:  |  Size: 277 KiB

After

Width:  |  Height:  |  Size: 277 KiB

View File

Before

Width:  |  Height:  |  Size: 518 KiB

After

Width:  |  Height:  |  Size: 518 KiB

View File

Before

Width:  |  Height:  |  Size: 161 KiB

After

Width:  |  Height:  |  Size: 161 KiB

View File

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

View File

Before

Width:  |  Height:  |  Size: 292 KiB

After

Width:  |  Height:  |  Size: 292 KiB

View File

Before

Width:  |  Height:  |  Size: 165 KiB

After

Width:  |  Height:  |  Size: 165 KiB

View File

Before

Width:  |  Height:  |  Size: 273 KiB

After

Width:  |  Height:  |  Size: 273 KiB

View File

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

View File

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

View File

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 57 KiB

View File

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB

View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

View File

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 61 KiB

View File

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

View File

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 66 KiB

View File

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 43 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Some files were not shown because too many files have changed in this diff Show More