diff --git a/cmake/mupp.desktop.in b/cmake/mupp.desktop.in new file mode 100644 index 00000000..00981278 --- /dev/null +++ b/cmake/mupp.desktop.in @@ -0,0 +1,11 @@ +[Desktop Entry] +Name=mupp +Comment=muSR parameter plotter +GenericName=musrfit parameter plotter +Exec=@CMAKE_INSTALL_FULL_BINDIR@/mupp +Icon=mupp +Terminal=false +Type=Application +StartupWMClass=mupp +Categories=Science;Physics;DataVisualization; +Keywords=muSR;fitting;musrfit;physics;muon; diff --git a/cmake/musrStep.desktop.in b/cmake/musrStep.desktop.in new file mode 100644 index 00000000..7953ac48 --- /dev/null +++ b/cmake/musrStep.desktop.in @@ -0,0 +1,11 @@ +[Desktop Entry] +Name=musrStep +Comment=set the initial step sizes of an msr-file +GenericName=musrfit step size tool +Exec=@CMAKE_INSTALL_FULL_BINDIR@/musrStep %f +Icon=musrStep +Terminal=false +Type=Application +StartupWMClass=musrStep +Categories=Science;Physics; +Keywords=muSR;fitting;musrfit;physics;muon; diff --git a/cmake/musrWiz.desktop.in b/cmake/musrWiz.desktop.in new file mode 100644 index 00000000..ead2cc78 --- /dev/null +++ b/cmake/musrWiz.desktop.in @@ -0,0 +1,11 @@ +[Desktop Entry] +Name=musrWiz +Comment=wizard to create msr-files for musrfit +GenericName=musrfit msr-file wizard +Exec=@CMAKE_INSTALL_FULL_BINDIR@/musrWiz +Icon=musrWiz +Terminal=false +Type=Application +StartupWMClass=musrWiz +Categories=Science;Physics; +Keywords=muSR;fitting;musrfit;physics;muon; diff --git a/src/musredit_qt5/mupp/CMakeLists.txt b/src/musredit_qt5/mupp/CMakeLists.txt index 5d5d8475..40a1de3a 100644 --- a/src/musredit_qt5/mupp/CMakeLists.txt +++ b/src/musredit_qt5/mupp/CMakeLists.txt @@ -126,3 +126,22 @@ if (APPLE) else (APPLE) install(TARGETS mupp DESTINATION ${CMAKE_INSTALL_BINDIR}) endif (APPLE) + +#--- Linux: the .desktop file (named after the executable, i.e. the Wayland +#--- app-id) and the icon let the desktop show the musrfit icon for mupp. --- +if (UNIX AND NOT APPLE) + configure_file( + ${CMAKE_SOURCE_DIR}/cmake/mupp.desktop.in + ${CMAKE_CURRENT_BINARY_DIR}/mupp.desktop + @ONLY + ) + install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/mupp.desktop + DESTINATION ${MUSRFIT_XDG_DATA_DIR}/applications + ) + install( + FILES ${CMAKE_CURRENT_SOURCE_DIR}/icons/mupp-plain.svg + DESTINATION ${MUSRFIT_XDG_DATA_DIR}/icons/hicolor/scalable/apps + RENAME mupp.svg + ) +endif () diff --git a/src/musredit_qt5/mupp/plotter/CMakeLists.txt b/src/musredit_qt5/mupp/plotter/CMakeLists.txt index e43520f0..7883a7d0 100644 --- a/src/musredit_qt5/mupp/plotter/CMakeLists.txt +++ b/src/musredit_qt5/mupp/plotter/CMakeLists.txt @@ -105,20 +105,20 @@ if (UNIX AND NOT APPLE) ) install( FILES ${CMAKE_CURRENT_BINARY_DIR}/mupp_plot.desktop - DESTINATION ${MUSRFIT_XDG_DATADIR}/applications + DESTINATION ${MUSRFIT_XDG_DATA_DIR}/applications ) install( FILES ${CMAKE_CURRENT_SOURCE_DIR}/icons/mupp_plot.png - DESTINATION ${MUSRFIT_XDG_DATADIR}/icons/hicolor/48x48/apps + DESTINATION ${MUSRFIT_XDG_DATA_DIR}/icons/hicolor/48x48/apps ) install( FILES ${CMAKE_CURRENT_SOURCE_DIR}/icons/mupp_plot-512.png - DESTINATION ${MUSRFIT_XDG_DATADIR}/icons/hicolor/512x512/apps + DESTINATION ${MUSRFIT_XDG_DATA_DIR}/icons/hicolor/512x512/apps RENAME mupp_plot.png ) #--- a stale icon cache would hide the new icon, 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/musrStep/CMakeLists.txt b/src/musredit_qt5/musrStep/CMakeLists.txt index 31980e78..182a794c 100644 --- a/src/musredit_qt5/musrStep/CMakeLists.txt +++ b/src/musredit_qt5/musrStep/CMakeLists.txt @@ -81,3 +81,22 @@ else (APPLE) ) endif (APPLE) + +#--- Linux: the .desktop file (named after the executable, i.e. the Wayland +#--- app-id) and the icon let the desktop show the musrfit icon for musrStep. --- +if (UNIX AND NOT APPLE) + configure_file( + ${CMAKE_SOURCE_DIR}/cmake/musrStep.desktop.in + ${CMAKE_CURRENT_BINARY_DIR}/musrStep.desktop + @ONLY + ) + install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/musrStep.desktop + DESTINATION ${MUSRFIT_XDG_DATA_DIR}/applications + ) + install( + FILES ${CMAKE_CURRENT_SOURCE_DIR}/icons/musrStep-32x32.svg + DESTINATION ${MUSRFIT_XDG_DATA_DIR}/icons/hicolor/scalable/apps + RENAME musrStep.svg + ) +endif () diff --git a/src/musredit_qt5/musrWiz/CMakeLists.txt b/src/musredit_qt5/musrWiz/CMakeLists.txt index 7d20d607..160c1496 100644 --- a/src/musredit_qt5/musrWiz/CMakeLists.txt +++ b/src/musredit_qt5/musrWiz/CMakeLists.txt @@ -84,3 +84,22 @@ else (APPLE) RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) endif (APPLE) + +#--- Linux: the .desktop file (named after the executable, i.e. the Wayland +#--- app-id) and the icon let the desktop show the musrfit icon for musrWiz. --- +if (UNIX AND NOT APPLE) + configure_file( + ${CMAKE_SOURCE_DIR}/cmake/musrWiz.desktop.in + ${CMAKE_CURRENT_BINARY_DIR}/musrWiz.desktop + @ONLY + ) + install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/musrWiz.desktop + DESTINATION ${MUSRFIT_XDG_DATA_DIR}/applications + ) + install( + FILES ${CMAKE_CURRENT_SOURCE_DIR}/icons/musrWiz-32x32.svg + DESTINATION ${MUSRFIT_XDG_DATA_DIR}/icons/hicolor/scalable/apps + RENAME musrWiz.svg + ) +endif () diff --git a/src/musredit_qt6/mupp/CMakeLists.txt b/src/musredit_qt6/mupp/CMakeLists.txt index 05f9b55a..25181d8d 100644 --- a/src/musredit_qt6/mupp/CMakeLists.txt +++ b/src/musredit_qt6/mupp/CMakeLists.txt @@ -138,3 +138,22 @@ if (APPLE) else (APPLE) install(TARGETS mupp DESTINATION ${CMAKE_INSTALL_BINDIR}) endif (APPLE) + +#--- Linux: the .desktop file (named after the executable, i.e. the Wayland +#--- app-id) and the icon let the desktop show the musrfit icon for mupp. --- +if (UNIX AND NOT APPLE) + configure_file( + ${CMAKE_SOURCE_DIR}/cmake/mupp.desktop.in + ${CMAKE_CURRENT_BINARY_DIR}/mupp.desktop + @ONLY + ) + install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/mupp.desktop + DESTINATION ${MUSRFIT_XDG_DATA_DIR}/applications + ) + install( + FILES ${CMAKE_CURRENT_SOURCE_DIR}/icons/mupp-plain.svg + DESTINATION ${MUSRFIT_XDG_DATA_DIR}/icons/hicolor/scalable/apps + RENAME mupp.svg + ) +endif () diff --git a/src/musredit_qt6/mupp/plotter/CMakeLists.txt b/src/musredit_qt6/mupp/plotter/CMakeLists.txt index 8b3c6232..a42652ec 100644 --- a/src/musredit_qt6/mupp/plotter/CMakeLists.txt +++ b/src/musredit_qt6/mupp/plotter/CMakeLists.txt @@ -105,20 +105,20 @@ if (UNIX AND NOT APPLE) ) install( FILES ${CMAKE_CURRENT_BINARY_DIR}/mupp_plot.desktop - DESTINATION ${MUSRFIT_XDG_DATADIR}/applications + DESTINATION ${MUSRFIT_XDG_DATA_DIR}/applications ) install( FILES ${CMAKE_CURRENT_SOURCE_DIR}/icons/mupp_plot.png - DESTINATION ${MUSRFIT_XDG_DATADIR}/icons/hicolor/48x48/apps + DESTINATION ${MUSRFIT_XDG_DATA_DIR}/icons/hicolor/48x48/apps ) install( FILES ${CMAKE_CURRENT_SOURCE_DIR}/icons/mupp_plot-512.png - DESTINATION ${MUSRFIT_XDG_DATADIR}/icons/hicolor/512x512/apps + DESTINATION ${MUSRFIT_XDG_DATA_DIR}/icons/hicolor/512x512/apps RENAME mupp_plot.png ) #--- a stale icon cache would hide the new icon, 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_qt6/musrStep/CMakeLists.txt b/src/musredit_qt6/musrStep/CMakeLists.txt index 91e8fc54..adcdbac0 100644 --- a/src/musredit_qt6/musrStep/CMakeLists.txt +++ b/src/musredit_qt6/musrStep/CMakeLists.txt @@ -81,3 +81,22 @@ else (APPLE) RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) endif (APPLE) + +#--- Linux: the .desktop file (named after the executable, i.e. the Wayland +#--- app-id) and the icon let the desktop show the musrfit icon for musrStep. --- +if (UNIX AND NOT APPLE) + configure_file( + ${CMAKE_SOURCE_DIR}/cmake/musrStep.desktop.in + ${CMAKE_CURRENT_BINARY_DIR}/musrStep.desktop + @ONLY + ) + install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/musrStep.desktop + DESTINATION ${MUSRFIT_XDG_DATA_DIR}/applications + ) + install( + FILES ${CMAKE_CURRENT_SOURCE_DIR}/icons/musrStep-32x32.svg + DESTINATION ${MUSRFIT_XDG_DATA_DIR}/icons/hicolor/scalable/apps + RENAME musrStep.svg + ) +endif () diff --git a/src/musredit_qt6/musrWiz/CMakeLists.txt b/src/musredit_qt6/musrWiz/CMakeLists.txt index 4964b3dc..50e750f6 100644 --- a/src/musredit_qt6/musrWiz/CMakeLists.txt +++ b/src/musredit_qt6/musrWiz/CMakeLists.txt @@ -85,3 +85,22 @@ else (APPLE) RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) endif (APPLE) + +#--- Linux: the .desktop file (named after the executable, i.e. the Wayland +#--- app-id) and the icon let the desktop show the musrfit icon for musrWiz. --- +if (UNIX AND NOT APPLE) + configure_file( + ${CMAKE_SOURCE_DIR}/cmake/musrWiz.desktop.in + ${CMAKE_CURRENT_BINARY_DIR}/musrWiz.desktop + @ONLY + ) + install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/musrWiz.desktop + DESTINATION ${MUSRFIT_XDG_DATA_DIR}/applications + ) + install( + FILES ${CMAKE_CURRENT_SOURCE_DIR}/icons/musrWiz-32x32.svg + DESTINATION ${MUSRFIT_XDG_DATA_DIR}/icons/hicolor/scalable/apps + RENAME musrWiz.svg + ) +endif ()