[virt-tools-list] [PATCH virt-viewer 2/5] win32: add a few Windows sepecific data

Daniel P. Berrange berrange at redhat.com
Fri Mar 30 10:32:55 UTC 2012


On Fri, Mar 30, 2012 at 03:37:42AM +0200, Marc-André Lureau wrote:
> Add application icon and manifest
> ---
>  Makefile.am              |    2 +-
>  configure.ac             |   18 ++++++++++++++++++
>  icons/Makefile.am        |    9 +++++++++
>  src/Makefile.am          |   17 +++++++++++++++++
>  src/virt-viewer.manifest |   11 +++++++++++
>  src/virt-viewer.rc.in    |   27 +++++++++++++++++++++++++++
>  6 files changed, 83 insertions(+), 1 deletions(-)
>  create mode 100644 src/virt-viewer.manifest
>  create mode 100644 src/virt-viewer.rc.in
> 
> diff --git a/icons/Makefile.am b/icons/Makefile.am
> index 189ea2b..820a421 100644
> --- a/icons/Makefile.am
> +++ b/icons/Makefile.am
> @@ -1 +1,10 @@
>  SUBDIRS = 16x16 22x22 24x24 32x32 48x48 256x256
> +
> +if OS_WIN32
> +noinst_DATA = virt-viewer.ico
> +endif
> +
> +# http://stackoverflow.com/questions/3236115/which-icon-sizes-should-my-windows-applications-icon-include
> +ico_sizes = 16 32 48 256
> +%.ico: $(foreach s,$(ico_sizes),$(s)x$(s)/%.png)
> +	$(AM_V_GEN)$(ICOTOOL) -c -o $@ $^


Don't we need to add virt-viewer.ico to CLEANFILES ?


> diff --git a/src/Makefile.am b/src/Makefile.am
> index e85e939..5349c17 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -1,4 +1,6 @@
>  NULL =
> +LDADD =
> +MAINTAINERCLEANFILES =
>  bin_PROGRAMS =
>  
>  builderxmldir = $(pkgdatadir)/ui
> @@ -105,3 +107,18 @@ if HAVE_SPICE_GTK
>  remote_viewer_LDFLAGS += $(SPICE_GTK_LIBS) $(SPICE_CONTROLLER_LIBS)
>  remote_viewer_CFLAGS += $(SPICE_GTK_CFLAGS) $(SPICE_CONTROLLER_CFLAGS)
>  endif
> +
> +VIRT_VIEWER_RES = virt-viewer.rc virt-viewer.manifest
> +ICONDIR = $(top_builddir)/icons
> +MANIFESTDIR = $(srcdir)
> +EXTRA_DIST += $(VIRT_VIEWER_RES)
> +
> +if OS_WIN32
> +virt-viewer_rc.$(OBJEXT): $(VIRT_VIEWER_RES) $(top_builddir)/icons/virt-viewer.ico
> +	$(AM_V_GEN)$(WINDRES)				\
> +		-DICONDIR='\"$(ICONDIR)\"'		\
> +		-DMANIFESTDIR='\"$(MANIFESTDIR)\"'	\
> +		-i $< -o $@
> +LDADD += virt-viewer_rc.$(OBJEXT)
> +MAINTAINERCLEANFILES += virt-viewer_rc.$(OBJEXT)
> +endif
> diff --git a/src/virt-viewer.manifest b/src/virt-viewer.manifest
> new file mode 100644
> index 0000000..d921a06
> --- /dev/null
> +++ b/src/virt-viewer.manifest
> @@ -0,0 +1,11 @@
> +<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> +
> +<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
> +  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
> +    <security>
> +      <requestedPrivileges>
> +        <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
> +      </requestedPrivileges>
> +    </security>
> +  </trustInfo>
> +</assembly>
> diff --git a/src/virt-viewer.rc.in b/src/virt-viewer.rc.in
> new file mode 100644
> index 0000000..196e631
> --- /dev/null
> +++ b/src/virt-viewer.rc.in
> @@ -0,0 +1,27 @@
> +1 VERSIONINFO
> +FILEVERSION     1,0,0,0
> +PRODUCTVERSION  1,0,0,0
> +
> +BEGIN
> +  BLOCK "StringFileInfo"
> +  BEGIN
> +    BLOCK "040904E4"
> +    BEGIN
> +      VALUE "CompanyName", "virt-manager.org"
> +      VALUE "FileDescription", "A remote desktop client"
> +      VALUE "FileVersion", "@VERSION@"
> +      VALUE "InternalName", "@PACKAGE_STRING@"
> +      VALUE "LegalCopyright", "Copyright (C) 2007-2012 Red Hat, Inc."
> +      VALUE "OriginalFilename", "virt-viewer.exe"
> +      VALUE "ProductName", "VirtViewer"
> +      VALUE "ProductVersion", "@VERSION@"
> +    END
> +  END
> +
> +  BLOCK "VarFileInfo"
> +  BEGIN
> +    VALUE "Translation", 0x409, 1252
> +  END
> +END
> +2 ICON ICONDIR "/virt-viewer.ico"
> +3 RT_MANIFEST MANIFESTDIR "/virt-viewer.manifest"


ACK


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the virt-tools-list mailing list