From ec8a45dc09bbd01e73d4a4472e7978ca5e4a8080 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Sun, 21 Jun 2026 09:17:52 +0200 Subject: [PATCH] windows: bundle cuFFT in installer and tag the CUDA/CPU variant cuFFT is the only CUDA component linked dynamically (cudart and the fast-feedback indexer are static), so the prior Windows installer would fail to launch the GPU path on a host without a CUDA toolkit. Ship cufft64_*.dll next to the viewer (CUDA 13 keeps it in bin/x64, earlier toolkits in bin); the DLL is self-contained, so the installed app needs only an NVIDIA driver. Tag the variant where it matters and nowhere else: the installer filename (-cuda / -cpu) and the Add/Remove Programs entry ("Jungfraujoch (CUDA)" / "(CPU)") advertise it, while the install folder and Start Menu group stay plain "Jungfraujoch" -- the CUDA build is a strict superset, so the two variants share a location and replace each other. Docs: SOFTWARE.md + JFJOCH_VIEWER.md. Co-Authored-By: Claude Opus 4.8 (1M context) --- CMakeLists.txt | 21 ++++++++++++++++++--- docs/JFJOCH_VIEWER.md | 19 +++++++++++++++---- docs/SOFTWARE.md | 4 +++- viewer/CMakeLists.txt | 15 +++++++++++++++ 4 files changed, 51 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b073efa0..af868b1e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -361,11 +361,26 @@ elseif (WIN32) # GPLv3 text shown as the click-through license page of the installer. set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE") - # Name the install folder and Start Menu group "Jungfraujoch". CPack uses this single - # variable for both; without it they default to "jfjoch ". + # Branding is split across three CPack knobs so the CUDA/CPU variant surfaces exactly where we + # want it and nowhere else: + # - Install folder + Start Menu group come from CPACK_PACKAGE_INSTALL_DIRECTORY and + # CPACK_NSIS_PACKAGE_NAME (the latter feeds $(^Name), the Start Menu group's default folder). + # Both stay plain "Jungfraujoch", so the Start Menu group carries no variant tag and the two + # builds install to the same place (CUDA is a strict superset -- they replace, not coexist). + # - CPACK_NSIS_DISPLAY_NAME is the Add/Remove Programs entry -- tagged "(CUDA)"/"(CPU)". + # - CPACK_PACKAGE_FILE_NAME is the installer .exe filename -- tagged "-cuda"/"-cpu", so + # the (much larger) CUDA download is self-identifying, with the CUDA major version baked in. + # The tag follows JFJOCH_CUDA_AVAILABLE automatically; CUDAToolkit_VERSION_MAJOR is set whenever + # it is ON (find_package(CUDAToolkit) ran in the same guard above). set(CPACK_PACKAGE_INSTALL_DIRECTORY "Jungfraujoch") - set(CPACK_NSIS_DISPLAY_NAME "Jungfraujoch") set(CPACK_NSIS_PACKAGE_NAME "Jungfraujoch") + if (JFJOCH_CUDA_AVAILABLE) + set(CPACK_NSIS_DISPLAY_NAME "Jungfraujoch (CUDA)") + set(CPACK_PACKAGE_FILE_NAME "jfjoch-${JFJOCH_VERSION}-win64-cuda${CUDAToolkit_VERSION_MAJOR}") + else() + set(CPACK_NSIS_DISPLAY_NAME "Jungfraujoch (CPU)") + set(CPACK_PACKAGE_FILE_NAME "jfjoch-${JFJOCH_VERSION}-win64-cpu") + endif() # Start Menu shortcut for the viewer (";