diff --git a/client.pro b/client.pro new file mode 100644 index 000000000..af8d105b7 --- /dev/null +++ b/client.pro @@ -0,0 +1,62 @@ +TEMPLATE = subdirs + +CONFIG += ordered + +WITH_BLACKMISC = ON + +WITH_BLACKCORE = ON + +WITH_BLACKD = ON + +WITH_BLACKBOX = ON + +WITH_SAMPLES = ON + +#WITH_DRIVER_FSX = ON + +#WITH_DRIVER_FS9 = ON + +#WITH_DRIVER_XPLANE = ON + + +equals(WITH_BLACKMISC, ON) { + SUBDIRS += src/blackmisc +} + +equals(WITH_BLACKCORE, ON) { + SUBDIRS += src/blackcore +} + +equals(WITH_BLACKD, ON) { + SUBDIRS += src/blackd +} + +equals(WITH_BLACKBOX, ON) { + SUBDIRS += src/blackbox +} + +equals(WITH_DRIVER_FSX, ON) { + SUBDIRS += src/driver/fsx +} + +equals(WITH_DRIVER_FS9, ON) { + SUBDIRS += src/driver/fs9 +} + +equals(WITH_DRIVER_XPLANE, ON) { + SUBDIRS += src/driver/xplane +} + +equals(WITH_SAMPLES, ON) { + SUBDIRS += samples/com_client + SUBDIRS += samples/com_server + SUBDIRS += samples/config + SUBDIRS += samples/Geodetic2Ecef + SUBDIRS += samples/interpolator + SUBDIRS += samples/Logging +} + +SUBDIRS += + + + diff --git a/samples/Geodetic2Ecef/Geodetic2Ecef.pro b/samples/Geodetic2Ecef/Geodetic2Ecef.pro new file mode 100644 index 000000000..c3dccb6aa --- /dev/null +++ b/samples/Geodetic2Ecef/Geodetic2Ecef.pro @@ -0,0 +1,35 @@ +QT += core +QT -= gui + +TARGET = sample_geo2ecef +TEMPLATE = app + +CONFIG += console +CONFIG -= app_bundle + +DEPENDPATH += . ../../src + +INCLUDEPATH += . ../../src + +SOURCES += main.cpp\ + +win32-msvc* { + PRE_TARGETDEPS += ../../lib/blackmisc.lib \ + ../../lib/blackcore.lib + + LIBS += ../../lib/blackmisc.lib \ + ../../lib/blackcore.lib +} + +!win32-msvc* { + PRE_TARGETDEPS += ../../lib/libblackmisc.a \ + ../../lib/libblackcore.a + + LIBS += ../../lib/libblackmisc.a \ + ../../lib/libblackcore.a +} + +DESTDIR = ../../bin + + + diff --git a/samples/Geodetic2Ecef/main.cpp b/samples/Geodetic2Ecef/main.cpp index ef4db440a..21fec1a5e 100644 --- a/samples/Geodetic2Ecef/main.cpp +++ b/samples/Geodetic2Ecef/main.cpp @@ -1,12 +1,12 @@ #include #include -#include +#include "blackmisc/debug.h" #include #include #include -#include -#include +#include "blackcore/ecef.h" +#include "blackcore/vector_geo.h" using namespace std; diff --git a/samples/Logging/Logging.pro b/samples/Logging/Logging.pro new file mode 100644 index 000000000..795f495c4 --- /dev/null +++ b/samples/Logging/Logging.pro @@ -0,0 +1,31 @@ +QT += core +QT -= gui + +TARGET = sample_logging +TEMPLATE = app + +CONFIG += console +CONFIG -= app_bundle + +DEPENDPATH += . ../../src + +INCLUDEPATH += . ../../src + +SOURCES += main.cpp\ + +win32-msvc* { + PRE_TARGETDEPS += ../../lib/blackmisc.lib \ + + LIBS += ../../lib/blackmisc.lib \ +} + +!win32-msvc* { + PRE_TARGETDEPS += ../../lib/libblackmisc.a \ + + LIBS += ../../lib/libblackmisc.a \ +} + +DESTDIR = ../../bin + + + diff --git a/samples/Logging/main.cpp b/samples/Logging/main.cpp index 73bd4d8be..b3f428e77 100644 --- a/samples/Logging/main.cpp +++ b/samples/Logging/main.cpp @@ -1,6 +1,6 @@ #include -#include -#include +#include "blackmisc/debug.h" +#include "blackcore/constants.h" #include #include diff --git a/samples/com_client/client.h b/samples/com_client/client.h index 64d759732..3bbd1d9c0 100644 --- a/samples/com_client/client.h +++ b/samples/com_client/client.h @@ -1,5 +1,5 @@ -#include -#include +#include "blackmisc/message_system.h" +#include "blackmisc/com_client.h" class Client : public QObject { @@ -16,4 +16,4 @@ protected slots: private: BlackMisc::CComClient comclient; -}; \ No newline at end of file +}; diff --git a/samples/com_client/com_client.pro b/samples/com_client/com_client.pro new file mode 100644 index 000000000..e4e5fe1f4 --- /dev/null +++ b/samples/com_client/com_client.pro @@ -0,0 +1,35 @@ +QT += core network +QT -= gui + +TARGET = com_client + +CONFIG += console +CONFIG -= app_bundle + +TEMPLATE = app + +DEPENDPATH += . ../../src + +INCLUDEPATH += . ../../src + +SOURCES += main.cpp\ + client.cpp + +HEADERS += client.h + +win32-msvc* { + PRE_TARGETDEPS += ../../lib/blackmisc.lib \ + + LIBS += ../../lib/blackmisc.lib \ +} + +!win32-msvc* { + PRE_TARGETDEPS += ../../lib/libblackmisc.a \ + + LIBS += ../../lib/libblackmisc.a \ +} + +DESTDIR = ../../bin + + + diff --git a/samples/com_client/main.cpp b/samples/com_client/main.cpp index 31e808852..dbfac244e 100644 --- a/samples/com_client/main.cpp +++ b/samples/com_client/main.cpp @@ -1,6 +1,6 @@ -#include +#include -#include +#include "blackmisc/context.h" #include "client.h" using namespace BlackMisc; @@ -8,7 +8,7 @@ using namespace BlackMisc; int main(int argc, char *argv[]) { BlackMisc::CApplicationContext myApplicationContext; - QApplication a(argc, argv); + QCoreApplication a(argc, argv); Client client; diff --git a/samples/com_server/com_server.pro b/samples/com_server/com_server.pro new file mode 100644 index 000000000..c5d8117ff --- /dev/null +++ b/samples/com_server/com_server.pro @@ -0,0 +1,34 @@ +QT += core network +QT -= gui + +TARGET = com_server +TEMPLATE = app + +CONFIG += console +CONFIG -= app_bundle + +DEPENDPATH += . ../../src + +INCLUDEPATH += . ../../src + +SOURCES += main.cpp \ + server.cpp + +HEADERS += server.h + +win32-msvc* { + PRE_TARGETDEPS += ../../lib/blackmisc.lib \ + + LIBS += ../../lib/blackmisc.lib \ +} + +!win32-msvc* { + PRE_TARGETDEPS += ../../lib/libblackmisc.a \ + + LIBS += ../../lib/libblackmisc.a \ +} + +DESTDIR = ../../bin + + + diff --git a/samples/com_server/main.cpp b/samples/com_server/main.cpp index 65a0dbf7f..dc024e6c1 100644 --- a/samples/com_server/main.cpp +++ b/samples/com_server/main.cpp @@ -1,6 +1,6 @@ -#include +#include -#include +#include "blackmisc/context.h" #include "server.h" using namespace BlackMisc; @@ -8,7 +8,7 @@ using namespace BlackMisc; int main(int argc, char *argv[]) { BlackMisc::CApplicationContext myApplicationContext; - QApplication a(argc, argv); + QCoreApplication a(argc, argv); Server server; diff --git a/samples/com_server/server.cpp b/samples/com_server/server.cpp index 5507f1610..f0170cdf6 100644 --- a/samples/com_server/server.cpp +++ b/samples/com_server/server.cpp @@ -1,4 +1,4 @@ -#include +#include "blackmisc/debug.h" #include "server.h" using namespace BlackMisc; @@ -36,4 +36,4 @@ void Server::onData(QString &messageID, QByteArray &message) void TestMessageHandler::onTestMessage(const TestMessage *testmessage) { bDebug << "Message ID: " << testmessage->getID() << " with text: " << testmessage->getTestString(); -} \ No newline at end of file +} diff --git a/samples/com_server/server.h b/samples/com_server/server.h index 1f503ba52..481cfbfcb 100644 --- a/samples/com_server/server.h +++ b/samples/com_server/server.h @@ -1,5 +1,5 @@ -#include -#include +#include "blackmisc/message_system.h" +#include "blackmisc/com_server.h" class TestMessageHandler : public BlackMisc::CMessageHandler { @@ -29,4 +29,4 @@ protected slots: private: BlackMisc::CComServer server; TestMessageHandler myHandler; -}; \ No newline at end of file +}; diff --git a/samples/config/config.pro b/samples/config/config.pro new file mode 100644 index 000000000..b3be69e9b --- /dev/null +++ b/samples/config/config.pro @@ -0,0 +1,28 @@ +QT += core network +QT -= gui + +TARGET = sample_config +TEMPLATE = app + +DEPENDPATH += . ../../src + +INCLUDEPATH += . ../../src + +SOURCES += main.cpp\ + +win32-msvc* { + PRE_TARGETDEPS += ../../lib/blackmisc.lib \ + + LIBS += ../../lib/blackmisc.lib \ +} + +!win32-msvc* { + PRE_TARGETDEPS += ../../lib/libblackmisc.a \ + + LIBS += ../../lib/libblackmisc.a \ +} + +DESTDIR = ../../bin + + + diff --git a/samples/config/main.cpp b/samples/config/main.cpp index 33c32fa5f..e1215c467 100644 --- a/samples/config/main.cpp +++ b/samples/config/main.cpp @@ -1,7 +1,7 @@ #include -#include -#include -#include +#include "blackmisc/debug.h" +#include "blackmisc/config_manager.h" +#include "blackmisc/config.h" #include #include diff --git a/samples/interpolator/interpolator.pro b/samples/interpolator/interpolator.pro new file mode 100644 index 000000000..371bdfd05 --- /dev/null +++ b/samples/interpolator/interpolator.pro @@ -0,0 +1,35 @@ +QT += core +QT -= gui + +TARGET = sample_interpolator +TEMPLATE = app + +CONFIG += console +CONFIG -= app_bundle + +DEPENDPATH += . ../../src + +INCLUDEPATH += . ../../src + +SOURCES += main.cpp\ + +win32-msvc* { + PRE_TARGETDEPS += ../../lib/blackmisc.lib \ + ../../lib/blackcore.lib + + LIBS += ../../lib/blackmisc.lib \ + ../../lib/blackcore.lib +} + +!win32-msvc* { + PRE_TARGETDEPS += ../../lib/libblackmisc.a \ + ../../lib/libblackcore.a + + LIBS += ../../lib/libblackmisc.a \ + ../../lib/libblackcore.a +} + +DESTDIR = ../../bin + + + diff --git a/samples/interpolator/main.cpp b/samples/interpolator/main.cpp index 5e3e2220e..c6cc7724a 100644 --- a/samples/interpolator/main.cpp +++ b/samples/interpolator/main.cpp @@ -5,10 +5,10 @@ #include -#include -#include -#include -#include +#include "blackcore/matrix_3d.h" +#include "blackcore/vector_geo.h" +#include "blackcore/vector_3d.h" +#include "blackcore/interpolator.h" using namespace std; using namespace BlackCore; diff --git a/src/blackbox/blackbox.pro b/src/blackbox/blackbox.pro new file mode 100644 index 000000000..f3ec3e901 --- /dev/null +++ b/src/blackbox/blackbox.pro @@ -0,0 +1,31 @@ +QT += core gui xml svg network + +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +INCLUDEPATH += . .. + +TARGET = BlackBox +TEMPLATE = app + +SOURCES += main.cpp\ + blackbox.cpp \ + dialog_chat.cpp \ + dialog_connect.cpp + +HEADERS += blackbox.h \ + dialog_chat.h \ + dialog_connect.h + +FORMS += blackbox.ui dialog_connect.ui dialog_chat.ui + +win32-msvc* { + PRE_TARGETDEPS += ../../lib/blackmisc.lib + LIBS += ../../lib/blackmisc.lib +} + +!win32-msvc* { + PRE_TARGETDEPS += ../../lib/libblackmisc.a + LIBS += ../../lib/libblackmisc.a +} + +DESTDIR = ../../bin diff --git a/src/blackbox/dialog_connect.cpp b/src/blackbox/dialog_connect.cpp index e12427805..f10035e5d 100644 --- a/src/blackbox/dialog_connect.cpp +++ b/src/blackbox/dialog_connect.cpp @@ -6,9 +6,9 @@ #include "dialog_connect.h" #include "ui_dialog_connect.h" -#include -#include -#include +#include "blackmisc/debug.h" +#include "blackmisc/message.h" +#include "blackmisc/gui_messages.h" using namespace BlackMisc; diff --git a/src/blackbox/dialog_connect.h b/src/blackbox/dialog_connect.h index c8f98001d..612af11c8 100644 --- a/src/blackbox/dialog_connect.h +++ b/src/blackbox/dialog_connect.h @@ -7,7 +7,7 @@ #define DIALOG_CONNECT_H #include -#include +#include "blackmisc/com_client.h" namespace Ui { class CDialogConnect; diff --git a/src/blackbox/main.cpp b/src/blackbox/main.cpp index 3957d6f65..e4bca8d7f 100644 --- a/src/blackbox/main.cpp +++ b/src/blackbox/main.cpp @@ -5,8 +5,8 @@ #include "blackbox.h" #include -#include -#include +#include "blackmisc/context.h" +#include "blackmisc/debug.h" int main(int argc, char *argv[]) { diff --git a/src/blackcore/blackcore.pro b/src/blackcore/blackcore.pro new file mode 100644 index 000000000..22f89c23a --- /dev/null +++ b/src/blackcore/blackcore.pro @@ -0,0 +1,52 @@ +QT += network + +TARGET = blackcore +TEMPLATE = lib +CONFIG += staticlib + +INCLUDEPATH += .. + +DEPENDPATH += . .. + +#PRECOMPILED_HEADER = stdpch.h + +precompile_header:!isEmpty(PRECOMPILED_HEADER) { + DEFINES += USING_PCH + } + +DEFINES += LOG_IN_FILE + +HEADERS += \ + sim_callbacks.h \ + constants.h \ + fsd_protocol.h \ + ecef.h \ + fsd_client.h \ + fsd_messages.h \ + interpolator.h \ + mathematics.h \ + matrix_3d.h \ + multiplayer.h \ + ned.h \ + plane.h \ + simulator.h \ + vector_3d.h \ + vector_geo.h + +SOURCES += \ + ecef.cpp \ + fsd_client.cpp \ + fsd_messages.cpp \ + interpolator.cpp \ + mathematics.cpp \ + matrix_3d.cpp \ + multiplayer.cpp \ + ned.cpp \ + plane.cpp \ + simulator.cpp \ + vector_3d.cpp \ + vector_geo.cpp + +DESTDIR = ../../lib + + diff --git a/src/blackcore/constants.h b/src/blackcore/constants.h index f26544b4f..b307e57f1 100644 --- a/src/blackcore/constants.h +++ b/src/blackcore/constants.h @@ -6,7 +6,7 @@ #ifndef CONSTANTS_H #define CONSTANTS_H -#include "math.h" +#include "mathematics.h" namespace BlackCore { diff --git a/src/blackcore/ecef.cpp b/src/blackcore/ecef.cpp index b36311e06..fc3123239 100644 --- a/src/blackcore/ecef.cpp +++ b/src/blackcore/ecef.cpp @@ -13,7 +13,7 @@ #include "blackcore/matrix_3d.h" #include "blackcore/ned.h" #include "blackcore/ecef.h" -#include "blackcore/math.h" +#include "blackcore/mathematics.h" #include "blackcore/constants.h" namespace BlackCore diff --git a/src/blackcore/ecef.h b/src/blackcore/ecef.h index d2b794851..2dfbc3710 100644 --- a/src/blackcore/ecef.h +++ b/src/blackcore/ecef.h @@ -34,7 +34,7 @@ public: CVectorGeo toGeodetic(); //! Assignment operator - void operator= (const CVector3D &rhs); + void operator= (const CVector3D &rhs); }; } // namespace BlackCore diff --git a/src/blackcore/fsd_client.cpp b/src/blackcore/fsd_client.cpp index 9558d5681..2d1153216 100644 --- a/src/blackcore/fsd_client.cpp +++ b/src/blackcore/fsd_client.cpp @@ -4,8 +4,8 @@ #include #include -#include -#include +#include "blackcore/fsd_client.h" +#include "blackcore/fsd_messages.h" namespace FSD { diff --git a/src/blackcore/interpolator.cpp b/src/blackcore/interpolator.cpp index 4f4a09040..b2ad7c42c 100644 --- a/src/blackcore/interpolator.cpp +++ b/src/blackcore/interpolator.cpp @@ -1,7 +1,7 @@ #include #include "blackcore/matrix_3d.h" #include "blackcore/vector_geo.h" -#include "blackcore/math.h" +#include "blackcore/mathematics.h" #include "blackcore/interpolator.h" #include "blackcore/constants.h" @@ -139,7 +139,7 @@ bool CInterpolator::stateNow(TPlaneState *state) double vNorth = state->velNED.North(); double fraction = vNorth / vEast; - double heading = atan2 (vNorth, vEast); + double heading = atan2 (vNorth, vEast); state->orientation.heading = heading * Constants::RadToDeg; diff --git a/src/blackcore/math.cpp b/src/blackcore/mathematics.cpp similarity index 91% rename from src/blackcore/math.cpp rename to src/blackcore/mathematics.cpp index c2b81dd94..7005e3a85 100644 --- a/src/blackcore/math.cpp +++ b/src/blackcore/mathematics.cpp @@ -5,7 +5,7 @@ #include // std::max -#include "blackcore/math.h" +#include "blackcore/mathematics.h" namespace BlackCore { @@ -30,4 +30,4 @@ double CMath::cubicRootReal(const double x) return x < 0 ? -result : result; } -} // namespace BlackCore \ No newline at end of file +} // namespace BlackCore diff --git a/src/blackcore/math.h b/src/blackcore/mathematics.h similarity index 100% rename from src/blackcore/math.h rename to src/blackcore/mathematics.h diff --git a/src/blackcore/multiplayer.h b/src/blackcore/multiplayer.h index 209ca0e9c..3aea55864 100644 --- a/src/blackcore/multiplayer.h +++ b/src/blackcore/multiplayer.h @@ -9,8 +9,8 @@ #include #include #include -#include -#include +#include "blackmisc/message_system.h" +#include "blackcore/fsd_messages.h" namespace BlackCore { diff --git a/src/blackcore/plane.cpp b/src/blackcore/plane.cpp index 7a16741b4..a082e2b90 100644 --- a/src/blackcore/plane.cpp +++ b/src/blackcore/plane.cpp @@ -1,6 +1,6 @@ -#include -#include -#include +#include "blackcore/interpolator.h" +#include "blackcore/simulator.h" +#include "blackmisc/debug.h" #include "blackcore/plane.h" namespace BlackCore { diff --git a/src/blackd/blackd.cpp b/src/blackd/blackd.cpp index a46f7f465..603c679bb 100644 --- a/src/blackd/blackd.cpp +++ b/src/blackd/blackd.cpp @@ -5,10 +5,10 @@ #include -#include -#include -#include -#include +#include "blackmisc/context.h" +#include "blackmisc/debug.h" +#include "blackmisc/message_factory.h" +#include "blackcore/fsd_client.h" #include "qt_displayer.h" diff --git a/src/blackd/blackd.h b/src/blackd/blackd.h index 608c495b9..1c09ecdc1 100644 --- a/src/blackd/blackd.h +++ b/src/blackd/blackd.h @@ -8,10 +8,10 @@ #include #include -#include -#include +#include "blackmisc/com_server.h" +#include "blackmisc/gui_messages.h" -#include +#include "blackmisc/message_system.h" namespace Ui { class BlackD; diff --git a/src/blackd/blackd.pro b/src/blackd/blackd.pro new file mode 100644 index 000000000..be3079e58 --- /dev/null +++ b/src/blackd/blackd.pro @@ -0,0 +1,47 @@ +QT += core gui xml svg network + +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + + +PRE_TARGETDEPS += ../../lib/blackmisc.lib \ + ../../lib/blackcore.lib + +TARGET = blackd +TEMPLATE = app + +DEPENDPATH += . .. + +INCLUDEPATH += .. + +SOURCES += main.cpp\ + blackd.cpp \ + qt_displayer.cpp \ + +HEADERS += blackd.h \ + qt_displayer.h \ + +FORMS += blackd.ui + +RESOURCES += \ + blackd.qrc + +win32-msvc* { + PRE_TARGETDEPS += ../../lib/blackmisc.lib \ + ../../lib/blackcore.lib + + LIBS += ../../lib/blackmisc.lib \ + ../../lib/blackcore.lib +} + +!win32-msvc* { + PRE_TARGETDEPS += ../../lib/libblackmisc.a \ + ../../lib/libblackcore.a + + LIBS += ../../lib/libblackmisc.a \ + ../../lib/libblackcore.a +} + +DESTDIR = ../../bin + + + diff --git a/src/blackd/main.cpp b/src/blackd/main.cpp index 935fe50bc..de013e050 100644 --- a/src/blackd/main.cpp +++ b/src/blackd/main.cpp @@ -3,7 +3,7 @@ //! License, v. 2.0. If a copy of the MPL was not distributed with this //! file, You can obtain one at http://mozilla.org/MPL/2.0/ -#include +#include "blackmisc/context.h" #include "blackd.h" #include diff --git a/src/blackd/qt_displayer.h b/src/blackd/qt_displayer.h index d1a8494ea..a3637edfc 100644 --- a/src/blackd/qt_displayer.h +++ b/src/blackd/qt_displayer.h @@ -6,7 +6,7 @@ #ifndef QT_DISPLAYER_H #define QT_DISPLAYER_H -#include +#include "blackmisc/display.h" // Qt includes #include diff --git a/src/blackmisc/blackmisc.pro b/src/blackmisc/blackmisc.pro new file mode 100644 index 000000000..5fa9106eb --- /dev/null +++ b/src/blackmisc/blackmisc.pro @@ -0,0 +1,64 @@ +QT += network + +TARGET = blackmisc +TEMPLATE = lib +CONFIG += staticlib + +INCLUDEPATH += .. + +DEPENDPATH += . .. + +#PRECOMPILED_HEADER = stdpch.h + +precompile_header:!isEmpty(PRECOMPILED_HEADER) { + DEFINES += USING_PCH + } + +DEFINES += LOG_IN_FILE + +HEADERS += \ + logmessage.h \ + log.h \ + display.h \ + debug.h \ + context.h \ + config.h \ + config_manager.h \ + serialize.h \ + com_client.h \ + com_server.h \ + com_client_buffer.h \ + message.h \ + com_handler.h \ + message_factory.h \ + message_handler.h \ + type_info.h \ + message_dispatcher.h \ + message_system.h \ + gui_messages.h + +SOURCES += \ + logmessage.cpp \ + log.cpp \ + display.cpp \ + debug.cpp \ + context.cpp \ + config.cpp \ + config_manager.cpp \ + serialize.cpp \ + com_client.cpp \ + com_server.cpp \ + com_client_buffer.cpp \ + message.cpp \ + com_handler.cpp \ + message_factory.cpp \ + message_handler.cpp \ + type_info.cpp \ + message_dispatcher.cpp \ + message_system.cpp + +DESTDIR = ../../lib + + + + diff --git a/src/blackmisc/config.cpp b/src/blackmisc/config.cpp index 646d8d13b..5c23f94dd 100644 --- a/src/blackmisc/config.cpp +++ b/src/blackmisc/config.cpp @@ -116,6 +116,7 @@ namespace BlackMisc { m_configfile = filename; m_separator = separator; + Q_UNUSED(isRelative); } bool CConfig::load() @@ -224,7 +225,7 @@ namespace BlackMisc void CConfig::update(const QString &key, const CValue &value) { - + m_value_map[key] = value; } void CConfig::display() diff --git a/src/blackmisc/debug.h b/src/blackmisc/debug.h index b21abc690..78e7041c7 100644 --- a/src/blackmisc/debug.h +++ b/src/blackmisc/debug.h @@ -37,7 +37,7 @@ namespace BlackMisc /// Do not call this, unless you know what you're trying to do (it kills debug)! void destroy() {} - void changeLogDirectory(const QString &dir) {} + void changeLogDirectory(const QString &dir) { Q_UNUSED(dir); } QString getLogDirectory(); diff --git a/src/blackmisc/gui_messages.h b/src/blackmisc/gui_messages.h index e1041e2d6..95c5aee4b 100644 --- a/src/blackmisc/gui_messages.h +++ b/src/blackmisc/gui_messages.h @@ -6,7 +6,7 @@ #ifndef GUI_MESSAGES_H #define GUI_MESSAGES_H -#include +#include "blackmisc/message.h" namespace BlackMisc { @@ -112,4 +112,4 @@ namespace BlackMisc }; } -#endif // GUI_MESSAGES_H \ No newline at end of file +#endif // GUI_MESSAGES_H diff --git a/src/blackmisc/log.cpp b/src/blackmisc/log.cpp index ce8e54354..4d94cce2f 100644 --- a/src/blackmisc/log.cpp +++ b/src/blackmisc/log.cpp @@ -3,6 +3,10 @@ //! License, v. 2.0. If a copy of the MPL was not distributed with this //! file, You can obtain one at http://mozilla.org/MPL/2.0/ +#ifndef UNICODE +#define UNICODE +#endif + #include #include #include @@ -48,9 +52,9 @@ namespace BlackMisc //! By default, we use the executables name. if ((*m_applicationName).isEmpty()) { - char name[1024]; + WCHAR name[1024]; int size = GetModuleFileName (NULL, name, 1023); - QString applicationPath = QString::fromUtf8(name,size); + QString applicationPath = QString::fromWCharArray(name,size); (*m_applicationName) = QFileInfo ( applicationPath ).fileName(); } #else diff --git a/src/driver/fs9/fs9.pro b/src/driver/fs9/fs9.pro new file mode 100644 index 000000000..8397ff782 --- /dev/null +++ b/src/driver/fs9/fs9.pro @@ -0,0 +1,19 @@ +TARGET = bb_driver_fs9 +TEMPLATE = lib +CONFIG += dll + +INCLUDEPATH += .. ../../ + +DESTDIR = ../../../bin + +DEPENDPATH += . + +HEADERS += \ + driver_fs9.h + +SOURCES += \ + driver_fs9.cpp + + + + diff --git a/src/driver/fsx/fsx.pro b/src/driver/fsx/fsx.pro new file mode 100644 index 000000000..2bcd027fb --- /dev/null +++ b/src/driver/fsx/fsx.pro @@ -0,0 +1,19 @@ +TARGET = bb_driver_fsx +TEMPLATE = lib +CONFIG += dll + +INCLUDEPATH += .. ../../ + +DESTDIR = ../../../bin + +DEPENDPATH += . + +HEADERS += \ + driver_fsx.h + +SOURCES += \ + driver_fsx.cpp + + + + diff --git a/src/driver/xplane/xplane.pro b/src/driver/xplane/xplane.pro new file mode 100644 index 000000000..3e59e5d0f --- /dev/null +++ b/src/driver/xplane/xplane.pro @@ -0,0 +1,19 @@ +TARGET = bb_driver_xplane +TEMPLATE = lib +CONFIG += dll + +INCLUDEPATH += .. ../../ + +DESTDIR = ../../../bin + +DEPENDPATH += . + +HEADERS += \ + driver_xplane.h + +SOURCES += \ + driver_xplane.cpp + + + +