From f8ef814ee3fd0ad4f224fdaf4c3451eed5b5463d Mon Sep 17 00:00:00 2001 From: leonarski_f Date: Sat, 4 Apr 2026 21:47:20 +0200 Subject: [PATCH] Minor enhancements to make the plugin nice (print more information, add library version, upload RHEL8 compiled version to the repository) --- .gitea/workflows/build_and_test.yml | 2 +- common/print_license.h | 2 +- xds-plugin/CMakeLists.txt | 1 + xds-plugin/plugin.cpp | 11 +++++++++-- xds-plugin/plugin.h | 2 +- 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/build_and_test.yml b/.gitea/workflows/build_and_test.yml index fb177cfd..d9401745 100644 --- a/.gitea/workflows/build_and_test.yml +++ b/.gitea/workflows/build_and_test.yml @@ -110,7 +110,7 @@ jobs: cd .. if [ "${{ matrix.distro }}" = "rocky8_nocuda" ]; then - for file in build/jfjoch-viewer*.rpm build/jfjoch-writer*rpm; do + for file in build/jfjoch-viewer*.rpm build/jfjoch-writer*rpm build/xds-plugin/libjfjoch_xds_plugin.so.*; do python3 gitea_upload_file.py "$file" done elif [ "${{ matrix.distro }}" = "rocky9_nocuda" ]; then diff --git a/common/print_license.h b/common/print_license.h index 600dc5ec..aad15597 100644 --- a/common/print_license.h +++ b/common/print_license.h @@ -7,7 +7,7 @@ #include inline void print_license(const std::string &component_name) { - std::cout << component_name << " Copyright (C) 2024 Paul Scherrer Institute" << std::endl; + std::cout << component_name << " Copyright (C) 2019-2026 Paul Scherrer Institute" << std::endl; std::cout << "This program comes with ABSOLUTELY NO WARRANTY" << std::endl; std::cout << "This is free software, and you are welcome to redistribute it" << std::endl; std::cout << "under certain conditions (GPLv3)" << std::endl; diff --git a/xds-plugin/CMakeLists.txt b/xds-plugin/CMakeLists.txt index d341881f..459367a4 100644 --- a/xds-plugin/CMakeLists.txt +++ b/xds-plugin/CMakeLists.txt @@ -11,6 +11,7 @@ set_target_properties(jfjoch_xds_plugin PROPERTIES CXX_VISIBILITY_PRESET hidden C_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN YES + VERSION 1.0.0 ) if(UNIX AND NOT APPLE) diff --git a/xds-plugin/plugin.cpp b/xds-plugin/plugin.cpp index f066374d..a5bb92e5 100644 --- a/xds-plugin/plugin.cpp +++ b/xds-plugin/plugin.cpp @@ -169,8 +169,15 @@ extern "C" { void plugin_open(const char *filename, int info[1024], int *error_flag) { std::unique_lock sl(plugin_mutex); - std::cout << "Jungfraujoch XDS plugin" << std::endl; - std::cout << "Version " << jfjoch_version() << std::endl; + std::cout << "********** Jungfraujoch XDS plugin **********" << std::endl; + std::cout << "Jungfraujoch version " << jfjoch_version() << std::endl; + std::cout << "Plugin version " << VERSION_MAJOR << "." << VERSION_MINOR << "." << VERSION_PATCH << std::endl << std::endl; + std::cout << "Copyright (C) 2024-2026 Paul Scherrer Institute" << std::endl; + std::cout << "This program comes with ABSOLUTELY NO WARRANTY" << std::endl; + std::cout << "This is free software, and you are welcome to redistribute it" << std::endl; + std::cout << "under certain conditions (GPLv3)" << std::endl << std::endl; + std::cout << "Based on durin plugin from Diamond Light Source Ltd. with modification from the Global Phasing Ltd." << std::endl; + std::cout << "(BSD-3 license)" << std::endl << std::endl; try { FillInfoArray(info); diff --git a/xds-plugin/plugin.h b/xds-plugin/plugin.h index 6cd2cc84..a03df64a 100644 --- a/xds-plugin/plugin.h +++ b/xds-plugin/plugin.h @@ -26,7 +26,7 @@ extern "C" { #endif -#define VERSION_MAJOR 0 +#define VERSION_MAJOR 1 #define VERSION_MINOR 0 #define VERSION_PATCH 0 #define VERSION_TIMESTAMP -1 /* good enough for Dectris apparantely */