1 Commits

Author SHA1 Message Date
5304f276d8 adds installation of musredit as a unix app 2026-03-13 15:20:31 +01:00
9 changed files with 63 additions and 1 deletions

View File

@@ -17,7 +17,7 @@ set (CPACK_RESOURCE_FILE_LICENSE "@PROJECT_SOURCE_DIR@/COPYING")
set (CPACK_RESOURCE_FILE_README "@PROJECT_SOURCE_DIR@/README.md")
set (CPACK_RESOURCE_FILE_WELCOME "@PROJECT_SOURCE_DIR@/cmake/welcome.txt")
set (CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "@CMAKE_INSTALL_PREFIX@;@CMAKE_INSTALL_PREFIX@/bin;@CMAKE_INSTALL_PREFIX@/include;@CMAKE_INSTALL_PREFIX@/share;@CMAKE_INSTALL_PREFIX@/lib64;@CMAKE_INSTALL_PREFIX@/lib;@CMAKE_INSTALL_PREFIX@/pkgconfig")
set (CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "@CMAKE_INSTALL_PREFIX@;@CMAKE_INSTALL_PREFIX@/bin;@CMAKE_INSTALL_PREFIX@/include;@CMAKE_INSTALL_PREFIX@/share;@CMAKE_INSTALL_PREFIX@/lib64;@CMAKE_INSTALL_PREFIX@/lib;@CMAKE_INSTALL_PREFIX@/pkgconfig;@CMAKE_INSTALL_PREFIX@/share/applications;@CMAKE_INSTALL_PREFIX@/share/icons;@CMAKE_INSTALL_PREFIX@/share/icons/hicolor;@CMAKE_INSTALL_PREFIX@/share/icons/hicolor/48x48;@CMAKE_INSTALL_PREFIX@/share/icons/hicolor/48x48/apps")
# we do not have any absolute paths, so do not need DESTDIR
set (CPACK_SET_DESTDIR "OFF")

13
cmake/musredit.desktop Normal file
View File

@@ -0,0 +1,13 @@
[Desktop Entry]
Name=MuSRedit
Comment=editor and launcher for the musrfit data analysis
GenericName=musrfit editor
Exec=musredit %F
Icon=musredit
Terminal=false
Type=Application
StartupWMClass=MuSRedit
Categories=Science;DataEditing;
MimeType=text/plain;
Keywords=muSR;fitting;musrfit;physics;muon;
StartupNotify=true

View File

@@ -91,6 +91,8 @@ rm -rf $RPM_BUILD_ROOT
%_prefix/lib64/*
%license COPYING
%doc %_prefix/share/doc/musrfit
%{_datadir}/applications/musredit.desktop
%{_datadir}/icons/hicolor/48x48/apps/musredit.png

View File

@@ -10,3 +10,10 @@ then
fi
/sbin/ldconfig
#update .desktop and icons
if command -v update-desktop-database &>/dev/null; then
update-desktop-database -q /usr/share/applications || true
fi
if command -v gtk-update-icon-cache &>/dev/null; then
gtk-update-icon-cache -q -t /usr/share/icons/hicolor || true
fi

View File

@@ -3,3 +3,11 @@
echo " >> musrfit post uninstall script started ..."
/sbin/ldconfig
#update .desktop and icons
if command -v update-desktop-database &>/dev/null; then
update-desktop-database -q /usr/share/applications || true
fi
if command -v gtk-update-icon-cache &>/dev/null; then
gtk-update-icon-cache -q -t /usr/share/icons/hicolor || true
fi

View File

@@ -133,6 +133,22 @@ else (APPLE)
)
endif (APPLE)
# --- Linux App installation ----
if (UNIX AND NOT APPLE)
install(
FILES
${CMAKE_SOURCE_DIR}/cmake/musredit.desktop
DESTINATION
share/applications
)
install(
FILES
${CMAKE_CURRENT_SOURCE_DIR}/icons/musredit.png
DESTINATION
share/icons/hicolor/48x48/apps
)
endif (UNIX AND NOT APPLE)
#--- documentation installation info ------------------------------------------
install(
DIRECTORY

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -133,6 +133,22 @@ else (APPLE)
)
endif (APPLE)
# --- Linux App installation ----
if (UNIX AND NOT APPLE)
install(
FILES
${CMAKE_SOURCE_DIR}/cmake/musredit.desktop
DESTINATION
share/applications
)
install(
FILES
${CMAKE_CURRENT_SOURCE_DIR}/icons/musredit.png
DESTINATION
share/icons/hicolor/48x48/apps
)
endif (UNIX AND NOT APPLE)
#--- documentation installation info ------------------------------------------
install(
DIRECTORY

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB