diff --git a/CMakeLists.txt b/CMakeLists.txt index 3265f9705..d483f9227 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,12 +41,13 @@ OPTION(WITH_BLACK_XPLANE "Build BlackBox as a X-Plane Plugin" OPTION(WITH_SIMULATOR_DRIVER "Build Simulator Drivers." ON) IF(WITH_SIMULATOR_DRIVER) + OPTION(WITH_STATIC_DRIVERS "Build static simulator drivers" OFF ) ############### Drivers ############### IF(WIN32) - OPTION(WITH_DRIVER_FSX "Build FSX Simulator Driver" ON ) + OPTION(WITH_DRIVER_FSX "Build FSX Simulator Driver" OFF ) OPTION(WITH_DRIVER_FS9 "Build FS2004 Simulator Driver" OFF ) ENDIF(WIN32) - OPTION(WITH_DRIVER_XPLANE "Build X-Plane Simulator Driver" ON ) + OPTION(WITH_DRIVER_XPLANE "Build X-Plane Simulator Driver" OFF ) ENDIF(WITH_SIMULATOR_DRIVER) # By default, force release configuration @@ -119,12 +120,12 @@ endIF() #### SimConnect #### IF(WITH_DRIVER_FSX) find_package(SimConnect REQUIRED) -ENDIF() +ENDIF(WITH_DRIVER_FSX) #### DirectPlay #### IF(WITH_DRIVER_FS9) find_package(DirectPlay REQUIRED) -ENDIF() +ENDIF(WITH_DRIVER_FS9) ############### Compilers flags ############### @@ -183,7 +184,7 @@ ENDIF() ############### Includes ############### INCLUDE_DIRECTORIES(${QT_INCLUDES}) -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/blacklib/include) +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/src) ############### Doxygen ############### @@ -201,7 +202,7 @@ ENDIF(DOXYGEN_FOUND) ############### build targets ############### -ADD_SUBDIRECTORY(blackd) -ADD_SUBDIRECTORY(blackbox) -ADD_SUBDIRECTORY(blacklib) -ADD_SUBDIRECTORY(blackx) \ No newline at end of file +ADD_SUBDIRECTORY(src) +IF(WITH_BLACK_SAMPLES) + ADD_SUBDIRECTORY(samples) +ENDIF(WITH_BLACK_SAMPLES) \ No newline at end of file diff --git a/blacklib/CMakeLists.txt b/blacklib/CMakeLists.txt deleted file mode 100644 index cd01d6d6e..000000000 --- a/blacklib/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -ADD_SUBDIRECTORY(include) -ADD_SUBDIRECTORY(src) -IF(WITH_BLACK_SAMPLES) - ADD_SUBDIRECTORY(samples) -ENDIF(WITH_BLACK_SAMPLES) diff --git a/blacklib/include/CMakeLists.txt b/blacklib/include/CMakeLists.txt deleted file mode 100644 index a1c1f3eb8..000000000 --- a/blacklib/include/CMakeLists.txt +++ /dev/null @@ -1,2 +0,0 @@ -ADD_SUBDIRECTORY(blackcore) -ADD_SUBDIRECTORY(blackmisc) \ No newline at end of file diff --git a/blacklib/include/blackmisc/CMakeLists.txt b/blacklib/include/blackmisc/CMakeLists.txt deleted file mode 100644 index 4f40f617e..000000000 --- a/blacklib/include/blackmisc/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -FILE(GLOB HEADERS *.h) \ No newline at end of file diff --git a/blacklib/src/CMakeLists.txt b/blacklib/src/CMakeLists.txt deleted file mode 100644 index 5ec4b1e89..000000000 --- a/blacklib/src/CMakeLists.txt +++ /dev/null @@ -1,2 +0,0 @@ -ADD_SUBDIRECTORY(blackmisc) -ADD_SUBDIRECTORY(blackcore) \ No newline at end of file diff --git a/blackx/CMakeLists.txt b/blackx/CMakeLists.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/cmake/modules/FindSimConnect.cmake b/cmake/modules/FindSimConnect.cmake index 9ed37b71a..18bb31176 100644 --- a/cmake/modules/FindSimConnect.cmake +++ b/cmake/modules/FindSimConnect.cmake @@ -18,7 +18,7 @@ FIND_PATH(SIMCONNECT_INCLUDE_DIR "$ENV{ProgramFiles(x86)}/Microsoft Games/Microsoft Flight Simulator X SDK/SDK/Core Utilities Kit/SimConnect SDK" PATH_SUFFIXES inc) -FIND_PATH(SIMCONNECT_LIBRARY +FIND_PATH(SIMCONNECT_LIBRARY_DIR NAMES SimConnect.lib PATHS "$ENV{ProgramFiles(x86)}/Microsoft Games/Microsoft Flight Simulator X SDK/SDK/Core Utilities Kit/SimConnect SDK" @@ -27,4 +27,4 @@ FIND_PATH(SIMCONNECT_LIBRARY # handle the QUIETLY and REQUIRED arguments and set SIMCONNECT_FOUND to TRUE # if all listed variables are TRUE find_package_handle_standard_args(SimConnect DEFAULT_MSG - SIMCONNECT_LIBRARY SIMCONNECT_INCLUDE_DIR) \ No newline at end of file + SIMCONNECT_LIBRARY_DIR SIMCONNECT_INCLUDE_DIR) \ No newline at end of file diff --git a/blacklib/samples/CMakeLists.txt b/samples/CMakeLists.txt similarity index 100% rename from blacklib/samples/CMakeLists.txt rename to samples/CMakeLists.txt diff --git a/blacklib/samples/Geodetic2Ecef/CMakeLists.txt b/samples/Geodetic2Ecef/CMakeLists.txt similarity index 100% rename from blacklib/samples/Geodetic2Ecef/CMakeLists.txt rename to samples/Geodetic2Ecef/CMakeLists.txt diff --git a/blacklib/samples/Geodetic2Ecef/main.cpp b/samples/Geodetic2Ecef/main.cpp similarity index 100% rename from blacklib/samples/Geodetic2Ecef/main.cpp rename to samples/Geodetic2Ecef/main.cpp diff --git a/blacklib/samples/Logging/CMakeLists.txt b/samples/Logging/CMakeLists.txt similarity index 100% rename from blacklib/samples/Logging/CMakeLists.txt rename to samples/Logging/CMakeLists.txt diff --git a/blacklib/samples/Logging/main.cpp b/samples/Logging/main.cpp similarity index 100% rename from blacklib/samples/Logging/main.cpp rename to samples/Logging/main.cpp diff --git a/blacklib/samples/com_client/CMakeLists.txt b/samples/com_client/CMakeLists.txt similarity index 100% rename from blacklib/samples/com_client/CMakeLists.txt rename to samples/com_client/CMakeLists.txt diff --git a/blacklib/samples/com_client/client.cpp b/samples/com_client/client.cpp similarity index 100% rename from blacklib/samples/com_client/client.cpp rename to samples/com_client/client.cpp diff --git a/blacklib/samples/com_client/client.h b/samples/com_client/client.h similarity index 100% rename from blacklib/samples/com_client/client.h rename to samples/com_client/client.h diff --git a/blacklib/samples/com_client/main.cpp b/samples/com_client/main.cpp similarity index 100% rename from blacklib/samples/com_client/main.cpp rename to samples/com_client/main.cpp diff --git a/blacklib/samples/com_server/CMakeLists.txt b/samples/com_server/CMakeLists.txt similarity index 100% rename from blacklib/samples/com_server/CMakeLists.txt rename to samples/com_server/CMakeLists.txt diff --git a/blacklib/samples/com_server/main.cpp b/samples/com_server/main.cpp similarity index 100% rename from blacklib/samples/com_server/main.cpp rename to samples/com_server/main.cpp diff --git a/blacklib/samples/com_server/server.cpp b/samples/com_server/server.cpp similarity index 100% rename from blacklib/samples/com_server/server.cpp rename to samples/com_server/server.cpp diff --git a/blacklib/samples/com_server/server.h b/samples/com_server/server.h similarity index 100% rename from blacklib/samples/com_server/server.h rename to samples/com_server/server.h diff --git a/blacklib/samples/config/CMakeLists.txt b/samples/config/CMakeLists.txt similarity index 100% rename from blacklib/samples/config/CMakeLists.txt rename to samples/config/CMakeLists.txt diff --git a/blacklib/samples/config/config/config.ini b/samples/config/config/config.ini similarity index 100% rename from blacklib/samples/config/config/config.ini rename to samples/config/config/config.ini diff --git a/blacklib/samples/config/config/position.cfg b/samples/config/config/position.cfg similarity index 100% rename from blacklib/samples/config/config/position.cfg rename to samples/config/config/position.cfg diff --git a/blacklib/samples/config/config/test.cfg b/samples/config/config/test.cfg similarity index 100% rename from blacklib/samples/config/config/test.cfg rename to samples/config/config/test.cfg diff --git a/blacklib/samples/config/main.cpp b/samples/config/main.cpp similarity index 100% rename from blacklib/samples/config/main.cpp rename to samples/config/main.cpp diff --git a/blacklib/samples/interpolator/CMakeLists.txt b/samples/interpolator/CMakeLists.txt similarity index 100% rename from blacklib/samples/interpolator/CMakeLists.txt rename to samples/interpolator/CMakeLists.txt diff --git a/blacklib/samples/interpolator/main.cpp b/samples/interpolator/main.cpp similarity index 100% rename from blacklib/samples/interpolator/main.cpp rename to samples/interpolator/main.cpp diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 000000000..3214959c3 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,6 @@ +ADD_SUBDIRECTORY(blackbox) +ADD_SUBDIRECTORY(blackcore) +ADD_SUBDIRECTORY(blackd) +ADD_SUBDIRECTORY(blackmisc) +ADD_SUBDIRECTORY(blackx) +ADD_SUBDIRECTORY(driver) \ No newline at end of file diff --git a/blackbox/CMakeLists.txt b/src/blackbox/CMakeLists.txt similarity index 96% rename from blackbox/CMakeLists.txt rename to src/blackbox/CMakeLists.txt index d13341960..03a3bee87 100644 --- a/blackbox/CMakeLists.txt +++ b/src/blackbox/CMakeLists.txt @@ -1,4 +1,5 @@ FILE(GLOB blackbox_SOURCES *.cpp) +FILE(GLOB blackbox_HEADERS *.h) SET(blackbox_HEADERS_QOBJECT blackbox.h dialog_connect.h diff --git a/blackbox/blackbox.cpp b/src/blackbox/blackbox.cpp similarity index 100% rename from blackbox/blackbox.cpp rename to src/blackbox/blackbox.cpp diff --git a/blackbox/blackbox.h b/src/blackbox/blackbox.h similarity index 100% rename from blackbox/blackbox.h rename to src/blackbox/blackbox.h diff --git a/blackbox/blackbox.ui b/src/blackbox/blackbox.ui similarity index 100% rename from blackbox/blackbox.ui rename to src/blackbox/blackbox.ui diff --git a/blackbox/dialog_chat.cpp b/src/blackbox/dialog_chat.cpp similarity index 100% rename from blackbox/dialog_chat.cpp rename to src/blackbox/dialog_chat.cpp diff --git a/blackbox/dialog_chat.h b/src/blackbox/dialog_chat.h similarity index 100% rename from blackbox/dialog_chat.h rename to src/blackbox/dialog_chat.h diff --git a/blackbox/dialog_chat.ui b/src/blackbox/dialog_chat.ui similarity index 100% rename from blackbox/dialog_chat.ui rename to src/blackbox/dialog_chat.ui diff --git a/blackbox/dialog_connect.cpp b/src/blackbox/dialog_connect.cpp similarity index 100% rename from blackbox/dialog_connect.cpp rename to src/blackbox/dialog_connect.cpp diff --git a/blackbox/dialog_connect.h b/src/blackbox/dialog_connect.h similarity index 100% rename from blackbox/dialog_connect.h rename to src/blackbox/dialog_connect.h diff --git a/blackbox/dialog_connect.ui b/src/blackbox/dialog_connect.ui similarity index 100% rename from blackbox/dialog_connect.ui rename to src/blackbox/dialog_connect.ui diff --git a/blackbox/main.cpp b/src/blackbox/main.cpp similarity index 100% rename from blackbox/main.cpp rename to src/blackbox/main.cpp diff --git a/blacklib/src/blackcore/CMakeLists.txt b/src/blackcore/CMakeLists.txt similarity index 85% rename from blacklib/src/blackcore/CMakeLists.txt rename to src/blackcore/CMakeLists.txt index 8e4d350ca..13c37653c 100644 --- a/blacklib/src/blackcore/CMakeLists.txt +++ b/src/blackcore/CMakeLists.txt @@ -1,7 +1,7 @@ FILE(GLOB blackcore_SOURCES *.cpp) -FILE(GLOB blackcore_HEADERS ../../include/blackcore/*.h) +FILE(GLOB blackcore_HEADERS *.h) SET(blackcore_HEADERS_QOBJECT - ../../include/blackcore/fsd_client.h) + fsd_client.h) QT4_WRAP_CPP(blackcore_HEADERS_MOC ${blackcore_HEADERS_QOBJECT}) diff --git a/blacklib/include/blackcore/constants.h b/src/blackcore/constants.h similarity index 100% rename from blacklib/include/blackcore/constants.h rename to src/blackcore/constants.h diff --git a/blacklib/src/blackcore/ecef.cpp b/src/blackcore/ecef.cpp similarity index 100% rename from blacklib/src/blackcore/ecef.cpp rename to src/blackcore/ecef.cpp diff --git a/blacklib/include/blackcore/ecef.h b/src/blackcore/ecef.h similarity index 100% rename from blacklib/include/blackcore/ecef.h rename to src/blackcore/ecef.h diff --git a/blacklib/src/blackcore/fsd_client.cpp b/src/blackcore/fsd_client.cpp similarity index 100% rename from blacklib/src/blackcore/fsd_client.cpp rename to src/blackcore/fsd_client.cpp diff --git a/blacklib/include/blackcore/fsd_client.h b/src/blackcore/fsd_client.h similarity index 100% rename from blacklib/include/blackcore/fsd_client.h rename to src/blackcore/fsd_client.h diff --git a/blacklib/src/blackcore/fsd_messages.cpp b/src/blackcore/fsd_messages.cpp similarity index 98% rename from blacklib/src/blackcore/fsd_messages.cpp rename to src/blackcore/fsd_messages.cpp index f4f374d84..6b4b59973 100644 --- a/blacklib/src/blackcore/fsd_messages.cpp +++ b/src/blackcore/fsd_messages.cpp @@ -83,7 +83,6 @@ namespace FSD QTextStream& FSD_MSG_Plane_Position::operator<< ( QTextStream& in) { QString message = in.readAll(); - m_message_tokens.resize(10); qint32 size = unpack(message, m_message_tokens); bAssert ( size == 10 ); diff --git a/blacklib/include/blackcore/fsd_messages.h b/src/blackcore/fsd_messages.h similarity index 96% rename from blacklib/include/blackcore/fsd_messages.h rename to src/blackcore/fsd_messages.h index 61200ccb0..8711b98fd 100644 --- a/blacklib/include/blackcore/fsd_messages.h +++ b/src/blackcore/fsd_messages.h @@ -117,6 +117,7 @@ namespace FSD FSD_MSG_Plane_Position() : FSD_MSG(QString("@")) { + m_message_tokens.resize(10); } inline QString SquawkMode() const { return m_message_tokens.at(0); } @@ -125,7 +126,7 @@ namespace FSD inline quint16 Rating() const { return m_message_tokens.at(3).toUInt(); } inline double Latitude() const { return m_message_tokens.at(4).toDouble(); } inline double Longitude() const { return m_message_tokens.at(5).toDouble(); } - inline qint32 Altitude() const { return m_message_tokens.at(6).toInt(); } + inline double Altitude() const { return m_message_tokens.at(6).toDouble(); } inline qint32 Speed() const { return m_message_tokens.at(7).toInt(); } inline quint32 PBH() const { return m_message_tokens.at(8).toUInt(); } inline qint32 AltDiff() const { return m_message_tokens.at(9).toInt(); } @@ -136,7 +137,7 @@ namespace FSD inline void setRating ( const quint16 rating) { m_message_tokens.replace(3, QString("%1").arg(rating)); } inline void setLatitude ( const double latitude) { m_message_tokens.replace(4, QString("%1").arg(latitude)); } inline void setLongitude ( const double longitude) { m_message_tokens.replace(5, QString("%1").arg(longitude)); } - inline void setAltitude ( const qint32 altitude) { m_message_tokens.replace(6, QString("%1").arg(altitude)); } + inline void setAltitude ( const double altitude) { m_message_tokens.replace(6, QString("%1").arg(altitude)); } inline void setSpeed ( const qint32 speed) { m_message_tokens.replace(7, QString("%1").arg(speed)); } inline void setPBH ( const quint32 pbh) { m_message_tokens.replace(8, QString("%1").arg(pbh)); } inline void setAltDiff ( const qint32 altdiff) { m_message_tokens.replace(9, QString("%1").arg(altdiff)); } diff --git a/blacklib/include/blackcore/fsd_protocol.h b/src/blackcore/fsd_protocol.h similarity index 100% rename from blacklib/include/blackcore/fsd_protocol.h rename to src/blackcore/fsd_protocol.h diff --git a/blacklib/src/blackcore/interpolator.cpp b/src/blackcore/interpolator.cpp similarity index 98% rename from blacklib/src/blackcore/interpolator.cpp rename to src/blackcore/interpolator.cpp index 76e47b5c8..4f4a09040 100644 --- a/blacklib/src/blackcore/interpolator.cpp +++ b/src/blackcore/interpolator.cpp @@ -14,6 +14,12 @@ CInterpolator::CInterpolator() m_time.start(); } +CInterpolator::~CInterpolator() +{ + delete m_state_begin; + delete m_state_end; +} + void CInterpolator::initialize() { diff --git a/blacklib/include/blackcore/interpolator.h b/src/blackcore/interpolator.h similarity index 98% rename from blacklib/include/blackcore/interpolator.h rename to src/blackcore/interpolator.h index 5fcda1014..b19e41b9f 100644 --- a/blacklib/include/blackcore/interpolator.h +++ b/src/blackcore/interpolator.h @@ -45,6 +45,7 @@ class CInterpolator { public: CInterpolator(); + virtual ~CInterpolator(); void initialize(); diff --git a/blacklib/src/blackcore/math.cpp b/src/blackcore/math.cpp similarity index 100% rename from blacklib/src/blackcore/math.cpp rename to src/blackcore/math.cpp diff --git a/blacklib/include/blackcore/math.h b/src/blackcore/math.h similarity index 100% rename from blacklib/include/blackcore/math.h rename to src/blackcore/math.h diff --git a/blacklib/src/blackcore/matrix_3d.cpp b/src/blackcore/matrix_3d.cpp similarity index 100% rename from blacklib/src/blackcore/matrix_3d.cpp rename to src/blackcore/matrix_3d.cpp diff --git a/blacklib/include/blackcore/matrix_3d.h b/src/blackcore/matrix_3d.h similarity index 100% rename from blacklib/include/blackcore/matrix_3d.h rename to src/blackcore/matrix_3d.h diff --git a/blacklib/src/blackcore/multiplayer.cpp b/src/blackcore/multiplayer.cpp similarity index 100% rename from blacklib/src/blackcore/multiplayer.cpp rename to src/blackcore/multiplayer.cpp diff --git a/blacklib/include/blackcore/multiplayer.h b/src/blackcore/multiplayer.h similarity index 100% rename from blacklib/include/blackcore/multiplayer.h rename to src/blackcore/multiplayer.h diff --git a/blacklib/src/blackcore/ned.cpp b/src/blackcore/ned.cpp similarity index 100% rename from blacklib/src/blackcore/ned.cpp rename to src/blackcore/ned.cpp diff --git a/blacklib/include/blackcore/ned.h b/src/blackcore/ned.h similarity index 100% rename from blacklib/include/blackcore/ned.h rename to src/blackcore/ned.h diff --git a/blacklib/src/blackcore/plane.cpp b/src/blackcore/plane.cpp similarity index 100% rename from blacklib/src/blackcore/plane.cpp rename to src/blackcore/plane.cpp diff --git a/blacklib/include/blackcore/plane.h b/src/blackcore/plane.h similarity index 100% rename from blacklib/include/blackcore/plane.h rename to src/blackcore/plane.h diff --git a/blacklib/include/blackcore/sim_callbacks.h b/src/blackcore/sim_callbacks.h similarity index 100% rename from blacklib/include/blackcore/sim_callbacks.h rename to src/blackcore/sim_callbacks.h diff --git a/blacklib/src/blackcore/simulator.cpp b/src/blackcore/simulator.cpp similarity index 100% rename from blacklib/src/blackcore/simulator.cpp rename to src/blackcore/simulator.cpp diff --git a/blacklib/include/blackcore/simulator.h b/src/blackcore/simulator.h similarity index 100% rename from blacklib/include/blackcore/simulator.h rename to src/blackcore/simulator.h diff --git a/blacklib/src/blackcore/vector_3d.cpp b/src/blackcore/vector_3d.cpp similarity index 100% rename from blacklib/src/blackcore/vector_3d.cpp rename to src/blackcore/vector_3d.cpp diff --git a/blacklib/include/blackcore/vector_3d.h b/src/blackcore/vector_3d.h similarity index 100% rename from blacklib/include/blackcore/vector_3d.h rename to src/blackcore/vector_3d.h diff --git a/blacklib/src/blackcore/vector_geo.cpp b/src/blackcore/vector_geo.cpp similarity index 100% rename from blacklib/src/blackcore/vector_geo.cpp rename to src/blackcore/vector_geo.cpp diff --git a/blacklib/include/blackcore/vector_geo.h b/src/blackcore/vector_geo.h similarity index 100% rename from blacklib/include/blackcore/vector_geo.h rename to src/blackcore/vector_geo.h diff --git a/blackd/CMakeLists.txt b/src/blackd/CMakeLists.txt similarity index 85% rename from blackd/CMakeLists.txt rename to src/blackd/CMakeLists.txt index 987190d3f..53762e858 100644 --- a/blackd/CMakeLists.txt +++ b/src/blackd/CMakeLists.txt @@ -1,4 +1,5 @@ -FILE(GLOB blackmisc_SOURCES *.cpp) +FILE(GLOB blackd_SOURCES *.cpp) +FILE(GLOB blackd_HEADERS *.h) SET(blackd_HEADERS_QOBJECT blackd.h) @@ -15,7 +16,7 @@ SOURCE_GROUP(QtGeneratedMocSrc FILES ${blackd_HEADERS_MOC}) SOURCE_GROUP (QtResources FILES ${blackd_RESOURCES_RCC}) SOURCE_GROUP (QtForms FILES ${blackd_FORMS_HEADERS}) -ADD_EXECUTABLE(blackd WIN32 MACOSX_BUNDLE ${blackmisc_SOURCES} +ADD_EXECUTABLE(blackd WIN32 MACOSX_BUNDLE ${blackd_SOURCES} ${blackd_HEADERS_MOC} ${blackd_FORMS_HEADERS} ${blackd_RESOURCES_RCC}) diff --git a/blackd/blackd.cpp b/src/blackd/blackd.cpp similarity index 100% rename from blackd/blackd.cpp rename to src/blackd/blackd.cpp diff --git a/blackd/blackd.h b/src/blackd/blackd.h similarity index 100% rename from blackd/blackd.h rename to src/blackd/blackd.h diff --git a/blackd/blackd.qrc b/src/blackd/blackd.qrc similarity index 100% rename from blackd/blackd.qrc rename to src/blackd/blackd.qrc diff --git a/blackd/blackd.ui b/src/blackd/blackd.ui similarity index 100% rename from blackd/blackd.ui rename to src/blackd/blackd.ui diff --git a/blackd/images/blackbox.svg b/src/blackd/images/blackbox.svg similarity index 100% rename from blackd/images/blackbox.svg rename to src/blackd/images/blackbox.svg diff --git a/blackd/images/blackbox_icon.svg b/src/blackd/images/blackbox_icon.svg similarity index 100% rename from blackd/images/blackbox_icon.svg rename to src/blackd/images/blackbox_icon.svg diff --git a/blackd/main.cpp b/src/blackd/main.cpp similarity index 100% rename from blackd/main.cpp rename to src/blackd/main.cpp diff --git a/blackd/qt_displayer.cpp b/src/blackd/qt_displayer.cpp similarity index 98% rename from blackd/qt_displayer.cpp rename to src/blackd/qt_displayer.cpp index 31fdcc9ba..fb0e02890 100644 --- a/blackd/qt_displayer.cpp +++ b/src/blackd/qt_displayer.cpp @@ -30,6 +30,9 @@ void CQtDisplayer::setParam (QPlainTextEdit *debugWindow) void CQtDisplayer::doPrint ( const BlackMisc::CLog::SLogInformation &logInformation, const QString &message) { + if (!m_DebugWindow) + return; + bool needSpace = false; QString line; diff --git a/blackd/qt_displayer.h b/src/blackd/qt_displayer.h similarity index 100% rename from blackd/qt_displayer.h rename to src/blackd/qt_displayer.h diff --git a/blacklib/src/blackmisc/CMakeLists.txt b/src/blackmisc/CMakeLists.txt similarity index 72% rename from blacklib/src/blackmisc/CMakeLists.txt rename to src/blackmisc/CMakeLists.txt index 940a651e2..b7e428cbe 100644 --- a/blacklib/src/blackmisc/CMakeLists.txt +++ b/src/blackmisc/CMakeLists.txt @@ -1,10 +1,10 @@ FILE(GLOB blackmisc_SOURCES *.cpp) -FILE(GLOB blackmisc_HEADERS ../../include/blackmisc/*.h) +FILE(GLOB blackmisc_HEADERS *.h) SET(blackmisc_HEADERS_QOBJECT - ../../include/blackmisc/com_client.h - ../../include/blackmisc/com_client_buffer.h - ../../include/blackmisc/com_handler.h - ../../include/blackmisc/com_server.h) + com_client.h + com_client_buffer.h + com_handler.h + com_server.h) QT4_WRAP_CPP(blackmisc_HEADERS_MOC ${blackmisc_HEADERS_QOBJECT}) diff --git a/blacklib/src/blackmisc/com_client.cpp b/src/blackmisc/com_client.cpp similarity index 100% rename from blacklib/src/blackmisc/com_client.cpp rename to src/blackmisc/com_client.cpp diff --git a/blacklib/include/blackmisc/com_client.h b/src/blackmisc/com_client.h similarity index 100% rename from blacklib/include/blackmisc/com_client.h rename to src/blackmisc/com_client.h diff --git a/blacklib/src/blackmisc/com_client_buffer.cpp b/src/blackmisc/com_client_buffer.cpp similarity index 100% rename from blacklib/src/blackmisc/com_client_buffer.cpp rename to src/blackmisc/com_client_buffer.cpp diff --git a/blacklib/include/blackmisc/com_client_buffer.h b/src/blackmisc/com_client_buffer.h similarity index 100% rename from blacklib/include/blackmisc/com_client_buffer.h rename to src/blackmisc/com_client_buffer.h diff --git a/blacklib/src/blackmisc/com_handler.cpp b/src/blackmisc/com_handler.cpp similarity index 100% rename from blacklib/src/blackmisc/com_handler.cpp rename to src/blackmisc/com_handler.cpp diff --git a/blacklib/include/blackmisc/com_handler.h b/src/blackmisc/com_handler.h similarity index 100% rename from blacklib/include/blackmisc/com_handler.h rename to src/blackmisc/com_handler.h diff --git a/blacklib/src/blackmisc/com_server.cpp b/src/blackmisc/com_server.cpp similarity index 100% rename from blacklib/src/blackmisc/com_server.cpp rename to src/blackmisc/com_server.cpp diff --git a/blacklib/include/blackmisc/com_server.h b/src/blackmisc/com_server.h similarity index 100% rename from blacklib/include/blackmisc/com_server.h rename to src/blackmisc/com_server.h diff --git a/blacklib/src/blackmisc/config.cpp b/src/blackmisc/config.cpp similarity index 100% rename from blacklib/src/blackmisc/config.cpp rename to src/blackmisc/config.cpp diff --git a/blacklib/include/blackmisc/config.h b/src/blackmisc/config.h similarity index 100% rename from blacklib/include/blackmisc/config.h rename to src/blackmisc/config.h diff --git a/blacklib/src/blackmisc/config_manager.cpp b/src/blackmisc/config_manager.cpp similarity index 100% rename from blacklib/src/blackmisc/config_manager.cpp rename to src/blackmisc/config_manager.cpp diff --git a/blacklib/include/blackmisc/config_manager.h b/src/blackmisc/config_manager.h similarity index 100% rename from blacklib/include/blackmisc/config_manager.h rename to src/blackmisc/config_manager.h diff --git a/blacklib/src/blackmisc/context.cpp b/src/blackmisc/context.cpp similarity index 100% rename from blacklib/src/blackmisc/context.cpp rename to src/blackmisc/context.cpp diff --git a/blacklib/include/blackmisc/context.h b/src/blackmisc/context.h similarity index 100% rename from blacklib/include/blackmisc/context.h rename to src/blackmisc/context.h diff --git a/blacklib/src/blackmisc/debug.cpp b/src/blackmisc/debug.cpp similarity index 99% rename from blacklib/src/blackmisc/debug.cpp rename to src/blackmisc/debug.cpp index 0dc869659..c07b4f66a 100644 --- a/blacklib/src/blackmisc/debug.cpp +++ b/src/blackmisc/debug.cpp @@ -80,10 +80,10 @@ namespace BlackMisc QMessageBox::critical(0, "ASSERT FAILED", QString("%1 %2 %3 () - failed assert: %4"). arg(QString(file)).arg(line).arg(QString(function)).arg(QString(exp))); - + #endif + qApp->quit(); exit(1); - #endif } diff --git a/blacklib/include/blackmisc/debug.h b/src/blackmisc/debug.h similarity index 100% rename from blacklib/include/blackmisc/debug.h rename to src/blackmisc/debug.h diff --git a/blacklib/src/blackmisc/display.cpp b/src/blackmisc/display.cpp similarity index 100% rename from blacklib/src/blackmisc/display.cpp rename to src/blackmisc/display.cpp diff --git a/blacklib/include/blackmisc/display.h b/src/blackmisc/display.h similarity index 100% rename from blacklib/include/blackmisc/display.h rename to src/blackmisc/display.h diff --git a/blacklib/include/blackmisc/gui_messages.h b/src/blackmisc/gui_messages.h similarity index 100% rename from blacklib/include/blackmisc/gui_messages.h rename to src/blackmisc/gui_messages.h diff --git a/blacklib/src/blackmisc/log.cpp b/src/blackmisc/log.cpp similarity index 100% rename from blacklib/src/blackmisc/log.cpp rename to src/blackmisc/log.cpp diff --git a/blacklib/include/blackmisc/log.h b/src/blackmisc/log.h similarity index 100% rename from blacklib/include/blackmisc/log.h rename to src/blackmisc/log.h diff --git a/blacklib/src/blackmisc/logmessage.cpp b/src/blackmisc/logmessage.cpp similarity index 100% rename from blacklib/src/blackmisc/logmessage.cpp rename to src/blackmisc/logmessage.cpp diff --git a/blacklib/include/blackmisc/logmessage.h b/src/blackmisc/logmessage.h similarity index 100% rename from blacklib/include/blackmisc/logmessage.h rename to src/blackmisc/logmessage.h diff --git a/blacklib/src/blackmisc/message.cpp b/src/blackmisc/message.cpp similarity index 100% rename from blacklib/src/blackmisc/message.cpp rename to src/blackmisc/message.cpp diff --git a/blacklib/include/blackmisc/message.h b/src/blackmisc/message.h similarity index 100% rename from blacklib/include/blackmisc/message.h rename to src/blackmisc/message.h diff --git a/blacklib/src/blackmisc/message_dispatcher.cpp b/src/blackmisc/message_dispatcher.cpp similarity index 100% rename from blacklib/src/blackmisc/message_dispatcher.cpp rename to src/blackmisc/message_dispatcher.cpp diff --git a/blacklib/include/blackmisc/message_dispatcher.h b/src/blackmisc/message_dispatcher.h similarity index 100% rename from blacklib/include/blackmisc/message_dispatcher.h rename to src/blackmisc/message_dispatcher.h diff --git a/blacklib/src/blackmisc/message_factory.cpp b/src/blackmisc/message_factory.cpp similarity index 100% rename from blacklib/src/blackmisc/message_factory.cpp rename to src/blackmisc/message_factory.cpp diff --git a/blacklib/include/blackmisc/message_factory.h b/src/blackmisc/message_factory.h similarity index 100% rename from blacklib/include/blackmisc/message_factory.h rename to src/blackmisc/message_factory.h diff --git a/blacklib/src/blackmisc/message_handler.cpp b/src/blackmisc/message_handler.cpp similarity index 100% rename from blacklib/src/blackmisc/message_handler.cpp rename to src/blackmisc/message_handler.cpp diff --git a/blacklib/include/blackmisc/message_handler.h b/src/blackmisc/message_handler.h similarity index 100% rename from blacklib/include/blackmisc/message_handler.h rename to src/blackmisc/message_handler.h diff --git a/blacklib/src/blackmisc/message_system.cpp b/src/blackmisc/message_system.cpp similarity index 100% rename from blacklib/src/blackmisc/message_system.cpp rename to src/blackmisc/message_system.cpp diff --git a/blacklib/include/blackmisc/message_system.h b/src/blackmisc/message_system.h similarity index 100% rename from blacklib/include/blackmisc/message_system.h rename to src/blackmisc/message_system.h diff --git a/blacklib/src/blackmisc/serialize.cpp b/src/blackmisc/serialize.cpp similarity index 100% rename from blacklib/src/blackmisc/serialize.cpp rename to src/blackmisc/serialize.cpp diff --git a/blacklib/include/blackmisc/serialize.h b/src/blackmisc/serialize.h similarity index 100% rename from blacklib/include/blackmisc/serialize.h rename to src/blackmisc/serialize.h diff --git a/blacklib/src/blackmisc/type_info.cpp b/src/blackmisc/type_info.cpp similarity index 100% rename from blacklib/src/blackmisc/type_info.cpp rename to src/blackmisc/type_info.cpp diff --git a/blacklib/include/blackmisc/type_info.h b/src/blackmisc/type_info.h similarity index 96% rename from blacklib/include/blackmisc/type_info.h rename to src/blackmisc/type_info.h index decc28877..7061bd9c7 100644 --- a/blacklib/include/blackmisc/type_info.h +++ b/src/blackmisc/type_info.h @@ -6,7 +6,7 @@ #ifndef TYPE_INFO_H #define TYPE_INFO_H -#include +#include namespace BlackMisc { diff --git a/blacklib/include/blackcore/CMakeLists.txt b/src/blackx/CMakeLists.txt similarity index 100% rename from blacklib/include/blackcore/CMakeLists.txt rename to src/blackx/CMakeLists.txt diff --git a/src/driver/CMakeLists.txt b/src/driver/CMakeLists.txt new file mode 100644 index 000000000..397430dc9 --- /dev/null +++ b/src/driver/CMakeLists.txt @@ -0,0 +1,3 @@ +IF(WITH_DRIVER_FSX) + ADD_SUBDIRECTORY(fsx) +ENDIF(WITH_DRIVER_FSX) diff --git a/blacklib/src/driver/fs9/driver_fs9.cpp b/src/driver/fs9/driver_fs9.cpp similarity index 100% rename from blacklib/src/driver/fs9/driver_fs9.cpp rename to src/driver/fs9/driver_fs9.cpp diff --git a/blacklib/src/driver/fs9/driver_fs9.h b/src/driver/fs9/driver_fs9.h similarity index 100% rename from blacklib/src/driver/fs9/driver_fs9.h rename to src/driver/fs9/driver_fs9.h diff --git a/src/driver/fsx/CMakeLists.txt b/src/driver/fsx/CMakeLists.txt new file mode 100644 index 000000000..bb9a16c8d --- /dev/null +++ b/src/driver/fsx/CMakeLists.txt @@ -0,0 +1,20 @@ +FILE(GLOB driver_fsx_SOURCES *.cpp) +FILE(GLOB driver_fsx_HEADERS *.h) +SET(driver_fsx_HEADERS_QOBJECT ) + +QT4_WRAP_CPP(driver_fsx_HEADERS_MOC ${driver_fsx_HEADERS_QOBJECT}) + +SOURCE_GROUP(QtGeneratedMocSrc FILES ${driver_fsx_HEADERS_MOC}) +SOURCE_GROUP (Headers FILES ${driver_fsx_HEADERS}) + +INCLUDE_DIRECTORIES(${SIMCONNECT_INCLUDE_DIR}) +LINK_DIRECTORIES(${SIMCONNECT_LIBRARY_DIR}) + +IF(WITH_STATIC_DRIVERS) + ADD_LIBRARY(bb_driver_fsx STATIC ${driver_fsx_SOURCES} ${driver_fsx_HEADERS_MOC} ) +ELSE(WITH_STATIC_DRIVERS) + ADD_LIBRARY(bb_driver_fsx SHARED ${driver_fsx_SOURCES} ${driver_fsx_HEADERS_MOC} ) +ENDIF(WITH_STATIC_DRIVERS) + +TARGET_LINK_LIBRARIES(bb_driver_fsx blackmisc blackcore SimConnect.lib ${QT_LIBRARIES}) +SET_TARGET_PROPERTIES(bb_driver_fsx PROPERTIES PROJECT_LABEL "Driver - FSX") \ No newline at end of file diff --git a/blacklib/src/driver/fsx/driver_fsx.cpp b/src/driver/fsx/driver_fsx.cpp similarity index 100% rename from blacklib/src/driver/fsx/driver_fsx.cpp rename to src/driver/fsx/driver_fsx.cpp diff --git a/blacklib/src/driver/fsx/driver_fsx.h b/src/driver/fsx/driver_fsx.h similarity index 89% rename from blacklib/src/driver/fsx/driver_fsx.h rename to src/driver/fsx/driver_fsx.h index 810c972cd..e2eda0ace 100644 --- a/blacklib/src/driver/fsx/driver_fsx.h +++ b/src/driver/fsx/driver_fsx.h @@ -16,14 +16,14 @@ #define DRIVER_FSX_H #include -#include +#include -class CDriverFSX : public ISimulator +class CDriverFSX : public BlackCore::ISimulator { public: CDriverFSX(); - virtual void setLibraryContext(BlackLib::IContext *context); + virtual void setLibraryContext(BlackMisc::IContext *context); virtual int init() { return 0; } diff --git a/blacklib/src/driver/xplane/driver_xplane.cpp b/src/driver/xplane/driver_xplane.cpp similarity index 100% rename from blacklib/src/driver/xplane/driver_xplane.cpp rename to src/driver/xplane/driver_xplane.cpp diff --git a/blacklib/src/driver/xplane/driver_xplane.h b/src/driver/xplane/driver_xplane.h similarity index 100% rename from blacklib/src/driver/xplane/driver_xplane.h rename to src/driver/xplane/driver_xplane.h