diff --git a/ChangeLog b/ChangeLog index 37152112b1..3ff25f1e5f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Oct 15 19:38:00 BST 2008 Richard W.M. Jones + + * 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 * src/libvirt.c: Register the remote driver even when we are diff --git a/configure.in b/configure.in index 51bc022238..497251f44d 100644 --- a/configure.in +++ b/configure.in @@ -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. diff --git a/src/Makefile.am b/src/Makefile.am index 7d52b54bc7..5a769f8362 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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 index 0000000000..38e6d74f52 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 index 0000000000..4d2e7b7f77 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 index 0000000000..b03cebf9c5 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 index 0000000000..c23b664761 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 index 0000000000..2ad9df0038 --- /dev/null +++ b/src/virsh_win_icon.rc @@ -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