From b6d42f2da835015cc9f30a179c46cceee2bcf8ac Mon Sep 17 00:00:00 2001 From: James Duley Date: Mon, 13 Jul 2015 04:23:18 +1200 Subject: [PATCH] Passed ORG_NAME to GCS --- Makefile | 4 +++- ground/openpilotgcs/openpilotgcs.pri | 9 +++++++++ ground/openpilotgcs/src/app/app.pro | 1 + ground/openpilotgcs/src/app/main.cpp | 2 +- 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 5488f06cb..f10d8e28c 100644 --- a/Makefile +++ b/Makefile @@ -480,7 +480,9 @@ openpilotgcs_qmake $(OPENPILOTGCS_MAKEFILE): | $(OPENPILOTGCS_DIR) $(V1) cd $(OPENPILOTGCS_DIR) && \ $(QMAKE) $(ROOT_DIR)/ground/openpilotgcs/openpilotgcs.pro \ -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) + 'GCS_BIG_NAME="$(GCS_BIG_NAME)"' GCS_SMALL_NAME=$(GCS_SMALL_NAME) \ + 'ORG_BIG_NAME="$(ORG_BIG_NAME)"' ORG_SMALL_NAME=$(ORG_SMALL_NAME) \ + $(GCS_QMAKE_OPTS) .PHONY: openpilotgcs openpilotgcs: uavobjgenerator $(OPENPILOTGCS_MAKEFILE) diff --git a/ground/openpilotgcs/openpilotgcs.pri b/ground/openpilotgcs/openpilotgcs.pri index e83fd158f..8d5d14ee8 100644 --- a/ground/openpilotgcs/openpilotgcs.pri +++ b/ground/openpilotgcs/openpilotgcs.pri @@ -136,6 +136,15 @@ isEmpty(GCS_BIG_NAME) { GCS_BIG_NAME = "$$GCS_BIG_NAME" } +isEmpty(ORG_SMALL_NAME):ORG_SMALL_NAME = unknown + +isEmpty(ORG_BIG_NAME) { + ORG_BIG_NAME = Unknown +} else { + # Requote for safety and because of QTBUG-46224 + ORG_BIG_NAME = "$$ORG_BIG_NAME" +} + macx { GCS_APP_TARGET = $$GCS_BIG_NAME GCS_PATH = $$GCS_BUILD_TREE/$${GCS_APP_TARGET}.app/Contents diff --git a/ground/openpilotgcs/src/app/app.pro b/ground/openpilotgcs/src/app/app.pro index 6dc6d350f..59285955e 100644 --- a/ground/openpilotgcs/src/app/app.pro +++ b/ground/openpilotgcs/src/app/app.pro @@ -22,6 +22,7 @@ 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\") +DEFINES += ORG_BIG_NAME=$$shell_quote(\"$$ORG_BIG_NAME\") win32 { RC_FILE = librepilotgcs.rc diff --git a/ground/openpilotgcs/src/app/main.cpp b/ground/openpilotgcs/src/app/main.cpp index e0b251e09..6d6a50097 100644 --- a/ground/openpilotgcs/src/app/main.cpp +++ b/ground/openpilotgcs/src/app/main.cpp @@ -112,7 +112,7 @@ const int OptionIndent = 4; const int DescriptionIndent = 24; const QLatin1String APP_NAME(GCS_NAME); -const QLatin1String ORG_NAME("OpenPilot"); +const QLatin1String ORG_NAME(ORG_BIG_NAME); const QLatin1String CORE_PLUGIN_NAME("Core");