mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 14:55:36 +08:00
[MSFS] Rename FS2020 to MSFS
This commit is contained in:
committed by
Mat Sutcliffe
parent
74679137d1
commit
7e04a2c40f
@@ -26,7 +26,7 @@
|
|||||||
"xplane": true,
|
"xplane": true,
|
||||||
"xswiftbus": true,
|
"xswiftbus": true,
|
||||||
"fg": true,
|
"fg": true,
|
||||||
"fs2020": true
|
"msfs": true
|
||||||
},
|
},
|
||||||
"releaseWithDebugInfo": true,
|
"releaseWithDebugInfo": true,
|
||||||
"profileRelease": false,
|
"profileRelease": false,
|
||||||
|
|||||||
@@ -72,11 +72,11 @@ This plugin acts as the interface between swift and FSX.</detailedDescription>
|
|||||||
</shouldPackRuleList>
|
</shouldPackRuleList>
|
||||||
</component>
|
</component>
|
||||||
<component>
|
<component>
|
||||||
<name>fs2020</name>
|
<name>msfs</name>
|
||||||
<description>MS Flight Simulator 2020</description>
|
<description>MS Flight Simulator 2020</description>
|
||||||
<canBeEdited>1</canBeEdited>
|
<canBeEdited>1</canBeEdited>
|
||||||
<detailedDescription>MS Flight Simulator 2020 Simulator Plugin
|
<detailedDescription>MS Flight Simulator 2020 Simulator Plugin
|
||||||
This plugin acts as the interface between swift and FS2020.</detailedDescription>
|
This plugin acts as the interface between swift and MSFS.</detailedDescription>
|
||||||
<selected>1</selected>
|
<selected>1</selected>
|
||||||
<show>1</show>
|
<show>1</show>
|
||||||
<folderList>
|
<folderList>
|
||||||
@@ -87,7 +87,7 @@ This plugin acts as the interface between swift and FS2020.</detailedDescription
|
|||||||
<platforms>windows</platforms>
|
<platforms>windows</platforms>
|
||||||
<distributionFileList>
|
<distributionFileList>
|
||||||
<distributionFile>
|
<distributionFile>
|
||||||
<origin>../../dist/bin/plugins/simulator/simulatorfs2020.dll</origin>
|
<origin>../../dist/bin/plugins/simulator/simulatormsfs.dll</origin>
|
||||||
</distributionFile>
|
</distributionFile>
|
||||||
</distributionFileList>
|
</distributionFileList>
|
||||||
</folder>
|
</folder>
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ namespace BlackCore
|
|||||||
MSCFS3, /*!< MS Combat Flight Simulator 3 */
|
MSCFS3, /*!< MS Combat Flight Simulator 3 */
|
||||||
MSFS2004, /*!< MS Flight Simulator 2004 */
|
MSFS2004, /*!< MS Flight Simulator 2004 */
|
||||||
MSFSX, /*!< MS Flight Simulator X */
|
MSFSX, /*!< MS Flight Simulator X */
|
||||||
MSFS2020, /*!< MS Flight Simulator 2020 */
|
MSFS, /*!< MS Flight Simulator 2020 */
|
||||||
XPLANE8, /*!< X-Plane 8 */
|
XPLANE8, /*!< X-Plane 8 */
|
||||||
XPLANE9, /*!< X-Plane 9 */
|
XPLANE9, /*!< X-Plane 9 */
|
||||||
XPLANE10, /*!< X-Plane 10 */
|
XPLANE10, /*!< X-Plane 10 */
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ namespace BlackCore
|
|||||||
// future versions
|
// future versions
|
||||||
case SimType::XPLANE12:
|
case SimType::XPLANE12:
|
||||||
case SimType::P3Dv5:
|
case SimType::P3Dv5:
|
||||||
case SimType::MSFS2020:
|
case SimType::MSFS:
|
||||||
return "0";
|
return "0";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -83,9 +83,9 @@ namespace BlackMisc
|
|||||||
return getSimulator().testFlag(FG);
|
return getSimulator().testFlag(FG);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CSimulatorInfo::isFS2020() const
|
bool CSimulatorInfo::isMSFS() const
|
||||||
{
|
{
|
||||||
return getSimulator().testFlag(FS2020);
|
return getSimulator().testFlag(MSFS);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CSimulatorInfo::isAnySimulator() const
|
bool CSimulatorInfo::isAnySimulator() const
|
||||||
@@ -251,7 +251,7 @@ namespace BlackMisc
|
|||||||
{
|
{
|
||||||
s |= P3D;
|
s |= P3D;
|
||||||
}
|
}
|
||||||
if (i.contains("fs2020")) { s |= FS2020; }
|
if (i.contains("msfs")) { s |= MSFS; }
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -54,10 +54,10 @@ namespace BlackMisc
|
|||||||
XPLANE = 1 << 2,
|
XPLANE = 1 << 2,
|
||||||
P3D = 1 << 3,
|
P3D = 1 << 3,
|
||||||
FG = 1 << 4,
|
FG = 1 << 4,
|
||||||
FS2020 = 1 << 5,
|
MSFS = 1 << 5,
|
||||||
FSX_P3D = FSX | P3D,
|
FSX_P3D = FSX | P3D,
|
||||||
AllFsFamily = FSX | FS9 | P3D | FS2020,
|
AllFsFamily = FSX | FS9 | P3D | MSFS,
|
||||||
All = FSX | FS9 | XPLANE | P3D | FG | FS2020
|
All = FSX | FS9 | XPLANE | P3D | FG | MSFS
|
||||||
};
|
};
|
||||||
Q_DECLARE_FLAGS(Simulator, SimulatorFlag)
|
Q_DECLARE_FLAGS(Simulator, SimulatorFlag)
|
||||||
|
|
||||||
@@ -100,8 +100,8 @@ namespace BlackMisc
|
|||||||
//! FG?
|
//! FG?
|
||||||
bool isFG() const;
|
bool isFG() const;
|
||||||
|
|
||||||
//! FS2020?
|
//! MSFS?
|
||||||
bool isFS2020() const;
|
bool isMSFS() const;
|
||||||
|
|
||||||
//! Any simulator?
|
//! Any simulator?
|
||||||
bool isAnySimulator() const;
|
bool isAnySimulator() const;
|
||||||
|
|||||||
@@ -110,9 +110,9 @@ namespace BlackMisc
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
const QString &CSimulatorPluginInfo::fs2020PluginIdentifier()
|
const QString &CSimulatorPluginInfo::msfsPluginIdentifier()
|
||||||
{
|
{
|
||||||
static const QString s("org.swift-project.plugins.simulator.fs2020");
|
static const QString s("org.swift-project.plugins.simulator.msfs");
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -132,7 +132,7 @@ namespace BlackMisc
|
|||||||
fs9PluginIdentifier(),
|
fs9PluginIdentifier(),
|
||||||
emulatedPluginIdentifier(),
|
emulatedPluginIdentifier(),
|
||||||
fgPluginIdentifier(),
|
fgPluginIdentifier(),
|
||||||
fs2020PluginIdentifier()
|
msfsPluginIdentifier()
|
||||||
});
|
});
|
||||||
return identifiers;
|
return identifiers;
|
||||||
}
|
}
|
||||||
@@ -148,7 +148,7 @@ namespace BlackMisc
|
|||||||
return QStringList
|
return QStringList
|
||||||
{
|
{
|
||||||
fsxPluginIdentifier(),
|
fsxPluginIdentifier(),
|
||||||
fs2020PluginIdentifier(),
|
msfsPluginIdentifier(),
|
||||||
p3dPluginIdentifier(),
|
p3dPluginIdentifier(),
|
||||||
xplanePluginIdentifier(),
|
xplanePluginIdentifier(),
|
||||||
fgPluginIdentifier()
|
fgPluginIdentifier()
|
||||||
|
|||||||
@@ -88,8 +88,8 @@ namespace BlackMisc
|
|||||||
//! Plugin identifier (FlightGear)
|
//! Plugin identifier (FlightGear)
|
||||||
static const QString &fgPluginIdentifier();
|
static const QString &fgPluginIdentifier();
|
||||||
|
|
||||||
//! Plugin identifier (FS2020)
|
//! Plugin identifier (MSFS 2020)
|
||||||
static const QString &fs2020PluginIdentifier();
|
static const QString &msfsPluginIdentifier();
|
||||||
|
|
||||||
//! Plugin identifier (emulated simulator plugin)
|
//! Plugin identifier (emulated simulator plugin)
|
||||||
static const QString &emulatedPluginIdentifier();
|
static const QString &emulatedPluginIdentifier();
|
||||||
|
|||||||
@@ -2917,9 +2917,9 @@ namespace BlackSimPlugin
|
|||||||
// FSX drivers only works with FSX
|
// FSX drivers only works with FSX
|
||||||
return connectedSimName.contains("fsx") || connectedSimName.contains("microsoft") || connectedSimName.contains("simulator x");
|
return connectedSimName.contains("fsx") || connectedSimName.contains("microsoft") || connectedSimName.contains("simulator x");
|
||||||
}
|
}
|
||||||
else if (pluginSim.isFS2020())
|
else if (pluginSim.isMSFS())
|
||||||
{
|
{
|
||||||
// FS2020 drivers only works with FS2020
|
// MSFS 2020 drivers only works with MSFS
|
||||||
return connectedSimName.contains("kittyhawk");
|
return connectedSimName.contains("kittyhawk");
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -15,9 +15,21 @@ DESTDIR = $$DestRoot/bin/plugins/simulator
|
|||||||
SOURCES += *.cpp
|
SOURCES += *.cpp
|
||||||
HEADERS += *.h
|
HEADERS += *.h
|
||||||
|
|
||||||
REQUIRES += swiftConfig(sims.fs2020)
|
DEFINES += SIMCONNECT_H_NOMANIFEST
|
||||||
TARGET = simulatorfs2020
|
equals(WORD_SIZE,64) {
|
||||||
DISTFILES += simulatorfs2020.json
|
SIMCONNECT_INCLUDE += $$EXTERNALSROOT/common/include/simconnect/P3D-v4
|
||||||
|
DEFINES += P3D_SDK_VERSION=400
|
||||||
|
}
|
||||||
|
equals(WORD_SIZE,32) {
|
||||||
|
SIMCONNECT_INCLUDE += $$EXTERNALSROOT/common/include/simconnect/FSX-XPack
|
||||||
|
}
|
||||||
|
INCLUDEPATH *= $$SIMCONNECT_INCLUDE
|
||||||
|
gcc:QMAKE_CXXFLAGS_WARN_ON += -isystem $$SIMCONNECT_INCLUDE
|
||||||
|
llvm:QMAKE_CXXFLAGS_WARN_ON *= $$clangArg(-isystem$$system_path($$SIMCONNECT_INCLUDE))
|
||||||
|
|
||||||
|
REQUIRES += swiftConfig(sims.msfs)
|
||||||
|
TARGET = simulatormsfs
|
||||||
|
DISTFILES += simulatormsfs.json
|
||||||
|
|
||||||
win32 {
|
win32 {
|
||||||
dlltarget.path = $$PREFIX/bin/plugins/simulator
|
dlltarget.path = $$PREFIX/bin/plugins/simulator
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
* or distributed except according to the terms contained in the LICENSE file.
|
* or distributed except according to the terms contained in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "simulatorfs2020.h"
|
#include "simulatormsfs.h"
|
||||||
#include "../fsxcommon/simconnectsymbols.h"
|
#include "../fsxcommon/simconnectsymbols.h"
|
||||||
|
|
||||||
using namespace BlackMisc;
|
using namespace BlackMisc;
|
||||||
@@ -21,9 +21,9 @@ using namespace BlackCore;
|
|||||||
|
|
||||||
namespace BlackSimPlugin
|
namespace BlackSimPlugin
|
||||||
{
|
{
|
||||||
namespace Fs2020
|
namespace Msfs
|
||||||
{
|
{
|
||||||
CSimulatorFs2020::CSimulatorFs2020(const CSimulatorPluginInfo &info,
|
CSimulatorMsFs::CSimulatorMsFs(const CSimulatorPluginInfo &info,
|
||||||
IOwnAircraftProvider *ownAircraftProvider,
|
IOwnAircraftProvider *ownAircraftProvider,
|
||||||
IRemoteAircraftProvider *remoteAircraftProvider,
|
IRemoteAircraftProvider *remoteAircraftProvider,
|
||||||
IWeatherGridProvider *weatherGridProvider,
|
IWeatherGridProvider *weatherGridProvider,
|
||||||
@@ -40,15 +40,15 @@ namespace BlackSimPlugin
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CSimulatorFs2020::connectTo()
|
bool CSimulatorMsFs::connectTo()
|
||||||
{
|
{
|
||||||
if (!loadAndResolveFsxSimConnect(true)) { return false; }
|
//if (!loadAndResolveFsxSimConnect(true)) { return false; }
|
||||||
return CSimulatorFsxCommon::connectTo();
|
return CSimulatorFsxCommon::connectTo();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSimulatorFs2020Listener::startImpl()
|
void CSimulatorMsFsListener::startImpl()
|
||||||
{
|
{
|
||||||
if (!loadAndResolveFsxSimConnect(true)) { return; }
|
//if (!loadAndResolveFsxSimConnect(true)) { return; }
|
||||||
return CSimulatorFsxCommonListener::startImpl();
|
return CSimulatorFsxCommonListener::startImpl();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -8,23 +8,23 @@
|
|||||||
|
|
||||||
//! \file
|
//! \file
|
||||||
|
|
||||||
#ifndef BLACKSIMPLUGIN_FS2020_SIMULATORFS2020_H
|
#ifndef BLACKSIMPLUGIN_MSFS_SIMULATORMSFS_H
|
||||||
#define BLACKSIMPLUGIN_FS2020_SIMULATORFS2020_H
|
#define BLACKSIMPLUGIN_MSFS_SIMULATORMSFS_H
|
||||||
|
|
||||||
#include "../fsxcommon/simulatorfsxcommon.h"
|
#include "../fsxcommon/simulatorfsxcommon.h"
|
||||||
|
|
||||||
namespace BlackSimPlugin
|
namespace BlackSimPlugin
|
||||||
{
|
{
|
||||||
namespace Fs2020
|
namespace Msfs
|
||||||
{
|
{
|
||||||
//! FSX simulator implementation
|
//! FSX simulator implementation
|
||||||
class CSimulatorFs2020 : public BlackSimPlugin::FsxCommon::CSimulatorFsxCommon
|
class CSimulatorMsFs : public BlackSimPlugin::FsxCommon::CSimulatorFsxCommon
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
//! Constructor, parameters as in \sa BlackCore::ISimulatorFactory::create
|
//! Constructor, parameters as in \sa BlackCore::ISimulatorFactory::create
|
||||||
CSimulatorFs2020(const BlackMisc::Simulation::CSimulatorPluginInfo &info,
|
CSimulatorMsFs(const BlackMisc::Simulation::CSimulatorPluginInfo &info,
|
||||||
BlackMisc::Simulation::IOwnAircraftProvider *ownAircraftProvider,
|
BlackMisc::Simulation::IOwnAircraftProvider *ownAircraftProvider,
|
||||||
BlackMisc::Simulation::IRemoteAircraftProvider *remoteAircraftProvider,
|
BlackMisc::Simulation::IRemoteAircraftProvider *remoteAircraftProvider,
|
||||||
BlackMisc::Weather::IWeatherGridProvider *weatherGridProvider,
|
BlackMisc::Weather::IWeatherGridProvider *weatherGridProvider,
|
||||||
@@ -37,8 +37,8 @@ namespace BlackSimPlugin
|
|||||||
//! @}
|
//! @}
|
||||||
};
|
};
|
||||||
|
|
||||||
//! Listener for FSX
|
//! Listener for MSFS
|
||||||
class CSimulatorFs2020Listener : public FsxCommon::CSimulatorFsxCommonListener
|
class CSimulatorMsFsListener : public FsxCommon::CSimulatorFsxCommonListener
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"identifier" : "org.swift-project.plugins.simulator.fs2020",
|
"identifier" : "org.swift-project.plugins.simulator.msfs",
|
||||||
"name" : "Flight Simulator 2020",
|
"name" : "Flight Simulator 2020",
|
||||||
"simulator" : "fsx",
|
"simulator" : "fsx",
|
||||||
"description" : "Microsoft Flight Simulator 2020"
|
"description" : "Microsoft Flight Simulator 2020"
|
||||||
@@ -6,8 +6,8 @@
|
|||||||
* or distributed except according to the terms contained in the LICENSE file.
|
* or distributed except according to the terms contained in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "simulatorfs2020factory.h"
|
#include "simulatormsfsfactory.h"
|
||||||
#include "simulatorfs2020.h"
|
#include "simulatormsfs.h"
|
||||||
#include "blackmisc/simulation/simulatorplugininfo.h"
|
#include "blackmisc/simulation/simulatorplugininfo.h"
|
||||||
|
|
||||||
using namespace BlackMisc::Network;
|
using namespace BlackMisc::Network;
|
||||||
@@ -17,21 +17,21 @@ using namespace BlackCore;
|
|||||||
|
|
||||||
namespace BlackSimPlugin
|
namespace BlackSimPlugin
|
||||||
{
|
{
|
||||||
namespace Fs2020
|
namespace Msfs
|
||||||
{
|
{
|
||||||
ISimulator *CSimulatorFs2020Factory::create(const CSimulatorPluginInfo &info,
|
ISimulator *CSimulatorMsFsFactory::create(const CSimulatorPluginInfo &info,
|
||||||
IOwnAircraftProvider *ownAircraftProvider,
|
IOwnAircraftProvider *ownAircraftProvider,
|
||||||
IRemoteAircraftProvider *remoteAircraftProvider,
|
IRemoteAircraftProvider *remoteAircraftProvider,
|
||||||
IWeatherGridProvider *weatherGridProvider,
|
IWeatherGridProvider *weatherGridProvider,
|
||||||
IClientProvider *clientProvider)
|
IClientProvider *clientProvider)
|
||||||
{
|
{
|
||||||
Q_ASSERT(ownAircraftProvider);
|
Q_ASSERT(ownAircraftProvider);
|
||||||
return new CSimulatorFs2020(info, ownAircraftProvider, remoteAircraftProvider, weatherGridProvider, clientProvider, this);
|
return new CSimulatorMsFs(info, ownAircraftProvider, remoteAircraftProvider, weatherGridProvider, clientProvider, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
ISimulatorListener *CSimulatorFs2020Factory::createListener(const CSimulatorPluginInfo &info)
|
ISimulatorListener *CSimulatorMsFsFactory::createListener(const CSimulatorPluginInfo &info)
|
||||||
{
|
{
|
||||||
return new CSimulatorFs2020Listener(info);
|
return new CSimulatorMsFsListener(info);
|
||||||
}
|
}
|
||||||
} // namespace
|
} // namespace
|
||||||
} // namespace
|
} // namespace
|
||||||
@@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
//! \file
|
//! \file
|
||||||
|
|
||||||
#ifndef BLACKSIMPLUGIN_SIMULATOR_FSXFACTORY_H
|
#ifndef BLACKSIMPLUGIN_SIMULATOR_MSFSFACTORY_H
|
||||||
#define BLACKSIMPLUGIN_SIMULATOR_FSXFACTORY_H
|
#define BLACKSIMPLUGIN_SIMULATOR_MSFSFACTORY_H
|
||||||
|
|
||||||
#include "blackcore/simulator.h"
|
#include "blackcore/simulator.h"
|
||||||
#include "blackmisc/simulation/simulatorplugininfo.h"
|
#include "blackmisc/simulation/simulatorplugininfo.h"
|
||||||
@@ -19,15 +19,15 @@
|
|||||||
|
|
||||||
namespace BlackSimPlugin
|
namespace BlackSimPlugin
|
||||||
{
|
{
|
||||||
namespace Fs2020
|
namespace Msfs
|
||||||
{
|
{
|
||||||
//! Factory implementation to create CSimulatorFsx instances
|
//! Factory implementation to create CSimulatorFsx instances
|
||||||
class CSimulatorFs2020Factory :
|
class CSimulatorMsFsFactory :
|
||||||
public QObject,
|
public QObject,
|
||||||
public BlackCore::ISimulatorFactory
|
public BlackCore::ISimulatorFactory
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PLUGIN_METADATA(IID "org.swift-project.blackcore.simulatorinterface" FILE "simulatorfs2020.json")
|
Q_PLUGIN_METADATA(IID "org.swift-project.blackcore.simulatorinterface" FILE "simulatormsfs.json")
|
||||||
Q_INTERFACES(BlackCore::ISimulatorFactory)
|
Q_INTERFACES(BlackCore::ISimulatorFactory)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -34,7 +34,7 @@ swiftConfig(sims.fg) {
|
|||||||
SUBDIRS += flightgear
|
SUBDIRS += flightgear
|
||||||
SUBDIRS += flightgearconfig
|
SUBDIRS += flightgearconfig
|
||||||
}
|
}
|
||||||
swiftConfig(sims.fs2020) {
|
swiftConfig(sims.msfs) {
|
||||||
SUBDIRS += fs2020
|
SUBDIRS += msfs
|
||||||
}
|
}
|
||||||
load(common_post)
|
load(common_post)
|
||||||
|
|||||||
Reference in New Issue
Block a user