From nobody Sun Feb 8 12:58:04 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1594894507; cv=none; d=zohomail.com; s=zohoarc; b=OYgHW9zJOlk9J8Nbgt9tlgQQRpGyvyw4TgZtQrkJQTQeeax5qQTPBZppDeRFWOFYkyQpTmwUHVNPaFAonZ3/xzGFplULPw5BUm38zmZM8IzZ/1yr9wyI3Y8jHrG7bAQgq4h0kX5UAnijOWmhBICqxyzI7Kg2NYCIWWfgk6As/uA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594894507; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=W99l1G6mR15WMpkwo+9k5L8qGsI3BPp1QObymplh5Mw=; b=gxRKfA//B4lW5E4WymEfLLasHYyy3TVzA/dDS5FE1h3iMvjyvSnJA8kzzSb3C3JLABIQxleRgRjzSkH4C6URUKzIjZZzrGV8YhPAN8skpTCBW0TSRwPc9MvzTa3bAPQ7R6XvtuHz1r1RCHYxeIG3VmoYSGmmhpnwyGzgPdFoaWc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1594894507389933.4839604887428; Thu, 16 Jul 2020 03:15:07 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-335-or7QKJXLNJKPEMofjCUedQ-1; Thu, 16 Jul 2020 06:13:56 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7BD1C100AA22; Thu, 16 Jul 2020 10:13:51 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5B3DC17D04; Thu, 16 Jul 2020 10:13:51 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 2A1E31800FEA; Thu, 16 Jul 2020 10:13:51 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 06GA6IHg019481 for ; Thu, 16 Jul 2020 06:06:18 -0400 Received: by smtp.corp.redhat.com (Postfix) id C18B82B6DC; Thu, 16 Jul 2020 10:06:18 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.194.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3BE912B6DB for ; Thu, 16 Jul 2020 10:06:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594894506; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=W99l1G6mR15WMpkwo+9k5L8qGsI3BPp1QObymplh5Mw=; b=g/LxIxyxYrbePlQW10NtCMSaJOomGDZY0pRHPVNXBsBvZBSVAuP80gO/cEBC0QTlhBy2MF jeGNl2yEmiXxSYVyXLQpIuNy87DyR6M4GBHo4r7LgNYS7MGYnLERZkF4xbLdAgnJ2xX3BA ELsD1CESXkGJ3xn8mPHpyq55v6m6DcY= X-MC-Unique: or7QKJXLNJKPEMofjCUedQ-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 258/351] meson: tools: build virsh_win_icon object file Date: Thu, 16 Jul 2020 11:58:14 +0200 Message-Id: <2d7ea7130d63e5f492f04482b7a9ebbacd8a0e53.1594891445.git.phrdina@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Pavel Hrdina --- Makefile.am | 2 -- configure.ac | 14 -------------- m4/virt-win-windres.m4 | 36 ------------------------------------ meson.build | 1 + tools/Makefile.am | 29 ----------------------------- tools/meson.build | 31 +++++++++++++++++++++++++++++++ 6 files changed, 32 insertions(+), 81 deletions(-) delete mode 100644 m4/virt-win-windres.m4 diff --git a/Makefile.am b/Makefile.am index c5809204e6b..0b62d15eef5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -26,8 +26,6 @@ SUBDIRS =3D . tools docs \ XZ_OPT ?=3D -v -T0 export XZ_OPT =20 -ACLOCAL_AMFLAGS =3D -I m4 - pkgconfigdir =3D $(libdir)/pkgconfig pkgconfig_DATA =3D libvirt.pc libvirt-qemu.pc libvirt-lxc.pc libvirt-admin= .pc =20 diff --git a/configure.ac b/configure.ac index dc1a27ae94b..24724e3755a 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,6 @@ dnl License along with this library. If not, see dnl . =20 AC_CONFIG_AUX_DIR([build-aux]) -AC_CONFIG_MACRO_DIR([m4]) dnl Make automake keep quiet about wildcards & other GNUmake-isms AM_INIT_AUTOMAKE([ foreign @@ -90,10 +89,6 @@ dnl Need to test if pkg-config exists PKG_PROG_PKG_CONFIG =20 =20 -dnl MinGW checks -LIBVIRT_WIN_CHECK_WINDRES - - # 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. @@ -124,12 +119,3 @@ AC_CONFIG_FILES([\ tests/Makefile \ tools/Makefile]) AC_OUTPUT - -AC_MSG_NOTICE([]) -AC_MSG_NOTICE([Configuration summary]) -AC_MSG_NOTICE([=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D]) -AC_MSG_NOTICE([]) -AC_MSG_NOTICE([Windows]) -AC_MSG_NOTICE([]) -LIBVIRT_WIN_RESULT_WINDRES -AC_MSG_NOTICE([]) diff --git a/m4/virt-win-windres.m4 b/m4/virt-win-windres.m4 deleted file mode 100644 index e913eb48b8e..00000000000 --- a/m4/virt-win-windres.m4 +++ /dev/null @@ -1,36 +0,0 @@ -dnl The MinGW windres checks -dnl -dnl Copyright (C) 2016 Red Hat, Inc. -dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License, or (at your option) any later version. -dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. -dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library. If not, see -dnl . -dnl - -AC_DEFUN([LIBVIRT_WIN_CHECK_WINDRES], [ - dnl Look for windres to build a Windows icon resource. - with_windres=3Dno - case "$host" in - *-*-mingw* ) - AC_CHECK_TOOL([WINDRES], [windres], []) - if test "x$WINDRES" !=3D "x"; then - with_windres=3Dyes - fi - ;; - esac - AM_CONDITIONAL([WITH_WIN_ICON], [test "$with_windres" =3D "yes"]) -]) - -AC_DEFUN([LIBVIRT_WIN_RESULT_WINDRES], [ - LIBVIRT_RESULT([windres], [$with_windres], [$WINDRES]) -]) diff --git a/meson.build b/meson.build index 69145512519..b623ddbf4fd 100644 --- a/meson.build +++ b/meson.build @@ -2307,6 +2307,7 @@ summary(libs_summary, section: 'Libraries', bool_yn: = true) =20 win_summary =3D { 'MinGW': host_machine.system() =3D=3D 'windows', + 'windres': host_machine.system() =3D=3D 'windows', } summary(win_summary, section: 'Windows', bool_yn: true) =20 diff --git a/tools/Makefile.am b/tools/Makefile.am index de1edbd54a0..4f4adf94382 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -21,13 +21,6 @@ # needed STANDALONE_CPPFLAGS =3D -I$(top_srcdir) =20 -ICON_FILES =3D \ - libvirt_win_icon_16x16.ico \ - libvirt_win_icon_32x32.ico \ - libvirt_win_icon_48x48.ico \ - libvirt_win_icon_64x64.ico \ - virsh_win_icon.rc - confdir =3D $(sysconfdir)/libvirt conf_DATA =3D =20 @@ -125,28 +118,6 @@ virt_admin_CFLAGS =3D \ =20 if WITH_WIN_ICON virsh_LDADD +=3D 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 <=3D 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 - $(AM_V_GEN)$(WINDRES) \ - --input-format rc --input $< \ - --output-format coff --output $@ endif WITH_WIN_ICON =20 install-data-local: install-systemd install-nss \ diff --git a/tools/meson.build b/tools/meson.build index 53bc1af7bc4..c110cfcf177 100644 --- a/tools/meson.build +++ b/tools/meson.build @@ -111,3 +111,34 @@ if conf.has('WITH_LOGIN_SHELL') install_rpath: libdir, ) endif + +if host_machine.system() =3D=3D 'windows' + # 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 <=3D 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. + windres =3D import('windows') + virsh_icon_res =3D windres.compile_resources( + 'virsh_win_icon.rc', + depend_files: [ + 'libvirt_win_icon_16x16.ico', + 'libvirt_win_icon_32x32.ico', + 'libvirt_win_icon_48x48.ico', + 'libvirt_win_icon_64x64.ico', + ], + ) +else + virsh_icon_res =3D [] +endif --=20 2.26.2