install Linux .desktop files and icons for mupp, musrWiz and musrStep.
mupp_plot used the misspelled MUSRFIT_XDG_DATADIR, which only worked thanks to a stale cache entry; use MUSRFIT_XDG_DATA_DIR like everything else.
This commit is contained in:
1 parent
268e4c5579
commit
f43c03133b
11 files changed
+155
-8
No files matched your search
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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 ()
|
||||
@@ -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}\")
|
||||
|
||||
@@ -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 ()
|
||||
@@ -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 ()
|
||||
@@ -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 ()
|
||||
@@ -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}\")
|
||||
|
||||
@@ -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 ()
|
||||
@@ -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 ()
|
||||
Reference in new issue
Block a user