mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-17 19:05:31 +08:00
Convert static common simulator plugins to shared ones
Test Plan: - Check that the new shared libraries are packaged in all platform installers. - check that plugins are loaded properly on all platforms. Reviewers: #swift_pilot_client, msutcliffe Reviewed By: #swift_pilot_client, msutcliffe Maniphest Tasks: T471 Differential Revision: https://dev.swift-project.org/D79
This commit is contained in:
committed by
Mat Sutcliffe
parent
0970dbdcfc
commit
d639187f91
Submodule externals updated: e65d53de6e...0366a091f2
@@ -2,7 +2,7 @@
|
|||||||
<name>qt5binaries</name>
|
<name>qt5binaries</name>
|
||||||
<description>Qt5 binaries</description>
|
<description>Qt5 binaries</description>
|
||||||
<canBeEdited>1</canBeEdited>
|
<canBeEdited>1</canBeEdited>
|
||||||
<detailedDescription>Qt 5.5 runtime binaries</detailedDescription>
|
<detailedDescription>Qt5 runtime binaries</detailedDescription>
|
||||||
<selected>1</selected>
|
<selected>1</selected>
|
||||||
<show>1</show>
|
<show>1</show>
|
||||||
<folderList>
|
<folderList>
|
||||||
|
|||||||
@@ -64,6 +64,15 @@ This installs the binaries to run all swift applications.</detailedDescription>
|
|||||||
<distributionFile>
|
<distributionFile>
|
||||||
<origin>../../dist/bin/blackmisc.dll</origin>
|
<origin>../../dist/bin/blackmisc.dll</origin>
|
||||||
</distributionFile>
|
</distributionFile>
|
||||||
|
<distributionFile>
|
||||||
|
<origin>../../dist/bin/simulatorplugincommon.dll</origin>
|
||||||
|
</distributionFile>
|
||||||
|
<distributionFile>
|
||||||
|
<origin>../../dist/bin/simulatorfscommon.dll</origin>
|
||||||
|
</distributionFile>
|
||||||
|
<distributionFile>
|
||||||
|
<origin>../../dist/bin/simulatorfsxcommon.dll</origin>
|
||||||
|
</distributionFile>
|
||||||
</distributionFileList>
|
</distributionFileList>
|
||||||
</folder>
|
</folder>
|
||||||
<folder>
|
<folder>
|
||||||
@@ -103,6 +112,10 @@ This installs the binaries to run all swift applications.</detailedDescription>
|
|||||||
<allowWildcards>1</allowWildcards>
|
<allowWildcards>1</allowWildcards>
|
||||||
<origin>../../dist/lib/libblacksound*</origin>
|
<origin>../../dist/lib/libblacksound*</origin>
|
||||||
</distributionFile>
|
</distributionFile>
|
||||||
|
<distributionFile>
|
||||||
|
<allowWildcards>1</allowWildcards>
|
||||||
|
<origin>../../dist/lib/libsimulatorplugincommon*</origin>
|
||||||
|
</distributionFile>
|
||||||
</distributionFileList>
|
</distributionFileList>
|
||||||
</folder>
|
</folder>
|
||||||
<folder>
|
<folder>
|
||||||
|
|||||||
@@ -7,17 +7,17 @@ unix:!macx {
|
|||||||
}
|
}
|
||||||
|
|
||||||
simulatorfsxcommon {
|
simulatorfsxcommon {
|
||||||
addStaticLibraryDependency(simulatorfsxcommon)
|
addLibraryDependency(simulatorfsxcommon)
|
||||||
LIBS += -lsimulatorfsxcommon
|
LIBS += -lsimulatorfsxcommon
|
||||||
}
|
}
|
||||||
|
|
||||||
simulatorfscommon {
|
simulatorfscommon {
|
||||||
addStaticLibraryDependency(simulatorfscommon)
|
addLibraryDependency(simulatorfscommon)
|
||||||
LIBS += -lsimulatorfscommon
|
LIBS += -lsimulatorfscommon
|
||||||
}
|
}
|
||||||
|
|
||||||
simulatorplugincommon {
|
simulatorplugincommon {
|
||||||
addStaticLibraryDependency(simulatorplugincommon)
|
addLibraryDependency(simulatorplugincommon)
|
||||||
LIBS += -lsimulatorplugincommon
|
LIBS += -lsimulatorplugincommon
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -35,8 +35,6 @@ simconnect {
|
|||||||
equals(WORD_SIZE,32) {
|
equals(WORD_SIZE,32) {
|
||||||
INCLUDEPATH *= $$EXTERNALSROOT/common/include/simconnect/FSX-XPack
|
INCLUDEPATH *= $$EXTERNALSROOT/common/include/simconnect/FSX-XPack
|
||||||
}
|
}
|
||||||
|
|
||||||
RC_FILE = $$SourceRoot/src/plugins/simulator/fsxcommon/simconnect.rc
|
|
||||||
}
|
}
|
||||||
|
|
||||||
blackgui {
|
blackgui {
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ TEMPLATE = lib
|
|||||||
|
|
||||||
CONFIG += plugin shared
|
CONFIG += plugin shared
|
||||||
CONFIG += blackmisc blackcore blackgui
|
CONFIG += blackmisc blackcore blackgui
|
||||||
|
CONFIG += simulatorplugincommon
|
||||||
|
|
||||||
DEPENDPATH += . $$SourceRoot/src
|
DEPENDPATH += . $$SourceRoot/src
|
||||||
INCLUDEPATH += . $$SourceRoot/src
|
INCLUDEPATH += . $$SourceRoot/src
|
||||||
@@ -17,9 +18,6 @@ FORMS += *.ui
|
|||||||
DISTFILES += simulatoremulated.json
|
DISTFILES += simulatoremulated.json
|
||||||
DESTDIR = $$DestRoot/bin/plugins/simulator
|
DESTDIR = $$DestRoot/bin/plugins/simulator
|
||||||
|
|
||||||
LIBS *= -lsimulatorplugincommon
|
|
||||||
addStaticLibraryDependency(simulatorplugincommon)
|
|
||||||
|
|
||||||
win32 {
|
win32 {
|
||||||
dlltarget.path = $$PREFIX/bin/plugins/simulator
|
dlltarget.path = $$PREFIX/bin/plugins/simulator
|
||||||
INSTALLS += dlltarget
|
INSTALLS += dlltarget
|
||||||
|
|||||||
@@ -7,15 +7,12 @@ TEMPLATE = lib
|
|||||||
|
|
||||||
CONFIG += plugin shared
|
CONFIG += plugin shared
|
||||||
CONFIG += blackmisc blackcore blackgui
|
CONFIG += blackmisc blackcore blackgui
|
||||||
|
CONFIG += simulatorfscommon simulatorplugincommon
|
||||||
|
|
||||||
DEPENDPATH += . $$SourceRoot/src
|
DEPENDPATH += . $$SourceRoot/src
|
||||||
INCLUDEPATH += . $$SourceRoot/src
|
INCLUDEPATH += . $$SourceRoot/src
|
||||||
|
|
||||||
addStaticLibraryDependency(simulatorplugincommon)
|
LIBS += -luuid -ldxguid -lole32
|
||||||
addStaticLibraryDependency(simulatorfscommon)
|
|
||||||
addStaticLibraryDependency(fsuipc)
|
|
||||||
LIBS += -lsimulatorfscommon -lfsuipc -luuid -lsimulatorplugincommon
|
|
||||||
LIBS += -ldxguid -lole32
|
|
||||||
|
|
||||||
SOURCES += *.cpp
|
SOURCES += *.cpp
|
||||||
HEADERS += *.h
|
HEADERS += *.h
|
||||||
|
|||||||
@@ -1,12 +1,16 @@
|
|||||||
load(common_pre)
|
load(common_pre)
|
||||||
|
|
||||||
QT += core dbus network
|
QT += core dbus network widgets
|
||||||
|
|
||||||
TARGET = simulatorfscommon
|
TARGET = simulatorfscommon
|
||||||
TEMPLATE = lib
|
TEMPLATE = lib
|
||||||
|
|
||||||
|
CONFIG += blackconfig blackmisc blackcore blackgui
|
||||||
|
CONFIG += simulatorplugincommon fsuipc
|
||||||
|
|
||||||
|
contains(BLACK_CONFIG, Static) {
|
||||||
CONFIG += staticlib
|
CONFIG += staticlib
|
||||||
CONFIG += blackconfig blackmisc
|
}
|
||||||
|
|
||||||
DEPENDPATH += . $$SourceRoot/src
|
DEPENDPATH += . $$SourceRoot/src
|
||||||
INCLUDEPATH += . $$SourceRoot/src
|
INCLUDEPATH += . $$SourceRoot/src
|
||||||
@@ -14,8 +18,7 @@ INCLUDEPATH += . $$SourceRoot/src
|
|||||||
SOURCES += *.cpp
|
SOURCES += *.cpp
|
||||||
HEADERS += *.h
|
HEADERS += *.h
|
||||||
|
|
||||||
LIBS *= -lsimulatorplugincommon
|
DEFINES += BUILD_FSCOMMON_LIB
|
||||||
addStaticLibraryDependency(simulatorplugincommon)
|
|
||||||
|
|
||||||
swiftConfig(sims.fsuipc) {
|
swiftConfig(sims.fsuipc) {
|
||||||
equals(WORD_SIZE,32) {
|
equals(WORD_SIZE,32) {
|
||||||
@@ -27,5 +30,9 @@ swiftConfig(sims.fsuipc) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
DESTDIR = $$DestRoot/lib
|
DESTDIR = $$DestRoot/lib
|
||||||
|
DLLDESTDIR = $$DestRoot/bin
|
||||||
|
|
||||||
|
dlltarget.path = $$PREFIX/bin
|
||||||
|
INSTALLS += dlltarget
|
||||||
|
|
||||||
load(common_post)
|
load(common_post)
|
||||||
|
|||||||
32
src/plugins/simulator/fscommon/fscommonexport.h
Normal file
32
src/plugins/simulator/fscommon/fscommonexport.h
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
/* Copyright (C) 2018
|
||||||
|
* swift project Community / Contributors
|
||||||
|
*
|
||||||
|
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
||||||
|
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
|
||||||
|
* including this file, may be copied, modified, propagated, or distributed except according to the terms
|
||||||
|
* contained in the LICENSE file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
//! \file
|
||||||
|
|
||||||
|
#ifndef BLACKSIMPLUGIN_FSCOMMON_SIMULATORFSCOMMON_MACROS_H
|
||||||
|
#define BLACKSIMPLUGIN_FSCOMMON_SIMULATORFSCOMMON_MACROS_H
|
||||||
|
|
||||||
|
#include <QtGlobal>
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \def FSCOMMON_EXPORT
|
||||||
|
* FSCommon Export Macro
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef WITH_STATIC
|
||||||
|
# if defined(BUILD_FSCOMMON_LIB)
|
||||||
|
# define FSCOMMON_EXPORT Q_DECL_EXPORT
|
||||||
|
# else
|
||||||
|
# define FSCOMMON_EXPORT Q_DECL_IMPORT
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
# define FSCOMMON_EXPORT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // guard
|
||||||
@@ -12,6 +12,7 @@
|
|||||||
#ifndef BLACKSIMPLUGIN_FSUIPC_H
|
#ifndef BLACKSIMPLUGIN_FSUIPC_H
|
||||||
#define BLACKSIMPLUGIN_FSUIPC_H
|
#define BLACKSIMPLUGIN_FSUIPC_H
|
||||||
|
|
||||||
|
#include "plugins/simulator/fscommon/fscommonexport.h"
|
||||||
#include "blackmisc/simulation/simulatedaircraft.h"
|
#include "blackmisc/simulation/simulatedaircraft.h"
|
||||||
#include "blackmisc/weather/weathergrid.h"
|
#include "blackmisc/weather/weathergrid.h"
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
@@ -21,7 +22,7 @@ namespace BlackSimPlugin
|
|||||||
namespace FsCommon
|
namespace FsCommon
|
||||||
{
|
{
|
||||||
//! Class representing a FSUIPC "interface"
|
//! Class representing a FSUIPC "interface"
|
||||||
class CFsuipc : public QObject
|
class FSCOMMON_EXPORT CFsuipc : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
|||||||
@@ -12,10 +12,10 @@
|
|||||||
#ifndef BLACKSIMPLUGIN_FSCOMMON_SIMULATORFSCOMMON_H
|
#ifndef BLACKSIMPLUGIN_FSCOMMON_SIMULATORFSCOMMON_H
|
||||||
#define BLACKSIMPLUGIN_FSCOMMON_SIMULATORFSCOMMON_H
|
#define BLACKSIMPLUGIN_FSCOMMON_SIMULATORFSCOMMON_H
|
||||||
|
|
||||||
#include "../plugincommon/simulatorplugincommon.h"
|
#include "plugins/simulator/fscommon/fsuipc.h"
|
||||||
|
#include "plugins/simulator/plugincommon/simulatorplugincommon.h"
|
||||||
#include "blackmisc/simulation/interpolator.h"
|
#include "blackmisc/simulation/interpolator.h"
|
||||||
#include "blackmisc/simulation/fscommon/aircraftcfgparser.h"
|
#include "blackmisc/simulation/fscommon/aircraftcfgparser.h"
|
||||||
#include "fsuipc.h"
|
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
@@ -25,7 +25,7 @@ namespace BlackSimPlugin
|
|||||||
namespace FsCommon
|
namespace FsCommon
|
||||||
{
|
{
|
||||||
//! Common base class for MS flight simulators
|
//! Common base class for MS flight simulators
|
||||||
class CSimulatorFsCommon : public Common::CSimulatorPluginCommon
|
class FSCOMMON_EXPORT CSimulatorFsCommon : public Common::CSimulatorPluginCommon
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_INTERFACES(BlackCore::ISimulator)
|
Q_INTERFACES(BlackCore::ISimulator)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ TEMPLATE = lib
|
|||||||
|
|
||||||
CONFIG += plugin shared
|
CONFIG += plugin shared
|
||||||
CONFIG += blackconfig blackmisc blackcore blackgui
|
CONFIG += blackconfig blackmisc blackcore blackgui
|
||||||
CONFIG += simulatorfsxcommon simulatorfscommon simulatorplugincommon fsuipc simconnect
|
CONFIG += simulatorfsxcommon simulatorfscommon simulatorplugincommon simconnect
|
||||||
|
|
||||||
DEPENDPATH += . $$SourceRoot/src
|
DEPENDPATH += . $$SourceRoot/src
|
||||||
INCLUDEPATH += . $$SourceRoot/src
|
INCLUDEPATH += . $$SourceRoot/src
|
||||||
|
|||||||
@@ -9,20 +9,24 @@ SOURCES += *.cpp
|
|||||||
HEADERS += *.h
|
HEADERS += *.h
|
||||||
FORMS += *.ui
|
FORMS += *.ui
|
||||||
|
|
||||||
CONFIG += staticlib
|
CONFIG += blackconfig blackmisc blackcore blackgui
|
||||||
CONFIG += blackconfig blackmisc blackcore blackgui simconnect
|
CONFIG += simulatorfscommon simulatorplugincommon simconnect
|
||||||
|
|
||||||
DEPENDPATH += . $$SourceRoot/src
|
DEPENDPATH += . $$SourceRoot/src
|
||||||
INCLUDEPATH += . $$SourceRoot/src
|
INCLUDEPATH += . $$SourceRoot/src
|
||||||
DESTDIR = $$DestRoot/lib
|
|
||||||
|
|
||||||
LIBS += -lsimulatorfscommon -lfsuipc -lsimulatorplugincommon
|
DEFINES += BUILD_FSXCOMMON_LIB BUID_SIMCONNECT_LIB
|
||||||
|
|
||||||
addStaticLibraryDependency(fsuipc)
|
|
||||||
addStaticLibraryDependency(simulatorplugincommon)
|
|
||||||
|
|
||||||
OTHER_FILES += \
|
OTHER_FILES += \
|
||||||
*.manifest \
|
*.manifest \
|
||||||
*.rc
|
*.rc
|
||||||
|
|
||||||
|
RC_FILE = $$SourceRoot/src/plugins/simulator/fsxcommon/simconnect.rc
|
||||||
|
|
||||||
|
DESTDIR = $$DestRoot/lib
|
||||||
|
DLLDESTDIR = $$DestRoot/bin
|
||||||
|
|
||||||
|
dlltarget.path = $$PREFIX/bin
|
||||||
|
INSTALLS += dlltarget
|
||||||
|
|
||||||
load(common_post)
|
load(common_post)
|
||||||
|
|||||||
32
src/plugins/simulator/fsxcommon/fsxcommonexport.h
Normal file
32
src/plugins/simulator/fsxcommon/fsxcommonexport.h
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
/* Copyright (C) 2018
|
||||||
|
* swift project Community / Contributors
|
||||||
|
*
|
||||||
|
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
||||||
|
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
|
||||||
|
* including this file, may be copied, modified, propagated, or distributed except according to the terms
|
||||||
|
* contained in the LICENSE file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
//! \file
|
||||||
|
|
||||||
|
#ifndef BLACKSIMPLUGIN_FSXCOMMON_SIMULATORFSXCOMMON_MACROS_H
|
||||||
|
#define BLACKSIMPLUGIN_FSXCOMMON_SIMULATORFSXCOMMON_MACROS_H
|
||||||
|
|
||||||
|
#include <QtGlobal>
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \def FSXCOMMON_EXPORT
|
||||||
|
* FSXCommon Export Macro
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef WITH_STATIC
|
||||||
|
# if defined(BUILD_FSXCOMMON_LIB)
|
||||||
|
# define FSXCOMMON_EXPORT Q_DECL_EXPORT
|
||||||
|
# else
|
||||||
|
# define FSXCOMMON_EXPORT Q_DECL_IMPORT
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
# define FSXCOMMON_EXPORT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // guard
|
||||||
@@ -12,6 +12,7 @@
|
|||||||
#ifndef BLACKSIMPLUGIN_FSXCOMMON_FSXSETTINGSCOMPONENT_H
|
#ifndef BLACKSIMPLUGIN_FSXCOMMON_FSXSETTINGSCOMPONENT_H
|
||||||
#define BLACKSIMPLUGIN_FSXCOMMON_FSXSETTINGSCOMPONENT_H
|
#define BLACKSIMPLUGIN_FSXCOMMON_FSXSETTINGSCOMPONENT_H
|
||||||
|
|
||||||
|
#include "plugins/simulator/fsxcommon/fsxcommonexport.h"
|
||||||
#include "blackmisc/simulation/simulatorinfo.h"
|
#include "blackmisc/simulation/simulatorinfo.h"
|
||||||
#include "blackmisc/simulation/simulatorplugininfo.h"
|
#include "blackmisc/simulation/simulatorplugininfo.h"
|
||||||
#include <QFrame>
|
#include <QFrame>
|
||||||
@@ -26,7 +27,7 @@ namespace BlackSimPlugin
|
|||||||
class CSimulatorFsxCommon;
|
class CSimulatorFsxCommon;
|
||||||
|
|
||||||
//! FSX/P3D settings
|
//! FSX/P3D settings
|
||||||
class CFsxSettingsComponent : public QFrame
|
class FSXCOMMON_EXPORT CFsxSettingsComponent : public QFrame
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
|||||||
@@ -12,11 +12,12 @@
|
|||||||
#ifndef BLACKSIMPLUGIN_FSXCOMMON_SIMCONNECT_DATADEFINITION_H
|
#ifndef BLACKSIMPLUGIN_FSXCOMMON_SIMCONNECT_DATADEFINITION_H
|
||||||
#define BLACKSIMPLUGIN_FSXCOMMON_SIMCONNECT_DATADEFINITION_H
|
#define BLACKSIMPLUGIN_FSXCOMMON_SIMCONNECT_DATADEFINITION_H
|
||||||
|
|
||||||
#include <QtGlobal>
|
#include "plugins/simulator/fsxcommon/fsxcommonexport.h"
|
||||||
|
#include "plugins/simulator/fsxcommon/simconnectwindows.h"
|
||||||
#include "blackmisc/aviation/aircraftlights.h"
|
#include "blackmisc/aviation/aircraftlights.h"
|
||||||
#include "../fsxcommon/simconnectwindows.h"
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <QtGlobal>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
namespace BlackMisc { namespace Aviation { class CAircraftParts; }}
|
namespace BlackMisc { namespace Aviation { class CAircraftParts; }}
|
||||||
@@ -86,7 +87,7 @@ namespace BlackSimPlugin
|
|||||||
};
|
};
|
||||||
|
|
||||||
//! Data struct of remote aircraft parts
|
//! Data struct of remote aircraft parts
|
||||||
struct DataDefinitionRemoteAircraftPartsWithoutLights
|
struct FSXCOMMON_EXPORT DataDefinitionRemoteAircraftPartsWithoutLights
|
||||||
{
|
{
|
||||||
double flapsLeadingEdgeLeftPercent; //!< Leading edge left in percent
|
double flapsLeadingEdgeLeftPercent; //!< Leading edge left in percent
|
||||||
double flapsLeadingEdgeRightPercent; //!< Leading edge right in percent
|
double flapsLeadingEdgeRightPercent; //!< Leading edge right in percent
|
||||||
@@ -128,7 +129,7 @@ namespace BlackSimPlugin
|
|||||||
};
|
};
|
||||||
|
|
||||||
//! Data for aircraft lighs
|
//! Data for aircraft lighs
|
||||||
struct DataDefinitionRemoteAircraftLights
|
struct FSXCOMMON_EXPORT DataDefinitionRemoteAircraftLights
|
||||||
{
|
{
|
||||||
double lightStrobe; //!< Is strobe light on?
|
double lightStrobe; //!< Is strobe light on?
|
||||||
double lightLanding; //!< Is landing light on?
|
double lightLanding; //!< Is landing light on?
|
||||||
@@ -206,7 +207,7 @@ namespace BlackSimPlugin
|
|||||||
};
|
};
|
||||||
|
|
||||||
//! Handles SimConnect data definitions
|
//! Handles SimConnect data definitions
|
||||||
class CSimConnectDefinitions
|
class FSXCOMMON_EXPORT CSimConnectDefinitions
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//! SimConnect definiton IDs
|
//! SimConnect definiton IDs
|
||||||
|
|||||||
@@ -12,7 +12,8 @@
|
|||||||
#ifndef BLACKSIMPLUGIN_FSXCOMMON_SIMCONNECTOBJECT_H
|
#ifndef BLACKSIMPLUGIN_FSXCOMMON_SIMCONNECTOBJECT_H
|
||||||
#define BLACKSIMPLUGIN_FSXCOMMON_SIMCONNECTOBJECT_H
|
#define BLACKSIMPLUGIN_FSXCOMMON_SIMCONNECTOBJECT_H
|
||||||
|
|
||||||
#include "simconnectdatadefinition.h"
|
#include "plugins/simulator/fsxcommon/fsxcommonexport.h"
|
||||||
|
#include "plugins/simulator/fsxcommon/simconnectdatadefinition.h"
|
||||||
#include "blackmisc/simulation/simulatedaircraft.h"
|
#include "blackmisc/simulation/simulatedaircraft.h"
|
||||||
#include "blackmisc/simulation/interpolatormulti.h"
|
#include "blackmisc/simulation/interpolatormulti.h"
|
||||||
#include <QSharedPointer>
|
#include <QSharedPointer>
|
||||||
@@ -24,7 +25,7 @@ namespace BlackSimPlugin
|
|||||||
namespace FsxCommon
|
namespace FsxCommon
|
||||||
{
|
{
|
||||||
//! Class representing a SimConnect object
|
//! Class representing a SimConnect object
|
||||||
class CSimConnectObject
|
class FSXCOMMON_EXPORT CSimConnectObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//! Type
|
//! Type
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
#ifndef BLACKSIMPLUGIN_FSXCOMMON_SIMCONNECTSETTINGSCOMPONENT_H
|
#ifndef BLACKSIMPLUGIN_FSXCOMMON_SIMCONNECTSETTINGSCOMPONENT_H
|
||||||
#define BLACKSIMPLUGIN_FSXCOMMON_SIMCONNECTSETTINGSCOMPONENT_H
|
#define BLACKSIMPLUGIN_FSXCOMMON_SIMCONNECTSETTINGSCOMPONENT_H
|
||||||
|
|
||||||
|
#include "plugins/simulator/fsxcommon/fsxcommonexport.h"
|
||||||
#include "blackgui/overlaymessagesframe.h"
|
#include "blackgui/overlaymessagesframe.h"
|
||||||
#include "blackmisc/settingscache.h"
|
#include "blackmisc/settingscache.h"
|
||||||
#include "blackmisc/simulation/settings/simulatorsettings.h"
|
#include "blackmisc/simulation/settings/simulatorsettings.h"
|
||||||
@@ -27,7 +28,7 @@ namespace BlackSimPlugin
|
|||||||
/*!
|
/*!
|
||||||
* A component that gathers all SimConnect related settings.
|
* A component that gathers all SimConnect related settings.
|
||||||
*/
|
*/
|
||||||
class CSimConnectSettingsComponent : public BlackGui::COverlayMessagesFrame
|
class FSXCOMMON_EXPORT CSimConnectSettingsComponent : public BlackGui::COverlayMessagesFrame
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,8 @@
|
|||||||
#ifndef BLACKSIMPLUGIN_FSXCOMMON_SIMCONNECTSYMBOLS_H
|
#ifndef BLACKSIMPLUGIN_FSXCOMMON_SIMCONNECTSYMBOLS_H
|
||||||
#define BLACKSIMPLUGIN_FSXCOMMON_SIMCONNECTSYMBOLS_H
|
#define BLACKSIMPLUGIN_FSXCOMMON_SIMCONNECTSYMBOLS_H
|
||||||
|
|
||||||
|
#include "plugins/simulator/fsxcommon/fsxcommonexport.h"
|
||||||
|
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
|
|
||||||
#ifdef Q_OS_WIN64
|
#ifdef Q_OS_WIN64
|
||||||
@@ -26,12 +28,12 @@ enum P3DSimConnectVersion
|
|||||||
};
|
};
|
||||||
|
|
||||||
//! String to the enum
|
//! String to the enum
|
||||||
P3DSimConnectVersion stringToP3DVersion(const QString &p3d);
|
FSXCOMMON_EXPORT P3DSimConnectVersion stringToP3DVersion(const QString &p3d);
|
||||||
|
|
||||||
//! Load and resolve versioned P3D SimConnect.
|
//! Load and resolve versioned P3D SimConnect.
|
||||||
//! If a another version was already loaded previously, it won't unload it.
|
//! If a another version was already loaded previously, it won't unload it.
|
||||||
//! You have to call /sa unloadSimConnect() before.
|
//! You have to call /sa unloadSimConnect() before.
|
||||||
bool loadAndResolveP3DSimConnect(P3DSimConnectVersion version);
|
FSXCOMMON_EXPORT bool loadAndResolveP3DSimConnect(P3DSimConnectVersion version);
|
||||||
|
|
||||||
//! Same but string version
|
//! Same but string version
|
||||||
inline bool loadAndResolveP3DSimConnectByString(const QString &version) { return loadAndResolveP3DSimConnect(stringToP3DVersion(version)); }
|
inline bool loadAndResolveP3DSimConnectByString(const QString &version) { return loadAndResolveP3DSimConnect(stringToP3DVersion(version)); }
|
||||||
@@ -41,7 +43,7 @@ inline bool loadAndResolveP3DSimConnectByString(const QString &version) { return
|
|||||||
//! Load and resolve FSX SimConnect.
|
//! Load and resolve FSX SimConnect.
|
||||||
//! \param manifestProbing Set to true if you want to try loading from the assembly cache with manifests.
|
//! \param manifestProbing Set to true if you want to try loading from the assembly cache with manifests.
|
||||||
//! Otherwise the library in the bin folder will be loaded.
|
//! Otherwise the library in the bin folder will be loaded.
|
||||||
bool loadAndResolveFsxSimConnect(bool manifestProbing);
|
FSXCOMMON_EXPORT bool loadAndResolveFsxSimConnect(bool manifestProbing);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -12,10 +12,11 @@
|
|||||||
#ifndef BLACKSIMPLUGIN_FSXCOMMON_SIMULATORFSXCOMMON_H
|
#ifndef BLACKSIMPLUGIN_FSXCOMMON_SIMULATORFSXCOMMON_H
|
||||||
#define BLACKSIMPLUGIN_FSXCOMMON_SIMULATORFSXCOMMON_H
|
#define BLACKSIMPLUGIN_FSXCOMMON_SIMULATORFSXCOMMON_H
|
||||||
|
|
||||||
#include "simconnectdatadefinition.h"
|
#include "plugins/simulator/fsxcommon/fsxcommonexport.h"
|
||||||
#include "simconnectobject.h"
|
#include "plugins/simulator/fsxcommon/simconnectdatadefinition.h"
|
||||||
#include "../fsxcommon/simconnectwindows.h"
|
#include "plugins/simulator/fsxcommon/simconnectobject.h"
|
||||||
#include "../fscommon/simulatorfscommon.h"
|
#include "plugins/simulator/fsxcommon/simconnectwindows.h"
|
||||||
|
#include "plugins/simulator/fscommon/simulatorfscommon.h"
|
||||||
#include "blackcore/simulator.h"
|
#include "blackcore/simulator.h"
|
||||||
#include "blackmisc/simulation/interpolatorlinear.h"
|
#include "blackmisc/simulation/interpolatorlinear.h"
|
||||||
#include "blackmisc/simulation/simulatorplugininfo.h"
|
#include "blackmisc/simulation/simulatorplugininfo.h"
|
||||||
@@ -115,7 +116,7 @@ namespace BlackSimPlugin
|
|||||||
};
|
};
|
||||||
|
|
||||||
//! FSX Simulator Implementation
|
//! FSX Simulator Implementation
|
||||||
class CSimulatorFsxCommon : public FsCommon::CSimulatorFsCommon
|
class FSXCOMMON_EXPORT CSimulatorFsxCommon : public FsCommon::CSimulatorFsCommon
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_INTERFACES(BlackCore::ISimulator)
|
Q_INTERFACES(BlackCore::ISimulator)
|
||||||
@@ -615,7 +616,7 @@ namespace BlackSimPlugin
|
|||||||
};
|
};
|
||||||
|
|
||||||
//! Listener for FSX
|
//! Listener for FSX
|
||||||
class CSimulatorFsxCommonListener : public BlackCore::ISimulatorListener
|
class FSXCOMMON_EXPORT CSimulatorFsxCommonListener : public BlackCore::ISimulatorListener
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
#ifndef BLACKSIMPLUGIN_FSXCOMMON_SIMULATORFSXCONFIGWINDOW_H
|
#ifndef BLACKSIMPLUGIN_FSXCOMMON_SIMULATORFSXCONFIGWINDOW_H
|
||||||
#define BLACKSIMPLUGIN_FSXCOMMON_SIMULATORFSXCONFIGWINDOW_H
|
#define BLACKSIMPLUGIN_FSXCOMMON_SIMULATORFSXCONFIGWINDOW_H
|
||||||
|
|
||||||
|
#include "plugins/simulator/fsxcommon/fsxcommonexport.h"
|
||||||
#include "blackgui/pluginconfigwindow.h"
|
#include "blackgui/pluginconfigwindow.h"
|
||||||
#include "blackmisc/simulation/simulatorinfo.h"
|
#include "blackmisc/simulation/simulatorinfo.h"
|
||||||
#include <QScopedPointer>
|
#include <QScopedPointer>
|
||||||
@@ -24,7 +25,7 @@ namespace BlackSimPlugin
|
|||||||
/**
|
/**
|
||||||
* A window that lets user set up the FSX plugin.
|
* A window that lets user set up the FSX plugin.
|
||||||
*/
|
*/
|
||||||
class CSimulatorFsxConfigWindow : public BlackGui::CPluginConfigWindow
|
class FSXCOMMON_EXPORT CSimulatorFsxConfigWindow : public BlackGui::CPluginConfigWindow
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ TEMPLATE = lib
|
|||||||
|
|
||||||
CONFIG += plugin shared
|
CONFIG += plugin shared
|
||||||
CONFIG += blackconfig blackmisc blackcore blackgui
|
CONFIG += blackconfig blackmisc blackcore blackgui
|
||||||
CONFIG += simulatorfsxcommon simulatorfscommon simulatorplugincommon fsuipc simconnect
|
CONFIG += simulatorfsxcommon
|
||||||
|
|
||||||
DEPENDPATH += . $$SourceRoot/src
|
DEPENDPATH += . $$SourceRoot/src
|
||||||
INCLUDEPATH += . $$SourceRoot/src
|
INCLUDEPATH += . $$SourceRoot/src
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ TEMPLATE = lib
|
|||||||
|
|
||||||
CONFIG += plugin shared
|
CONFIG += plugin shared
|
||||||
CONFIG += blackconfig blackmisc blackcore blackgui
|
CONFIG += blackconfig blackmisc blackcore blackgui
|
||||||
CONFIG += simulatorfsxcommon simulatorfscommon simulatorplugincommon fsuipc simconnect
|
CONFIG += simulatorfsxcommon simulatorfscommon simulatorplugincommon simconnect
|
||||||
|
|
||||||
DEPENDPATH += . $$SourceRoot/src
|
DEPENDPATH += . $$SourceRoot/src
|
||||||
INCLUDEPATH += . $$SourceRoot/src
|
INCLUDEPATH += . $$SourceRoot/src
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ TEMPLATE = lib
|
|||||||
|
|
||||||
CONFIG += plugin shared
|
CONFIG += plugin shared
|
||||||
CONFIG += blackconfig blackmisc blackcore blackgui
|
CONFIG += blackconfig blackmisc blackcore blackgui
|
||||||
CONFIG += simulatorfsxcommon simulatorfscommon simulatorplugincommon fsuipc simconnect
|
CONFIG += simulatorfsxcommon
|
||||||
|
|
||||||
DEPENDPATH += . $$SourceRoot/src
|
DEPENDPATH += . $$SourceRoot/src
|
||||||
INCLUDEPATH += . $$SourceRoot/src
|
INCLUDEPATH += . $$SourceRoot/src
|
||||||
|
|||||||
@@ -5,14 +5,25 @@ QT += core dbus xml network widgets
|
|||||||
TARGET = simulatorplugincommon
|
TARGET = simulatorplugincommon
|
||||||
TEMPLATE = lib
|
TEMPLATE = lib
|
||||||
|
|
||||||
CONFIG += staticlib
|
CONFIG += blackconfig blackmisc blackcore blackgui
|
||||||
CONFIG += blackconfig blackmisc blackgui
|
|
||||||
|
|
||||||
DEPENDPATH += . $$SourceRoot/src
|
DEPENDPATH += . $$SourceRoot/src
|
||||||
INCLUDEPATH += . $$SourceRoot/src
|
INCLUDEPATH += . $$SourceRoot/src
|
||||||
|
|
||||||
|
DEFINES += BUILD_SIMULATORPLUGINCOMMON_LIB
|
||||||
|
|
||||||
SOURCES += *.cpp
|
SOURCES += *.cpp
|
||||||
HEADERS += *.h
|
HEADERS += *.h
|
||||||
|
|
||||||
DESTDIR = $$DestRoot/lib
|
DESTDIR = $$DestRoot/lib
|
||||||
|
DLLDESTDIR = $$DestRoot/bin
|
||||||
|
|
||||||
|
win32 {
|
||||||
|
dlltarget.path = $$PREFIX/bin
|
||||||
|
INSTALLS += dlltarget
|
||||||
|
} else {
|
||||||
|
target.path = $$PREFIX/lib
|
||||||
|
INSTALLS += target
|
||||||
|
}
|
||||||
|
|
||||||
load(common_post)
|
load(common_post)
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
#ifndef BLACKSIMPLUGIN_COMMON_SIMULATORPLUGINCOMMON_H
|
#ifndef BLACKSIMPLUGIN_COMMON_SIMULATORPLUGINCOMMON_H
|
||||||
#define BLACKSIMPLUGIN_COMMON_SIMULATORPLUGINCOMMON_H
|
#define BLACKSIMPLUGIN_COMMON_SIMULATORPLUGINCOMMON_H
|
||||||
|
|
||||||
|
#include "plugins/simulator/plugincommon/simulatorplugincommonexport.h"
|
||||||
#include "blackcore/simulator.h"
|
#include "blackcore/simulator.h"
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QPointer>
|
#include <QPointer>
|
||||||
@@ -22,7 +23,7 @@ namespace BlackSimPlugin
|
|||||||
namespace Common
|
namespace Common
|
||||||
{
|
{
|
||||||
//! Common base class for simulator plugins
|
//! Common base class for simulator plugins
|
||||||
class CSimulatorPluginCommon : public BlackCore::ISimulator
|
class SIMULATORPLUGINCOMMON_EXPORT CSimulatorPluginCommon : public BlackCore::ISimulator
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_INTERFACES(BlackCore::ISimulator)
|
Q_INTERFACES(BlackCore::ISimulator)
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/* Copyright (C) 2018
|
||||||
|
* swift project Community / Contributors
|
||||||
|
*
|
||||||
|
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
||||||
|
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
|
||||||
|
* including this file, may be copied, modified, propagated, or distributed except according to the terms
|
||||||
|
* contained in the LICENSE file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
//! \file
|
||||||
|
|
||||||
|
#ifndef BLACKSIMPLUGIN_SIMULATORPLUGINCOMMON_MACROS_H
|
||||||
|
#define BLACKSIMPLUGIN_SIMULATORPLUGINCOMMON_MACROS_H
|
||||||
|
|
||||||
|
#include <QtGlobal>
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \def SIMULATORPLUGINCOMMON_EXPORT
|
||||||
|
* SimulatorPluginCommon Export Macro
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef WITH_STATIC
|
||||||
|
# if defined(BUILD_SIMULATORPLUGINCOMMON_LIB)
|
||||||
|
# define SIMULATORPLUGINCOMMON_EXPORT Q_DECL_EXPORT
|
||||||
|
# else
|
||||||
|
# define SIMULATORPLUGINCOMMON_EXPORT Q_DECL_IMPORT
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
# define SIMULATORPLUGINCOMMON_EXPORT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // guard
|
||||||
@@ -6,7 +6,7 @@ TARGET = simulatorxplane
|
|||||||
TEMPLATE = lib
|
TEMPLATE = lib
|
||||||
|
|
||||||
CONFIG += plugin shared
|
CONFIG += plugin shared
|
||||||
CONFIG += blackmisc blackcore blackgui blackconfig
|
CONFIG += blackmisc blackcore blackgui blackconfig simulatorplugincommon
|
||||||
|
|
||||||
DEPENDPATH += . $$SourceRoot/src
|
DEPENDPATH += . $$SourceRoot/src
|
||||||
INCLUDEPATH += . $$SourceRoot/src
|
INCLUDEPATH += . $$SourceRoot/src
|
||||||
@@ -21,9 +21,6 @@ HEADERS += *.h
|
|||||||
DISTFILES += simulatorxplane.json
|
DISTFILES += simulatorxplane.json
|
||||||
DESTDIR = $$DestRoot/bin/plugins/simulator
|
DESTDIR = $$DestRoot/bin/plugins/simulator
|
||||||
|
|
||||||
LIBS *= -lsimulatorplugincommon
|
|
||||||
addStaticLibraryDependency(simulatorplugincommon)
|
|
||||||
|
|
||||||
win32 {
|
win32 {
|
||||||
dlltarget.path = $$PREFIX/bin/plugins/simulator
|
dlltarget.path = $$PREFIX/bin/plugins/simulator
|
||||||
INSTALLS += dlltarget
|
INSTALLS += dlltarget
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ QT += core testlib dbus network gui widgets
|
|||||||
TARGET = testblacksimpluginfsxp3d
|
TARGET = testblacksimpluginfsxp3d
|
||||||
CONFIG -= app_bundle
|
CONFIG -= app_bundle
|
||||||
CONFIG += blackmisc blackcore blackconfig blackgui
|
CONFIG += blackmisc blackcore blackconfig blackgui
|
||||||
CONFIG += simulatorfsxcommon simulatorfscommon simulatorplugincommon fsuipc simconnect
|
CONFIG += simulatorfsxcommon simulatorfscommon simulatorplugincommon simconnect
|
||||||
CONFIG += testcase
|
CONFIG += testcase
|
||||||
CONFIG += no_testcase_installs
|
CONFIG += no_testcase_installs
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user