From a46d0ed1b714e51b5b636dda6d22bb467625247c Mon Sep 17 00:00:00 2001 From: Andreas Suter Date: Thu, 29 Oct 2026 16:46:16 +0100 Subject: [PATCH] rename MUSRFIT_XDG_DATADIR to MUSRFIT_XDG_DATA_DIR, as on the root7 branch. The previous commit switched mupp, mupp_plot, musrWiz and musrStep to MUSRFIT_XDG_DATA_DIR while the variable was still defined as MUSRFIT_XDG_DATADIR, hence their .desktop files and icons ended up in /applications and /icons. --- CMakeLists.txt | 2 +- ChangeLog | 2 +- src/CMakeLists.txt | 10 +++++----- src/musredit_qt5/musredit/CMakeLists.txt | 4 ++-- src/musredit_qt6/musredit/CMakeLists.txt | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b3040240..fe77ceff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,7 +36,7 @@ if (UNIX AND NOT APPLE) else () set(xdg_datadir_default "/usr/local/share") endif () - set(MUSRFIT_XDG_DATADIR "${xdg_datadir_default}" CACHE PATH + set(MUSRFIT_XDG_DATA_DIR "${xdg_datadir_default}" CACHE PATH "where the .desktop files and icons are installed (must be in the XDG search path)") endif (UNIX AND NOT APPLE) diff --git a/ChangeLog b/ChangeLog index 09dd9480..4229b26f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -18,7 +18,7 @@ Changes since V1.12.1 (not yet released) New features / improvements: musrview, musrFT, musrt0: show their own window/dock icon instead of the generic ROOT one (on macOS set via Cocoa). The .desktop files and icons (incl. musredit) -are now installed to MUSRFIT_XDG_DATADIR, which defaults to the prefix share for +are now installed to MUSRFIT_XDG_DATA_DIR, which defaults to the prefix share for /usr and /usr/local, ~/.local/share for prefixes under $HOME, and /usr/local/share otherwise. msr2data: the number of threads to be used can be passed on to musrfit from the diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f3578b00..d8c43635 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -189,19 +189,19 @@ if (UNIX AND NOT APPLE) ${CMAKE_SOURCE_DIR}/cmake/musrFT.desktop ${CMAKE_SOURCE_DIR}/cmake/musrt0.desktop DESTINATION - ${MUSRFIT_XDG_DATADIR}/applications + ${MUSRFIT_XDG_DATA_DIR}/applications ) install( FILES ${CMAKE_CURRENT_SOURCE_DIR}/classes/icons/musrview.svg DESTINATION - ${MUSRFIT_XDG_DATADIR}/icons/hicolor/scalable/apps + ${MUSRFIT_XDG_DATA_DIR}/icons/hicolor/scalable/apps ) install( FILES ${CMAKE_CURRENT_SOURCE_DIR}/classes/icons/musrview-512.png DESTINATION - ${MUSRFIT_XDG_DATADIR}/icons/hicolor/512x512/apps + ${MUSRFIT_XDG_DATA_DIR}/icons/hicolor/512x512/apps RENAME musrview.png ) @@ -210,11 +210,11 @@ if (UNIX AND NOT APPLE) ${CMAKE_CURRENT_SOURCE_DIR}/classes/icons/musrFT.png ${CMAKE_CURRENT_SOURCE_DIR}/classes/icons/musrt0.png DESTINATION - ${MUSRFIT_XDG_DATADIR}/icons/hicolor/48x48/apps + ${MUSRFIT_XDG_DATA_DIR}/icons/hicolor/48x48/apps ) #--- a stale icon cache would hide the new icons, hence refresh an existing one install(CODE " - set(icon_dir \"\$ENV{DESTDIR}${MUSRFIT_XDG_DATADIR}/icons/hicolor\") + set(icon_dir \"\$ENV{DESTDIR}${MUSRFIT_XDG_DATA_DIR}/icons/hicolor\") find_program(GTK_UPDATE_ICON_CACHE gtk-update-icon-cache) if (GTK_UPDATE_ICON_CACHE AND EXISTS \"\${icon_dir}/icon-theme.cache\") execute_process(COMMAND \${GTK_UPDATE_ICON_CACHE} -q -t -f \"\${icon_dir}\") diff --git a/src/musredit_qt5/musredit/CMakeLists.txt b/src/musredit_qt5/musredit/CMakeLists.txt index b8cbb961..e71d6420 100644 --- a/src/musredit_qt5/musredit/CMakeLists.txt +++ b/src/musredit_qt5/musredit/CMakeLists.txt @@ -141,13 +141,13 @@ if (UNIX AND NOT APPLE) FILES ${CMAKE_SOURCE_DIR}/cmake/musredit.desktop DESTINATION - ${MUSRFIT_XDG_DATADIR}/applications + ${MUSRFIT_XDG_DATA_DIR}/applications ) install( FILES ${CMAKE_CURRENT_SOURCE_DIR}/icons/musredit.png DESTINATION - ${MUSRFIT_XDG_DATADIR}/icons/hicolor/48x48/apps + ${MUSRFIT_XDG_DATA_DIR}/icons/hicolor/48x48/apps ) endif (UNIX AND NOT APPLE) diff --git a/src/musredit_qt6/musredit/CMakeLists.txt b/src/musredit_qt6/musredit/CMakeLists.txt index c9a2a9c1..6f7bfa59 100644 --- a/src/musredit_qt6/musredit/CMakeLists.txt +++ b/src/musredit_qt6/musredit/CMakeLists.txt @@ -142,13 +142,13 @@ if (UNIX AND NOT APPLE) FILES ${CMAKE_SOURCE_DIR}/cmake/musredit.desktop DESTINATION - ${MUSRFIT_XDG_DATADIR}/applications + ${MUSRFIT_XDG_DATA_DIR}/applications ) install( FILES ${CMAKE_CURRENT_SOURCE_DIR}/icons/musredit.png DESTINATION - ${MUSRFIT_XDG_DATADIR}/icons/hicolor/48x48/apps + ${MUSRFIT_XDG_DATA_DIR}/icons/hicolor/48x48/apps ) endif (UNIX AND NOT APPLE)