From 105927560e84259b1fa7026e41380840b9672ed4 Mon Sep 17 00:00:00 2001 From: dogmaphobic Date: Wed, 8 Jul 2015 15:15:26 -0400 Subject: [PATCH] Added a compile time define to detect an installer version --- QGCInstaller.pri | 1 + src/QGCApplication.cc | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/QGCInstaller.pri b/QGCInstaller.pri index 77ebc2d27..0597d92c5 100644 --- a/QGCInstaller.pri +++ b/QGCInstaller.pri @@ -18,6 +18,7 @@ # ------------------------------------------------- installer { + DEFINES += __installer_version__ MacBuild { VideoEnabled { # Install the gstreamer framework diff --git a/src/QGCApplication.cc b/src/QGCApplication.cc index 340c6a745..7f41565f1 100644 --- a/src/QGCApplication.cc +++ b/src/QGCApplication.cc @@ -134,6 +134,7 @@ static QObject* mavManagerSingletonFactory(QQmlEngine*, QJSEngine*) #if defined(QGC_GST_STREAMING) #ifdef Q_OS_MAC #ifndef __ios__ +#ifdef __installer_version__ static void qgcputenv(const QString& key, const QString& root, const QString& path) { QString value = root + path; @@ -142,6 +143,7 @@ static void qgcputenv(const QString& key, const QString& root, const QString& pa #endif #endif #endif +#endif /** * @brief Constructor for the main application. @@ -280,6 +282,7 @@ QGCApplication::QGCApplication(int &argc, char* argv[], bool unitTesting) #if defined(QGC_GST_STREAMING) #ifdef Q_OS_MAC #ifndef __ios__ +#ifdef __installer_version__ QString currentDir = QCoreApplication::applicationDirPath(); qgcputenv("GST_PLUGIN_SCANNER", currentDir, "/gst-plugin-scanner"); qgcputenv("GTK_PATH", currentDir, "/../Frameworks/GStreamer.framework/Versions/Current"); @@ -294,6 +297,7 @@ QGCApplication::QGCApplication(int &argc, char* argv[], bool unitTesting) // } #endif #endif +#endif #endif qmlRegisterType("QGroundControl.QgcQtGStreamer", 1, 0, "VideoItem"); -- 2.22.0