gprofng-gui-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Fix 66206 Add desktop file


From: vladimir . mezentsev
Subject: [PATCH] Fix 66206 Add desktop file
Date: Wed, 4 Dec 2024 17:49:47 -0800

From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>

ChangeLog
2024-12-04  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

        PR 66206
        * Makefile.am: Install gprofng-gui.desktop and gprofng.png files.
        * images/gprofng-32x32.png: New file.
        * images/gprofng-48x48.png: New file.
        * images/gprofng-64x64.png: New file.
        * images/gprofng-128x128.png: New file.
        * images/gprofng-256x256.png: New file.
---
 Makefile.am                |  37 +++++++++++++++++++++++++++++++++++--
 images/gprofng-128x128.png | Bin 0 -> 10440 bytes
 images/gprofng-256x256.png | Bin 0 -> 33304 bytes
 images/gprofng-32x32.png   | Bin 0 -> 1569 bytes
 images/gprofng-48x48.png   | Bin 0 -> 2565 bytes
 images/gprofng-64x64.png   | Bin 0 -> 3736 bytes
 6 files changed, 35 insertions(+), 2 deletions(-)
 create mode 100644 images/gprofng-128x128.png
 create mode 100644 images/gprofng-256x256.png
 create mode 100644 images/gprofng-32x32.png
 create mode 100644 images/gprofng-48x48.png
 create mode 100644 images/gprofng-64x64.png

diff --git a/Makefile.am b/Makefile.am
index 1c89edf..56ab806 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -638,7 +638,8 @@ $(COLLECTOR_JAR): $(GPROFNG_JAR) $(collector_FILES) 
$(collector_MF)
 bin_SCRIPTS = gprofng-display-gui
 CLEANFILES = gprofng-display-gui $(GPROFNG_JAR) $(ANALYZER_JAR) 
$(COLLECTOR_JAR) \
        $(GPROFNG_CLASSES) $(ANALYZER_CLASSES) $(collector_CLASSES) \
-       $(ANALYZER_PROPERTIES) $(MPMT_PROPERTIES) LocaleString*.class
+       $(ANALYZER_PROPERTIES) $(MPMT_PROPERTIES) LocaleString*.class \
+       $(DesktopLauncher)
 
 gprofng-display-gui: $(srcdir)/gprofng-gui.sh
        @echo "================= $@"
@@ -658,10 +659,42 @@ EXTRA_DIST = $(MPMT_SRC) $(ANALYZER_SRC) $(COLLECTOR_SRC) 
\
        gprofng.properties INSTALL install-sh Makefile.am Makefile.in missing \
        README AUTHORS NEWS tools
 
+DesktopLauncher = gprofng-gui.desktop
+$(DesktopLauncher):
+       @echo '[Desktop Entry]' > $@
+       @echo "Encoding=UTF-8" >> $@
+       @echo "Version=$(VERSION)" >> $@
+       @echo "Type=Application" >> $@
+       @echo "Name=gprofngg gui" >> $@
+       @echo "Exec=$(prefix)/bin/gprofng-display-gui" >> $@
+       @echo "Icon=gprofng" >> $@
+       @echo "Categories=Profiling;" >> $@
+       @echo "Comment=Graphical tool to create and analyze gprofng 
experiments" >> $@
+
+PNG_DIR = $(srcdir)/images
+CLR_DIR = $(DESTDIR)$(datarootdir)/icons/hicolor
+
 PHONY: install-exec-local
-install-exec-local:
+install-exec-local: $(DesktopLauncher)
+       $(mkinstalldirs) $(DESTDIR)$(datarootdir)/applications \
+         $(CLR_DIR)/32x32 $(CLR_DIR)/48x48 $(CLR_DIR)/64x64 \
+         $(CLR_DIR)/128x128 $(CLR_DIR)/256x256
+       cp $(PNG_DIR)/gprofng-32x32.png $(CLR_DIR)/32x32/gprofng.png
+       cp $(PNG_DIR)/gprofng-48x48.png $(CLR_DIR)/48x48/gprofng.png
+       cp $(PNG_DIR)/gprofng-64x64.png $(CLR_DIR)/64x64/gprofng.png
+       cp $(PNG_DIR)/gprofng-128x128.png $(CLR_DIR)/128x128/gprofng.png
+       cp $(PNG_DIR)/gprofng-256x256.png $(CLR_DIR)/256x256/gprofng.png
+       cp $(DesktopLauncher) $(DESTDIR)$(datarootdir)/applications/
+       chmod 644 $(CLR_DIR)/32x32/gprofng.png $(CLR_DIR)/48x48/gprofng.png \
+         $(CLR_DIR)/64x64/gprofng.png $(CLR_DIR)/128x128/gprofng.png \
+         $(CLR_DIR)/256x256/gprofng.png \
+         $(DESTDIR)$(datarootdir)/applications/$(DesktopLauncher)
        $(mkinstalldirs) $(DESTDIR)$(bindir)
        rm -f $(DESTDIR)$(bindir)/gp-display-gui
        ln -s gprofng-display-gui $(DESTDIR)$(bindir)/gp-display-gui
 
+uninstall-local:
+       rm -f $(CLR_DIR)/*/gprofng.png $(DESTDIR)$(bindir)/gp-display-gui \
+         $(DESTDIR)$(datarootdir)/applications/$(DesktopLauncher)
+
 include doc/local.mk




reply via email to

[Prev in Thread] Current Thread [Next in Thread]