diff --git a/.github/workflows/ubuntu.yaml b/.github/workflows/ubuntu.yaml index de7fad83f..9aeb04873 100644 --- a/.github/workflows/ubuntu.yaml +++ b/.github/workflows/ubuntu.yaml @@ -3,7 +3,6 @@ name: ubuntu on: [push, pull_request] jobs: - ubuntu-build: runs-on: ${{ matrix.ubuntu-distro }} strategy: diff --git a/COMPILE.md b/COMPILE.md index 2d6dca5eb..0ebfbbe5b 100644 --- a/COMPILE.md +++ b/COMPILE.md @@ -120,7 +120,7 @@ export LDFLAGS="$QT_HOME/lib" Clone the repository into **~/plotjuggler_ws**: ```shell -git clone https://github.com/facontidavide/PlotJuggler.git ~/plotjuggler_ws/src/PlotJuggler +git clone https://github.com/PX4/PlotJuggler.git ~/plotjuggler_ws/src/PlotJuggler cd ~/plotjuggler_ws ``` diff --git a/cmake/FindZeroMQ.cmake b/cmake/FindZeroMQ.cmake index f4acf7da5..b4a9da124 100644 --- a/cmake/FindZeroMQ.cmake +++ b/cmake/FindZeroMQ.cmake @@ -5,9 +5,13 @@ # ZeroMQ_LIBRARIES - The libraries needed to use ZeroMQ # ZeroMQ_DEFINITIONS - Compiler switches required for using ZeroMQ -find_package(PkgConfig REQUIRED) -pkg_check_modules(ZMQ REQUIRED libzmq) +find_path ( ZeroMQ_INCLUDE_DIR zmq.h ) +find_library ( ZeroMQ_LIBRARY NAMES zmq ) -set(ZeroMQ_FOUND TRUE) -set(ZeroMQ_INCLUDE_DIRS ${ZMQ_INCLUDE_DIRS}) -set(ZeroMQ_LIBRARIES ${ZMQ_LIBRARIES}) +set ( ZeroMQ_LIBRARIES ${ZeroMQ_LIBRARY} ) +set ( ZeroMQ_INCLUDE_DIRS ${ZeroMQ_INCLUDE_DIR} ) + +include ( FindPackageHandleStandardArgs ) +# handle the QUIETLY and REQUIRED arguments and set ZeroMQ_FOUND to TRUE +# if all listed variables are TRUE +find_package_handle_standard_args ( ZeroMQ DEFAULT_MSG ZeroMQ_LIBRARY ZeroMQ_INCLUDE_DIR ) diff --git a/installer/io.plotjuggler.application/meta/installscript.qs b/installer/io.plotjuggler.application/meta/installscript.qs index 4605ae660..4a1c1942b 100644 --- a/installer/io.plotjuggler.application/meta/installscript.qs +++ b/installer/io.plotjuggler.application/meta/installscript.qs @@ -101,4 +101,4 @@ Component.prototype.componentSelectionPageEntered = function() if (installer.fileExists(dir) && installer.fileExists(dir + "/maintenancetool.exe")) { installer.execute(dir + "/maintenancetool.exe", ["purge", "-c"]); } -} \ No newline at end of file +} diff --git a/installer/io.plotjuggler.application/meta/targetwidget.ui b/installer/io.plotjuggler.application/meta/targetwidget.ui index 623733204..04d7be70c 100644 --- a/installer/io.plotjuggler.application/meta/targetwidget.ui +++ b/installer/io.plotjuggler.application/meta/targetwidget.ui @@ -110,4 +110,4 @@ - \ No newline at end of file + diff --git a/plotjuggler_plugins/DataStreamZMQ/CMakeLists.txt b/plotjuggler_plugins/DataStreamZMQ/CMakeLists.txt index 37a48c941..0a2040d29 100644 --- a/plotjuggler_plugins/DataStreamZMQ/CMakeLists.txt +++ b/plotjuggler_plugins/DataStreamZMQ/CMakeLists.txt @@ -1,54 +1,33 @@ -# Check for vcpkg, conan, or manual build environments if(BUILDING_WITH_VCPKG) message(STATUS "Finding ZeroMQ with vcpkg") elseif(BUILDING_WITH_CONAN) message(STATUS "Finding ZeroMQ with conan") else() message(STATUS "Finding ZeroMQ without package managers") - - # Find ZeroMQ using PkgConfig - find_package(PkgConfig REQUIRED) - pkg_check_modules(ZMQ REQUIRED libzmq) - - # Set the ZeroMQ libraries and include directories for manual configuration - set(ZeroMQ_LIBRARIES ${ZMQ_LIBRARIES}) - set(ZeroMQ_INCLUDE_DIRS ${ZMQ_INCLUDE_DIRS}) - set(ZeroMQ_LIBRARY_DIRS /opt/homebrew/lib) # Add this line - - # Add the library path explicitly - link_directories(${ZeroMQ_LIBRARY_DIRS}) # Add this line + set(ZeroMQ_LIBS ${ZeroMQ_LIBRARIES}) endif() -# Find ZeroMQ library find_package(ZeroMQ QUIET) -# Check if ZeroMQ was found if(ZeroMQ_FOUND) - message(STATUS "[ZeroMQ] found") + # message(STATUS "[ZeroMQ] found") - # Add QT definitions if needed - add_definitions(${QT_DEFINITIONS}) - add_definitions(-DQT_PLUGIN) + # add_definitions(${QT_DEFINITIONS}) + # add_definitions(-DQT_PLUGIN) - # Wrap the UI file for Qt - QT5_WRAP_UI(UI_SRC datastream_zmq.ui) + # QT5_WRAP_UI ( UI_SRC datastream_zmq.ui ) - # Add the DataStreamZMQ library - add_library(DataStreamZMQ SHARED datastream_zmq.cpp ${UI_SRC}) + # add_library(DataStreamZMQ SHARED datastream_zmq.cpp ${UI_SRC} ) - # Link Qt5Widgets and the plotjuggler_base target to DataStreamZMQ - target_link_libraries(DataStreamZMQ ${Qt5Widgets_LIBRARIES} plotjuggler_base) + # target_link_libraries(DataStreamZMQ ${Qt5Widgets_LIBRARIES} plotjuggler_base) - # Handle different library linking for vcpkg, conan, or manual builds - if(BUILDING_WITH_VCPKG OR BUILDING_WITH_CONAN) - target_link_libraries(DataStreamZMQ libzmq-static) - else() - target_include_directories(DataStreamZMQ PRIVATE ${ZeroMQ_INCLUDE_DIRS}) - target_link_libraries(DataStreamZMQ zmq) # Changed this to just 'zmq' - endif() + # if(BUILDING_WITH_VCPKG OR BUILDING_WITH_CONAN) + # target_link_libraries(DataStreamZMQ libzmq-static) + # else() + # target_link_libraries(DataStreamZMQ ${ZeroMQ_LIBRARIES}) + # endif() - # Install the plugin - install(TARGETS DataStreamZMQ DESTINATION ${PJ_PLUGIN_INSTALL_DIRECTORY}) + # install(TARGETS DataStreamZMQ DESTINATION ${PJ_PLUGIN_INSTALL_DIRECTORY} ) else() - message(STATUS "[ZeroMQ] not found. Skipping plugin DataStreamZMQ.") + message("[ZeroMQ] not found. Skipping plugin DataStreamZMQ.") endif() diff --git a/plotjuggler_plugins/ParserProtobuf/error_collectors.cpp b/plotjuggler_plugins/ParserProtobuf/error_collectors.cpp index cc253393b..761e0b739 100644 --- a/plotjuggler_plugins/ParserProtobuf/error_collectors.cpp +++ b/plotjuggler_plugins/ParserProtobuf/error_collectors.cpp @@ -23,16 +23,6 @@ void FileErrorCollector::AddWarning(const std::string& filename, int line, int, qDebug() << msg; } -void FileErrorCollector::RecordError(absl::string_view filename, int line, int column, - absl::string_view message) -{ - QString errorMessage = QString("Error in file: %1 at line: %2, column: %3: %4") - .arg(QString::fromStdString(std::string(filename))) - .arg(line) - .arg(column) - .arg(QString::fromStdString(std::string(message))); - _errors << errorMessage; -} void IoErrorCollector::AddError(int line, google::protobuf::io::ColumnNumber, const std::string& message) { diff --git a/plotjuggler_plugins/ParserProtobuf/error_collectors.h b/plotjuggler_plugins/ParserProtobuf/error_collectors.h index bdd55ab12..4f1cf826c 100644 --- a/plotjuggler_plugins/ParserProtobuf/error_collectors.h +++ b/plotjuggler_plugins/ParserProtobuf/error_collectors.h @@ -3,6 +3,7 @@ #include #include + #include class IoErrorCollector : public google::protobuf::io::ErrorCollector @@ -26,29 +27,17 @@ class IoErrorCollector : public google::protobuf::io::ErrorCollector class FileErrorCollector : public google::protobuf::compiler::MultiFileErrorCollector { public: - void AddError(const std::string& filename, int line, int column, - const std::string& message); - - void AddWarning(const std::string& filename, int line, int column, - const std::string& message); + void AddError(const std::string& filename, int line, int, const std::string& message); - void RecordError(absl::string_view filename, int line, int column, - absl::string_view message) override; + void AddWarning(const std::string& filename, int line, int, const std::string& message); - const QStringList& errors() const + const QStringList& errors() { return _errors; } - // Accessor for the collected warnings - const QStringList& warnings() const - { - return _warnings; - } - private: QStringList _errors; - QStringList _warnings; }; #endif // ERROR_COLLECTORS_H