Add a Windows icon resource.
+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
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.
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.
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
--- /dev/null
+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