Build Packages / build:windows:nocuda (push) Successful in 20m4s
Build Packages / Unit tests (push) Skipped
Build Packages / build:viewer-tgz:cpu (push) Successful in 16m5s
Build Packages / build:viewer-tgz:cuda (push) Successful in 17m26s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 27m46s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 20m17s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 26m13s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 23m17s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 28m11s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 19m30s
Build Packages / build:rpm (rocky8) (push) Successful in 24m34s
Build Packages / build:rpm (rocky9) (push) Successful in 21m30s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 23m33s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 20m18s
Build Packages / DIALS test (push) Successful in 18m23s
Build Packages / XDS test (durin plugin) (push) Successful in 11m30s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 10m16s
Build Packages / XDS test (neggia plugin) (push) Successful in 8m2s
Build Packages / Generate python client (push) Successful in 49s
Build Packages / Build documentation (push) Successful in 1m21s
Build Packages / Create release (push) Skipped
Build Packages / build:windows:cuda (push) Successful in 29m45s
This is an UNSTABLE release. It includes many experimental features, as well as many AI generated fixes. We recommend using rc.152 for production use. * **rugnux: significantly better quality of results, and faster.** A large rework of integration, scaling, merging, geometry refinement and space-group determination, together with measurements the program previously made no attempt at - the direct beam before indexing, the beam stop, the goniometer rotation scale, and the stretches of a sweep the crystal did not deliver. A rotation dataset typically gains observations at better <I/sigma> and R_meas, and every `mx` and `scale` run writes a `<prefix>_report.txt` results report modelled on XDS's `CORRECT.LP`. Many defaults moved with it: spot detection is self-calibrating, beam-stop detection and rotation geometry post-refinement are on, resolution limits default to as far as the detector reaches, and ice-ring handling engages only where the crystal is measured to have ice. * **jfjoch_viewer:** the beam-stop shadow, the detector calibration and the beam-centre measurement are reachable from "Analyze dataset"; the settings panel reports how the sample moved and how polarized the beam was; image rendering and interaction are faster. * **Performance:** bitshuffle+LZ4 images are decoded on the GPU rather than on the host, with the bitshuffle inverse fused into preprocessing so the decompressed frame is never held in device memory. * **Broker, writer, packaging and build:** image-slot lifetime and locking fixes, per-image datasets sized by the images actually written, the Debian/Ubuntu broker package renamed to `jfjoch`, and `image_analysis` compiling under MSVC again. **Breaking change to the rugnux command line:** * `--azint-only` and `--scale` are **removed**, replaced by `--mode azint` and `--mode scale`; the full pipeline is `--mode mx` and remains the default. A script passing the old flags now fails with the list of valid modes rather than silently running the wrong one. * `-t`/`--stride` is **refused on rotation data**: skipping frames cuts every reflection's rocking curve, so the combined fulls and their partiality would be measured over frames the sweep never recorded. Select a contiguous range with `-s`/`-e` instead. `--mode azint` and `--force-still` still take a stride. **Breaking changes to OpenAPI** - regenerate the client (`jfjoch-client` 1.0.0-rc.161, `frontend/src/client`) or read the affected fields as optional: * `image_scale_b` is removed from the `plot_type` enum, so a client requesting that plot now gets an error rather than a curve. * `azim_int_settings.high_q_recipA`, `spot_finding_settings.high_resolution_limit` and `spot_finding_settings.low_resolution_limit` are no longer `required`. All three mean "no limit at that end" when unset and are omitted from the response instead of carrying a placeholder value, which raises in a client generated from an rc.160-or-earlier spec. A value of 0 is still accepted and means the same thing. **Breaking changes to the stored formats** - a consumer reading these fields must treat them as optional: * The per-image image-scale B factor is no longer computed, so `/entry/MX/imageScaleBFactor` is absent from newly written HDF5 files and the corresponding key is absent from the CBOR DataMessage and END blocks. Files written by rc.160 and earlier still contain it and still open; nothing in the pipeline reads it any more. * `_reflns.jfjoch_diffrn_ISa` now carries the whole-range `1/sqrt(a*b)` that XDS's ISa denotes, and the error-model `a` and `b` are reported in XDS's convention; the strong-reflection asymptote moves to `_reflns.jfjoch_diffrn_ISa_asymptotic`. **A file written by an earlier version carries the asymptote under the plain `ISa` name.** Reviewed-on: #71 Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch>
224 lines
10 KiB
CMake
224 lines
10 KiB
CMake
# SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
|
|
# SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
SET(CMAKE_AUTOMOC ON)
|
|
SET(CMAKE_AUTOUIC ON)
|
|
|
|
# D-Bus (single-instance / remote control) is Linux-only: Qt6::DBus does not
|
|
# exist on Windows or macOS. Default ON on Linux, OFF elsewhere.
|
|
IF(UNIX AND NOT APPLE)
|
|
OPTION(JFJOCH_VIEWER_DBUS "Build viewer with D-Bus support (Linux only)" ON)
|
|
ELSE()
|
|
OPTION(JFJOCH_VIEWER_DBUS "Build viewer with D-Bus support (Linux only)" OFF)
|
|
ENDIF()
|
|
|
|
SET(JFJOCH_VIEWER_QT_COMPONENTS Core Gui Widgets Charts Concurrent OpenGL OpenGLWidgets)
|
|
IF(JFJOCH_VIEWER_DBUS)
|
|
LIST(APPEND JFJOCH_VIEWER_QT_COMPONENTS DBus)
|
|
ENDIF()
|
|
FIND_PACKAGE(Qt6 COMPONENTS ${JFJOCH_VIEWER_QT_COMPONENTS} REQUIRED)
|
|
|
|
QT_ADD_RESOURCES(APP_RESOURCES resources/resources.qrc)
|
|
|
|
ADD_EXECUTABLE(jfjoch_viewer jfjoch_viewer.cpp JFJochViewerWindow.cpp JFJochViewerWindow.h
|
|
JFJochViewerMenu.cpp
|
|
JFJochViewerMenu.h
|
|
image_viewer/JFJochDiffractionImage.cpp
|
|
image_viewer/JFJochDiffractionImage.h
|
|
image_viewer/JFJochSimpleImage.cpp
|
|
image_viewer/JFJochSimpleImage.h
|
|
JFJochImageReadingWorker.cpp
|
|
JFJochImageReadingWorker.h
|
|
JFJochHttpReader.cpp
|
|
JFJochHttpReader.h
|
|
RunData.h
|
|
JFJochProcessController.cpp
|
|
JFJochProcessController.h
|
|
JFJochViewerDatasetInfo.cpp
|
|
JFJochViewerDatasetInfo.h
|
|
JFJochViewerSidePanel.cpp
|
|
JFJochViewerSidePanel.h
|
|
widgets/TitleLabel.cpp
|
|
widgets/TitleLabel.h
|
|
charts/JFJochDatasetInfoChartView.cpp
|
|
charts/JFJochDatasetInfoChartView.h
|
|
widgets/JFJochViewerImageStatistics.cpp
|
|
widgets/JFJochViewerImageStatistics.h
|
|
charts/JFJochSimpleChartView.cpp
|
|
charts/JFJochSimpleChartView.h
|
|
JFJochViewerStatusBar.cpp
|
|
JFJochViewerStatusBar.h
|
|
windows/JFJochViewerImageListWindow.cpp
|
|
windows/JFJochViewerImageListWindow.h
|
|
widgets/NumericComboBox.cpp
|
|
widgets/NumericComboBox.h
|
|
windows/JFJochViewerMetadataWindow.cpp
|
|
windows/JFJochViewerMetadataWindow.h
|
|
windows/JFJochMergeStatsWindow.cpp
|
|
windows/JFJochMergeStatsWindow.h
|
|
windows/JFJochCalibrationResultWindow.cpp
|
|
windows/JFJochCalibrationResultWindow.h
|
|
widgets/NumberLineEdit.cpp
|
|
widgets/NumberLineEdit.h
|
|
widgets/SliderPlusBox.cpp
|
|
widgets/SliderPlusBox.h
|
|
widgets/JFJochViewerSidePanelChart.cpp
|
|
widgets/JFJochViewerSidePanelChart.h
|
|
widgets/JFJochViewerSettingsDock.cpp
|
|
widgets/JFJochViewerSettingsDock.h
|
|
widgets/CollapsibleSection.cpp
|
|
widgets/CollapsibleSection.h
|
|
widgets/ToolbarIcons.cpp
|
|
widgets/ToolbarIcons.h
|
|
widgets/JFJochViewerImageStrip.cpp
|
|
widgets/JFJochViewerImageStrip.h
|
|
windows/JFJochViewerSpotListWindow.cpp
|
|
windows/JFJochViewerSpotListWindow.h
|
|
image_viewer/JFJochAzIntImage.cpp
|
|
image_viewer/JFJochAzIntImage.h
|
|
windows/JFJochViewerReflectionListWindow.cpp
|
|
windows/JFJochViewerReflectionListWindow.h
|
|
toolbar/JFJochViewerToolbarImage.cpp
|
|
toolbar/JFJochViewerToolbarImage.h
|
|
toolbar/JFJochViewerToolbarDisplay.cpp
|
|
toolbar/JFJochViewerToolbarDisplay.h
|
|
SimpleImage.h
|
|
windows/JFJochCalibrationWindow.cpp
|
|
windows/JFJochCalibrationWindow.h
|
|
windows/JFJochHelperWindow.cpp
|
|
windows/JFJochHelperWindow.h
|
|
windows/JFJochLicenseWindow.cpp
|
|
windows/JFJochLicenseWindow.h
|
|
image_viewer/JFJochImage.cpp
|
|
image_viewer/JFJochImage.h
|
|
image_viewer/JFJochFollowerImage.cpp
|
|
image_viewer/JFJochFollowerImage.h
|
|
windows/JFJoch2DAzintImageWindow.cpp
|
|
windows/JFJoch2DAzintImageWindow.h
|
|
widgets/JFJochViewerROIResult.cpp
|
|
widgets/JFJochViewerROIResult.h
|
|
widgets/JFJochViewerROIList.cpp
|
|
widgets/JFJochViewerROIList.h
|
|
widgets/ResolutionRingWidget.cpp
|
|
widgets/ResolutionRingWidget.h
|
|
image_viewer/JFJochGridScanImage.cpp
|
|
image_viewer/JFJochGridScanImage.h
|
|
widgets/PowderCalibrationWidget.cpp
|
|
widgets/PowderCalibrationWidget.h
|
|
${APP_RESOURCES}
|
|
windows/JFJochViewerReciprocalSpaceWindow.cpp
|
|
windows/JFJochViewerReciprocalSpaceWindow.h
|
|
windows/JFJochMagnifierWindow.cpp
|
|
windows/JFJochMagnifierWindow.h
|
|
windows/JFJochProcessingJobsWindow.cpp
|
|
windows/JFJochProcessingJobsWindow.h
|
|
)
|
|
|
|
TARGET_LINK_LIBRARIES(jfjoch_viewer Qt6::Core Qt6::Gui Qt6::Widgets Qt6::Charts Qt6::Concurrent
|
|
Qt6::OpenGL Qt6::OpenGLWidgets
|
|
JFJochReader JFJochLogger JFJochCommon JFJochWriter JFJochImageAnalysis Rugnux
|
|
fftw3f libcurl_static) # vendored static libcurl by concrete name, not the CURL::libcurl
|
|
# alias, which a system libcurl can shadow (see top-level CMakeLists)
|
|
|
|
# Native GUI app per platform: a .app bundle on macOS, GUI subsystem (no console window) on
|
|
# Windows. Each property is ignored on the platforms it does not apply to, so set both always.
|
|
SET_TARGET_PROPERTIES(jfjoch_viewer PROPERTIES
|
|
MACOSX_BUNDLE ON
|
|
WIN32_EXECUTABLE ON)
|
|
|
|
# Application icon: embedded into the .exe via a Windows resource script, and copied into
|
|
# the macOS .app bundle (referenced from Info.plist through MACOSX_BUNDLE_ICON_FILE).
|
|
IF(WIN32)
|
|
TARGET_SOURCES(jfjoch_viewer PRIVATE resources/jfjoch.rc)
|
|
ELSEIF(APPLE)
|
|
SET(_viewer_icns ${CMAKE_CURRENT_SOURCE_DIR}/resources/jfjoch.icns)
|
|
TARGET_SOURCES(jfjoch_viewer PRIVATE ${_viewer_icns})
|
|
SET_SOURCE_FILES_PROPERTIES(${_viewer_icns} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
|
|
SET_TARGET_PROPERTIES(jfjoch_viewer PROPERTIES MACOSX_BUNDLE_ICON_FILE jfjoch.icns)
|
|
ENDIF()
|
|
|
|
INSTALL(TARGETS jfjoch_viewer
|
|
BUNDLE DESTINATION . COMPONENT viewer # macOS .app bundle
|
|
RUNTIME DESTINATION bin COMPONENT viewer) # Windows .exe / Linux binary
|
|
|
|
IF(JFJOCH_VIEWER_DBUS)
|
|
TARGET_SOURCES(jfjoch_viewer PRIVATE dbus/JFJochViewerAdaptor.cpp dbus/JFJochViewerAdaptor.h)
|
|
TARGET_LINK_LIBRARIES(jfjoch_viewer Qt6::DBus)
|
|
TARGET_COMPILE_DEFINITIONS(jfjoch_viewer PRIVATE JFJOCH_VIEWER_DBUS)
|
|
INSTALL(
|
|
FILES ${CMAKE_CURRENT_SOURCE_DIR}/dbus/ch.psi.jfjoch_viewer.service
|
|
DESTINATION share/dbus-1/services
|
|
COMPONENT viewer
|
|
)
|
|
ENDIF()
|
|
|
|
# Freedesktop menu entry and its icon: Linux only. On Windows the Start Menu shortcut comes from
|
|
# CPACK_PACKAGE_EXECUTABLES and on macOS from the .app bundle, so shipping these there would only
|
|
# put two dead files into the installer.
|
|
IF(UNIX AND NOT APPLE)
|
|
INSTALL(
|
|
FILES resources/jfjoch.png
|
|
DESTINATION share/pixmaps
|
|
COMPONENT viewer
|
|
)
|
|
|
|
INSTALL(
|
|
FILES jfjoch_viewer.desktop
|
|
DESTINATION share/applications
|
|
COMPONENT viewer
|
|
)
|
|
ENDIF()
|
|
|
|
# Platform integration plugin: XCB on Linux, native plugin on Windows/macOS.
|
|
IF(WIN32)
|
|
qt_import_plugins(jfjoch_viewer INCLUDE Qt::QWindowsIntegrationPlugin)
|
|
ELSEIF(APPLE)
|
|
qt_import_plugins(jfjoch_viewer INCLUDE Qt::QCocoaIntegrationPlugin)
|
|
ELSE()
|
|
qt_import_plugins(jfjoch_viewer INCLUDE Qt::QXcbIntegrationPlugin)
|
|
ENDIF()
|
|
|
|
# Bundle the Qt runtime into the install tree at install time: this drives windeployqt on Windows
|
|
# and macdeployqt on macOS, copying the Qt shared libraries + plugins next to the app. With a
|
|
# static Qt (e.g. our Linux build) there is nothing to copy, so it is a no-op. Requires Qt >= 6.5,
|
|
# which is when the OUTPUT_SCRIPT signature and the Linux deploy path landed (6.3/6.4 used the older
|
|
# FILENAME_VARIABLE and had no Linux support); skipped on older Qt. NO_UNSUPPORTED_PLATFORM_ERROR
|
|
# keeps it from hard-failing on configurations it does not handle.
|
|
IF(Qt6_VERSION VERSION_GREATER_EQUAL "6.5")
|
|
qt_generate_deploy_app_script(
|
|
TARGET jfjoch_viewer
|
|
OUTPUT_SCRIPT jfjoch_viewer_deploy_script
|
|
NO_UNSUPPORTED_PLATFORM_ERROR)
|
|
INSTALL(SCRIPT ${jfjoch_viewer_deploy_script} COMPONENT viewer)
|
|
ENDIF()
|
|
|
|
# Bundle the cuFFT runtime next to the viewer so the installed app runs on hosts that have an NVIDIA
|
|
# driver but no CUDA toolkit. cuFFT is the ONLY CUDA component we link dynamically (cudart and the
|
|
# fast-feedback indexer are static), so it is the one runtime file the toolkit would otherwise have to
|
|
# provide; it is self-contained (Windows: depends only on KERNEL32; Linux: only libc/libstdc++ and the
|
|
# always-present driver libcuda). GPU build only. macOS has no CUDA, so it is excluded.
|
|
IF(JFJOCH_CUDA_AVAILABLE)
|
|
IF(WIN32)
|
|
# CUDA 13 keeps redistributable DLLs in bin/x64, earlier toolkits in bin -- glob both.
|
|
FILE(GLOB _cufft_dll
|
|
"${CUDAToolkit_BIN_DIR}/x64/cufft64_*.dll"
|
|
"${CUDAToolkit_BIN_DIR}/cufft64_*.dll")
|
|
IF(NOT _cufft_dll)
|
|
MESSAGE(FATAL_ERROR "cuFFT runtime DLL not found under ${CUDAToolkit_BIN_DIR}")
|
|
ENDIF()
|
|
INSTALL(FILES ${_cufft_dll} DESTINATION bin COMPONENT viewer)
|
|
ELSEIF(UNIX AND NOT APPLE AND JFJOCH_VIEWER_ONLY)
|
|
# Only the self-contained Linux .tar.gz (JFJOCH_VIEWER_ONLY) bundles cuFFT: it has no package
|
|
# manager, so it must carry its runtime deps, and we want that set really minimal. The .deb/.rpm
|
|
# builds deliberately do NOT bundle it - CUDA there is centrally managed by the distro's packages.
|
|
# Ship libcufft.so beside the binary and add an $ORIGIN rpath so the loader finds the bundled copy
|
|
# (the same self-contained-app idea as the Windows DLL). CUDA::cufft is an UNKNOWN imported target,
|
|
# so install its file directly, resolving the symlink chain (libcufft.so -> .so.<major> -> real
|
|
# file) so the libcufft.so.<major> the binary is linked against lands in bin.
|
|
INSTALL(CODE
|
|
"file(INSTALL DESTINATION \"\${CMAKE_INSTALL_PREFIX}/bin\" TYPE SHARED_LIBRARY FOLLOW_SYMLINK_CHAIN FILES \"${CUDA_cufft_LIBRARY}\")"
|
|
COMPONENT viewer)
|
|
SET_TARGET_PROPERTIES(jfjoch_viewer PROPERTIES INSTALL_RPATH "$ORIGIN")
|
|
ENDIF()
|
|
ENDIF()
|