diff options
author | Peter Wu <peter@lekensteyn.nl> | 2016-11-08 15:20:30 +0100 |
---|---|---|
committer | Balint Reczey <balint@balintreczey.hu> | 2016-11-18 20:15:23 +0000 |
commit | c27404655650a3648f576663d07394105fd5ef30 (patch) | |
tree | d2966a07f77cec2784ce2a5a9156c678be5b404e | |
parent | a12399018c6c0e0721c54c8982aacc53e8b823eb (diff) | |
download | wireshark-c27404655650a3648f576663d07394105fd5ef30.tar.gz |
cmake: install icons and .desktop files
Based on the install-data-local target from Makefile.am.
Change-Id: Ia2ff6b90475a30ed219019fd80afd1a498e3133c
Reviewed-on: https://code.wireshark.org/review/18708
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
Tested-by: Balint Reczey <balint@balintreczey.hu>
-rw-r--r-- | CMakeLists.txt | 30 | ||||
-rw-r--r-- | README.cmake | 2 | ||||
-rwxr-xr-x | debian/rules | 5 | ||||
-rw-r--r-- | debian/wireshark-gtk.install | 2 | ||||
-rw-r--r-- | debian/wireshark-qt.install | 2 |
5 files changed, 32 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 50288264f7..60b2c12f51 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2702,6 +2702,36 @@ install( ${CMAKE_INSTALL_DATADIR}/${CPACK_PACKAGE_NAME} ) +# Install icons and other desktop files for Freedesktop.org-compliant desktops. +if(((BUILD_wireshark AND QT_FOUND) OR BUILD_wireshark_gtk) AND NOT (WIN32 OR APPLE)) + install(FILES wireshark-mime-package.xml + DESTINATION "${CMAKE_INSTALL_DATADIR}/mime/packages" + RENAME wireshark.xml + ) + install(FILES wireshark.appdata.xml + DESTINATION "${CMAKE_INSTALL_DATADIR}/appdata" + ) + if(BUILD_wireshark AND QT_FOUND) + install(FILES wireshark.desktop + DESTINATION "${CMAKE_INSTALL_DATADIR}/applications") + endif() + if(BUILD_wireshark_gtk) + install(FILES wireshark-gtk.desktop + DESTINATION "${CMAKE_INSTALL_DATADIR}/applications") + endif() + foreach(size 16 24 32 48 64 128 256) + install(FILES image/wsicon${size}.png + DESTINATION "${CMAKE_INSTALL_DATADIR}/icons/hicolor/${size}x${size}/apps" + RENAME wireshark.png) + install(FILES image/WiresharkDoc-${size}.png + DESTINATION "${CMAKE_INSTALL_DATADIR}/icons/hicolor/${size}x${size}/mimetypes" + RENAME application-wireshark-doc.png) + endforeach() + install(FILES image/wsicon.svg + DESTINATION "${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps" + RENAME wireshark.svg) +endif() + install( FILES "${CMAKE_BINARY_DIR}/wireshark.pc" diff --git a/README.cmake b/README.cmake index 5ac018c651..645cfd67c4 100644 --- a/README.cmake +++ b/README.cmake @@ -183,8 +183,6 @@ What needs to be done? "cmake fortify" for some information.) - Define the GTK_DISABLE_ and GDK_DISABLE_ values as appropriate if we care about supporting the GTK+ version. -- Install the freedesktop integration files (wireshark.desktop, - wireshark-mime-package.xml, etc.). ... Links regarding cmake diff --git a/debian/rules b/debian/rules index baf321c715..4a36a76a9e 100755 --- a/debian/rules +++ b/debian/rules @@ -45,11 +45,6 @@ override_dh_auto_install: rm -f debian/*.shlibs rm -rf $(CURDIR)/debian/tmp/usr/share/wireshark/COPYING cp debian/license-text-about-dialog $(CURDIR)/debian/tmp/usr/share/wireshark/ABOUT.GPL - # icons conforming to freedesktop.org standards - mkdir -p $(CURDIR)/debian/tmp/usr/share/icons/hicolor/scalable/apps/ \ - $(CURDIR)/debian/tmp/usr/share/mime/packages/ - install -m 644 image/wsicon.svg $(CURDIR)/debian/tmp/usr/share/icons/hicolor/scalable/apps/wireshark.svg - install -m 644 wireshark-mime-package.xml $(CURDIR)/debian/tmp/usr/share/mime/packages/wireshark.xml mkdir -p $(CURDIR)/debian/tmp/etc/wireshark/ mv $(CURDIR)/debian/tmp/usr/share/wireshark/init.lua \ $(CURDIR)/debian/tmp/etc/wireshark/ diff --git a/debian/wireshark-gtk.install b/debian/wireshark-gtk.install index b044b121c6..c109852f63 100644 --- a/debian/wireshark-gtk.install +++ b/debian/wireshark-gtk.install @@ -1,2 +1,2 @@ usr/bin/wireshark-gtk -wireshark-gtk.desktop usr/share/applications/ +usr/share/applications/wireshark-gtk.desktop diff --git a/debian/wireshark-qt.install b/debian/wireshark-qt.install index a55ac03c10..f7412692d2 100644 --- a/debian/wireshark-qt.install +++ b/debian/wireshark-qt.install @@ -1,2 +1,2 @@ usr/bin/wireshark -wireshark.desktop usr/share/applications/ +usr/share/applications/wireshark.desktop |