]> xenbits.xensource.com Git - libvirt.git/commitdiff
* configure.in, src/Makefile.am, src/virsh_win_icon.rc:
authorRichard W.M. Jones <rjones@redhat.com>
Wed, 15 Oct 2008 18:39:34 +0000 (18:39 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Wed, 15 Oct 2008 18:39:34 +0000 (18:39 +0000)
Add a Windows icon resource.

ChangeLog
configure.in
src/Makefile.am
src/libvirt_win_icon_16x16.ico [new file with mode: 0644]
src/libvirt_win_icon_32x32.ico [new file with mode: 0644]
src/libvirt_win_icon_48x48.ico [new file with mode: 0644]
src/libvirt_win_icon_64x64.ico [new file with mode: 0644]
src/virsh_win_icon.rc [new file with mode: 0644]

index 37152112b1218a84660a5f94ea712e34c97620c7..3ff25f1e5f43d6ea644a5637b09d551622e6965d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Oct 15 19:38:00 BST 2008 Richard W.M. Jones <rjones@redhat.com>
+
+       * configure.in, src/Makefile.am, src/virsh_win_icon.rc:
+       Add a Windows icon resource.
+
 Wed Oct 15 11:28:00 BST 2008 Richard W.M. Jones <rjones@redhat.com>
 
        * src/libvirt.c: Register the remote driver even when we are
index 51bc022238809fccca6b0729477f966e2e29564f..497251f44dd20ac04ce2b6c95df68046f1171d55 100644 (file)
@@ -34,6 +34,8 @@ AC_PROG_CC
 AC_PROG_INSTALL
 AC_PROG_CPP
 
+AC_OBJEXT
+
 dnl gl_INIT uses m4_foreach_w, yet that is not defined in autoconf-2.59.
 dnl In order to accommodate developers with such old tools, here's a
 dnl replacement definition.
@@ -1040,6 +1042,10 @@ AC_SUBST([CYGWIN_EXTRA_LIBADD])
 AC_SUBST([CYGWIN_EXTRA_PYTHON_LIBADD])
 AC_SUBST([MINGW_EXTRA_LDFLAGS])
 
+dnl Look for windres to build a Windows icon resource.
+AC_CHECK_TOOL([WINDRES], [windres], [no])
+AM_CONDITIONAL([WITH_WIN_ICON], [test "$WINDRES" != "no"])
+
 # Set LV_LIBTOOL_OBJDIR to "." or $lt_cv_objdir, depending on whether
 # we're building shared libraries.  This is the name of the directory
 # in which .o files will be created.
index 7d52b54bc787b8bf0ba7090b6c41c17e0916efe0..5a769f83621ff9a22be5fb7fcb28af0fa1cc17d2 100644 (file)
@@ -283,6 +283,33 @@ virsh-pool-edit.c: virsh.c Makefile.am
        rm -f $@
        mv $@-tmp $@
 
+if WITH_WIN_ICON
+virsh_LDADD += virsh_win_icon.$(OBJEXT)
+virsh_DEPENDENCIES += virsh_win_icon.$(OBJEXT)
+
+# Before you edit virsh_win_icon.rc, please note the following
+# limitations of the resource file format:
+#
+# (1) '..' is not permitted in the icon filename field.
+# (2) '-' is not permitted in the icon filename field.
+# (3) Comments are not permitted in the file.
+#
+# Windows appears to choose the first <= 32x32 icon it finds
+# in the resource file.  Therefore you should list the available
+# icons from largest to smallest, and make sure that the 32x32
+# icon is the most legible.
+#
+# Windows .ICO is a special MS-only format.  GIMP and other
+# tools can write it.  However there are several variations,
+# and Windows seems to do its own colour quantization.  More
+# information is needed in this area.
+
+virsh_win_icon.$(OBJEXT): virsh_win_icon.rc
+       $(WINDRES) \
+         --input-format rc --input $< \
+         --output-format coff --output $@
+endif
+
 libexec_PROGRAMS =
 
 if WITH_STORAGE_DISK
diff --git a/src/libvirt_win_icon_16x16.ico b/src/libvirt_win_icon_16x16.ico
new file mode 100644 (file)
index 0000000..38e6d74
Binary files /dev/null and b/src/libvirt_win_icon_16x16.ico differ
diff --git a/src/libvirt_win_icon_32x32.ico b/src/libvirt_win_icon_32x32.ico
new file mode 100644 (file)
index 0000000..4d2e7b7
Binary files /dev/null and b/src/libvirt_win_icon_32x32.ico differ
diff --git a/src/libvirt_win_icon_48x48.ico b/src/libvirt_win_icon_48x48.ico
new file mode 100644 (file)
index 0000000..b03cebf
Binary files /dev/null and b/src/libvirt_win_icon_48x48.ico differ
diff --git a/src/libvirt_win_icon_64x64.ico b/src/libvirt_win_icon_64x64.ico
new file mode 100644 (file)
index 0000000..c23b664
Binary files /dev/null and b/src/libvirt_win_icon_64x64.ico differ
diff --git a/src/virsh_win_icon.rc b/src/virsh_win_icon.rc
new file mode 100644 (file)
index 0000000..2ad9df0
--- /dev/null
@@ -0,0 +1,4 @@
+xlarge  ICON    libvirt_win_icon_64x64.ico
+large   ICON    libvirt_win_icon_48x48.ico
+medium  ICON    libvirt_win_icon_32x32.ico
+small   ICON    libvirt_win_icon_16x16.ico