From 35449991b52f1d88cc7ca72d171a184eade04167 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Mon, 11 Jan 2016 12:38:32 +0100 Subject: [PATCH] Install viewer .desktop file and icons on all Unix systems These files are not Red Hat or Ubuntu specific, so install them on all Unix systems where the viewer is installed. --- .../packages/deb/ubuntu-precise/debian/rules | 12 ------------ .../packages/deb/ubuntu-trusty/debian/rules | 12 ------------ contrib/packages/rpm/el5/SPECS/tigervnc.spec | 18 +----------------- .../packages/rpm/el6/SOURCES/vncviewer.desktop | 11 ----------- contrib/packages/rpm/el6/SPECS/tigervnc.spec | 17 +---------------- .../packages/rpm/el7/SOURCES/vncviewer.desktop | 11 ----------- contrib/packages/rpm/el7/SPECS/tigervnc.spec | 17 +---------------- vncviewer/CMakeLists.txt | 6 ++++++ .../vncviewer.desktop.in | 2 +- 9 files changed, 10 insertions(+), 96 deletions(-) delete mode 100644 contrib/packages/rpm/el6/SOURCES/vncviewer.desktop delete mode 100644 contrib/packages/rpm/el7/SOURCES/vncviewer.desktop rename contrib/packages/rpm/el5/SOURCES/vncviewer.desktop => vncviewer/vncviewer.desktop.in (92%) diff --git a/contrib/packages/deb/ubuntu-precise/debian/rules b/contrib/packages/deb/ubuntu-precise/debian/rules index 7570e8e6..1a759a5a 100755 --- a/contrib/packages/deb/ubuntu-precise/debian/rules +++ b/contrib/packages/deb/ubuntu-precise/debian/rules @@ -204,18 +204,6 @@ install: build $(CURDIR)/debian/xtigervncviewer/usr/bin/xtigervncviewer mv $(CURDIR)/debian/xtigervncviewer/usr/share/man/man1/vncviewer.1 \ $(CURDIR)/debian/xtigervncviewer/usr/share/man/man1/xtigervncviewer.1 - install -o root -g root -m 644 -D media/icons/tigervnc_16.png \ - $(CURDIR)/debian/xtigervncviewer/usr/share/icons/hicolor/16x16/apps/tigervnc.png - install -o root -g root -m 644 -D media/icons/tigervnc_22.png \ - $(CURDIR)/debian/xtigervncviewer/usr/share/icons/hicolor/22x22/apps/tigervnc.png - install -o root -g root -m 644 -D media/icons/tigervnc_24.png \ - $(CURDIR)/debian/xtigervncviewer/usr/share/icons/hicolor/24x24/apps/tigervnc.png - install -o root -g root -m 644 -D media/icons/tigervnc_32.png \ - $(CURDIR)/debian/xtigervncviewer/usr/share/icons/hicolor/32x32/apps/tigervnc.png - install -o root -g root -m 644 -D media/icons/tigervnc_48.png \ - $(CURDIR)/debian/xtigervncviewer/usr/share/icons/hicolor/48x48/apps/tigervnc.png - install -o root -g root -m 644 -D media/icons/tigervnc.svg \ - $(CURDIR)/debian/xtigervncviewer/usr/share/icons/hicolor/scalable/apps/tigervnc.svg # tigervnc-java mkdir -p $(CURDIR)/debian/tigervnc-java/usr/share (cd java; make install DESTDIR=$(CURDIR)/debian/tigervnc-java/usr/share) diff --git a/contrib/packages/deb/ubuntu-trusty/debian/rules b/contrib/packages/deb/ubuntu-trusty/debian/rules index b3e8187f..97aebb3e 100755 --- a/contrib/packages/deb/ubuntu-trusty/debian/rules +++ b/contrib/packages/deb/ubuntu-trusty/debian/rules @@ -211,18 +211,6 @@ install: build $(CURDIR)/debian/xtigervncviewer/usr/bin/xtigervncviewer mv $(CURDIR)/debian/xtigervncviewer/usr/share/man/man1/vncviewer.1 \ $(CURDIR)/debian/xtigervncviewer/usr/share/man/man1/xtigervncviewer.1 - install -o root -g root -m 644 -D media/icons/tigervnc_16.png \ - $(CURDIR)/debian/xtigervncviewer/usr/share/icons/hicolor/16x16/apps/tigervnc.png - install -o root -g root -m 644 -D media/icons/tigervnc_22.png \ - $(CURDIR)/debian/xtigervncviewer/usr/share/icons/hicolor/22x22/apps/tigervnc.png - install -o root -g root -m 644 -D media/icons/tigervnc_24.png \ - $(CURDIR)/debian/xtigervncviewer/usr/share/icons/hicolor/24x24/apps/tigervnc.png - install -o root -g root -m 644 -D media/icons/tigervnc_32.png \ - $(CURDIR)/debian/xtigervncviewer/usr/share/icons/hicolor/32x32/apps/tigervnc.png - install -o root -g root -m 644 -D media/icons/tigervnc_48.png \ - $(CURDIR)/debian/xtigervncviewer/usr/share/icons/hicolor/48x48/apps/tigervnc.png - install -o root -g root -m 644 -D media/icons/tigervnc.svg \ - $(CURDIR)/debian/xtigervncviewer/usr/share/icons/hicolor/scalable/apps/tigervnc.svg # tigervnc-java mkdir -p $(CURDIR)/debian/tigervnc-java/usr/share (cd java; make install DESTDIR=$(CURDIR)/debian/tigervnc-java/usr/share) diff --git a/contrib/packages/rpm/el5/SPECS/tigervnc.spec b/contrib/packages/rpm/el5/SPECS/tigervnc.spec index 3ef3455d..2fc033e0 100644 --- a/contrib/packages/rpm/el5/SPECS/tigervnc.spec +++ b/contrib/packages/rpm/el5/SPECS/tigervnc.spec @@ -23,7 +23,6 @@ URL: http://www.tigervnc.com Source0: %{name}-%{version}%{?snap:-%{snap}}.tar.bz2 Source1: vncserver.service Source2: vncserver.sysconfig -Source6: vncviewer.desktop Source9: FindX11.cmake Source11: http://fltk.org/pub/fltk/1.3.3/fltk-1.3.3-source.tar.gz Source12: http://downloads.sourceforge.net/project/libjpeg-turbo/1.4.2/libjpeg-turbo-1.4.2.tar.gz @@ -116,7 +115,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # xorg requires newer versions of automake, & autoconf than are available with el5. Use el6 versions. BuildRequires: automake >= 1.11, autoconf >= 2.60, libtool >= 1.4, gettext >= 0.14.4, gettext-devel >= 0.14.4, bison-devel, python26 -BuildRequires: desktop-file-utils, java-devel, jpackage-utils +BuildRequires: java-devel, jpackage-utils BuildRequires: pam-devel BuildRequires: cmake28 BuildRequires: pkgconfig >= 0.20 @@ -949,21 +948,6 @@ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig install -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/init.d/vncserver install -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/vncservers -# Install desktop stuff -mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/{16x16,24x24,48x48}/apps - -pushd media/icons -for s in 16 24 48; do -install -m644 tigervnc_$s.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${s}x$s/apps/tigervnc.png -done -popd - -mkdir $RPM_BUILD_ROOT%{_datadir}/applications -desktop-file-install \ - --dir $RPM_BUILD_ROOT%{_datadir}/applications \ - --vendor="" \ - %{SOURCE6} - # Install Java applet pushd java mkdir -p $RPM_BUILD_ROOT%{_datadir}/vnc/classes diff --git a/contrib/packages/rpm/el6/SOURCES/vncviewer.desktop b/contrib/packages/rpm/el6/SOURCES/vncviewer.desktop deleted file mode 100644 index fab46f0a..00000000 --- a/contrib/packages/rpm/el6/SOURCES/vncviewer.desktop +++ /dev/null @@ -1,11 +0,0 @@ -[Desktop Entry] -Name=TigerVNC Viewer -Name[fr]=Visionneur TigerVNC -Comment=Connect to VNC server and display remote desktop -Comment[fr]=Se connecter à un serveur VNC et afficher le bureau distant -Exec=/usr/bin/vncviewer -Icon=tigervnc -Terminal=false -Type=Application -StartupWMClass=TigerVNC Viewer: Connection Details -Categories=Network;RemoteAccess; diff --git a/contrib/packages/rpm/el6/SPECS/tigervnc.spec b/contrib/packages/rpm/el6/SPECS/tigervnc.spec index 1f68a5f2..67bd82d8 100644 --- a/contrib/packages/rpm/el6/SPECS/tigervnc.spec +++ b/contrib/packages/rpm/el6/SPECS/tigervnc.spec @@ -21,7 +21,6 @@ URL: http://www.tigervnc.com Source0: %{name}-%{version}%{?snap:-%{snap}}.tar.bz2 Source1: vncserver.service Source2: vncserver.sysconfig -Source6: vncviewer.desktop Source11: http://fltk.org/pub/fltk/1.3.3/fltk-1.3.3-source.tar.gz Source13: http://downloads.sourceforge.net/project/libpng/libpng15/1.5.24/libpng-1.5.24.tar.bz2 Source14: https://ftp.gnu.org/gnu/gmp/gmp-6.0.0a.tar.bz2 @@ -38,7 +37,7 @@ BuildRequires: libdrm-devel, libXt-devel, pixman-devel libXfont-devel BuildRequires: libxkbfile-devel, openssl-devel, libpciaccess-devel BuildRequires: mesa-libGL-devel, libXinerama-devel, ImageMagick BuildRequires: freetype-devel, libXdmcp-devel -BuildRequires: desktop-file-utils, java-devel, jpackage-utils +BuildRequires: java-devel, jpackage-utils BuildRequires: libjpeg-turbo-devel, pam-devel BuildRequires: cmake >= 2.8 %if !%{_bootstrap} @@ -365,20 +364,6 @@ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig install -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/init.d/vncserver install -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/vncservers -# Install desktop stuff -mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/{16x16,24x24,48x48}/apps - -pushd media/icons -for s in 16 24 48; do -install -m644 tigervnc_$s.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${s}x$s/apps/tigervnc.png -done -popd - -mkdir $RPM_BUILD_ROOT%{_datadir}/applications -desktop-file-install \ - --dir $RPM_BUILD_ROOT%{_datadir}/applications \ - %{SOURCE6} - # Install Java applet pushd java mkdir -p $RPM_BUILD_ROOT%{_datadir}/vnc/classes diff --git a/contrib/packages/rpm/el7/SOURCES/vncviewer.desktop b/contrib/packages/rpm/el7/SOURCES/vncviewer.desktop deleted file mode 100644 index fab46f0a..00000000 --- a/contrib/packages/rpm/el7/SOURCES/vncviewer.desktop +++ /dev/null @@ -1,11 +0,0 @@ -[Desktop Entry] -Name=TigerVNC Viewer -Name[fr]=Visionneur TigerVNC -Comment=Connect to VNC server and display remote desktop -Comment[fr]=Se connecter à un serveur VNC et afficher le bureau distant -Exec=/usr/bin/vncviewer -Icon=tigervnc -Terminal=false -Type=Application -StartupWMClass=TigerVNC Viewer: Connection Details -Categories=Network;RemoteAccess; diff --git a/contrib/packages/rpm/el7/SPECS/tigervnc.spec b/contrib/packages/rpm/el7/SPECS/tigervnc.spec index 4420a7f5..c440d983 100644 --- a/contrib/packages/rpm/el7/SPECS/tigervnc.spec +++ b/contrib/packages/rpm/el7/SPECS/tigervnc.spec @@ -22,7 +22,6 @@ Source0: %{name}-%{version}%{?snap:-%{snap}}.tar.bz2 Source1: vncserver.service Source2: vncserver.sysconfig Source3: 10-libvnc.conf -Source6: vncviewer.desktop Source11: http://fltk.org/pub/fltk/1.3.3/fltk-1.3.3-source.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -33,7 +32,7 @@ BuildRequires: libdrm-devel, libXt-devel, pixman-devel libXfont-devel BuildRequires: libxkbfile-devel, openssl-devel, libpciaccess-devel BuildRequires: mesa-libGL-devel, libXinerama-devel, ImageMagick BuildRequires: freetype-devel, libXdmcp-devel -BuildRequires: desktop-file-utils, java-devel, jpackage-utils +BuildRequires: java-devel, jpackage-utils BuildRequires: libjpeg-turbo-devel, gnutls-devel, pam-devel BuildRequires: systemd, cmake @@ -292,20 +291,6 @@ rm -rf %{buildroot}%{_initrddir} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig install -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/vncservers -# Install desktop stuff -mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/{16x16,24x24,48x48}/apps - -pushd media/icons -for s in 16 24 48; do -install -m644 tigervnc_$s.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${s}x$s/apps/tigervnc.png -done -popd - -mkdir $RPM_BUILD_ROOT%{_datadir}/applications -desktop-file-install \ - --dir $RPM_BUILD_ROOT%{_datadir}/applications \ - %{SOURCE6} - # Install Java applet pushd java mkdir -p $RPM_BUILD_ROOT%{_datadir}/vnc/classes diff --git a/vncviewer/CMakeLists.txt b/vncviewer/CMakeLists.txt index de9da8fb..f2a0aca0 100644 --- a/vncviewer/CMakeLists.txt +++ b/vncviewer/CMakeLists.txt @@ -55,4 +55,10 @@ endif() install(TARGETS vncviewer DESTINATION ${BIN_DIR}) if(UNIX) install(FILES vncviewer.man DESTINATION ${MAN_DIR}/man1 RENAME vncviewer.1) + configure_file(vncviewer.desktop.in vncviewer.desktop) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/vncviewer.desktop DESTINATION ${DATA_DIR}/applications) + foreach(res 16 22 24 32 48) + install(FILES ../media/icons/tigervnc_${res}.png DESTINATION ${DATA_DIR}/icons/hicolor/${res}x${res}/apps RENAME tigervnc.png) + endforeach() + install(FILES ../media/icons/tigervnc.svg DESTINATION ${DATA_DIR}/icons/hicolor/scalable/apps) endif() diff --git a/contrib/packages/rpm/el5/SOURCES/vncviewer.desktop b/vncviewer/vncviewer.desktop.in similarity index 92% rename from contrib/packages/rpm/el5/SOURCES/vncviewer.desktop rename to vncviewer/vncviewer.desktop.in index fab46f0a..32184b47 100644 --- a/contrib/packages/rpm/el5/SOURCES/vncviewer.desktop +++ b/vncviewer/vncviewer.desktop.in @@ -3,7 +3,7 @@ Name=TigerVNC Viewer Name[fr]=Visionneur TigerVNC Comment=Connect to VNC server and display remote desktop Comment[fr]=Se connecter à un serveur VNC et afficher le bureau distant -Exec=/usr/bin/vncviewer +Exec=@BIN_DIR@/vncviewer Icon=tigervnc Terminal=false Type=Application -- 2.39.5