From patchwork Fri Mar 18 13:22:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 552602 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6713:0:0:0:0 with SMTP id u19csp2074257mag; Fri, 18 Mar 2022 06:27:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdKKT+/sb1z8cXZFTrZqVSH3oY8tozQLMP97LQvAw1s4hTSfGpeb/98kamLNJpVliXXcLk X-Received: by 2002:a05:622a:1990:b0:2e1:a7bf:9222 with SMTP id u16-20020a05622a199000b002e1a7bf9222mr7588281qtc.230.1647610022759; Fri, 18 Mar 2022 06:27:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647610022; cv=none; d=google.com; s=arc-20160816; b=PV5gZwf8zQKF7pTVIekvvay1I6bJwNm9e88LKYWnJ1kdPEIzoAKk2qXGUyt7XVcudf tYycJiflc0Hly148JFgwe8UxXAaMfeIw65dXlMfdC7C+iWZ9xv9+EbeMvgGuOPX1c6W9 HboFe8uRmgSjP2OGQkxtcd6dLYIhw7pV26YX6+yQD5LKTU1mCFk10nqzXcgMU3P9KVud Zjl7mXlGgA9tIAOQKWe1ydhThp0PEigVDy8bsOLPxOtO1oQJsL9PX8H90BMkL8M2PfDz 1A9Lz9ztLOuUwjZT3Igrb8mghcRjBW6g643/81awezK9nkJxxD0umelUAXNJzM1AFYFI 4/MQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=sSwzNR8+SBA1DuRsakelB2z3vFtjsN8XSEy4XqrJuZ4=; b=ZQAf+UcziU/1Hz6Ks1VB6Rg9Eo3WBabilSVHaYMxQ7jFOIOVh5xqcDiW5cjByLzcJN oGVz3wZa/JRsB7jfzZWFxYE+q7tBkYNa+JzuTsemOIuCnesabSkK7o6ffTbPwhnGkGD4 Z/7DUCXCajoSkNnl5Z80zEqotcXn06HRutJDHLJAA3wB/ZXRFGJ1z90yrzAkDxbMd3qE zr/SzmV5g1GvkPq4pwnp11vJQjrSvmvLLUNS0bHdWiJcjkWCp0/gBBjAHbi5Tu9Yy6RJ xClrVrKMGyelci29ev5uu2+AW9vG2goU370r5Bc3hjrwB7a0nmo4+HJQQKfbgvbGuKGH Wegg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lv5LmJKA; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id o13-20020ac85a4d000000b002e1f41f6d83si1408680qta.735.2022.03.18.06.27.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 18 Mar 2022 06:27:02 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lv5LmJKA; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:56526 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nVCdC-0003IU-C7 for patch@linaro.org; Fri, 18 Mar 2022 09:27:02 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46106) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nVCZd-0006OW-Ei for qemu-devel@nongnu.org; Fri, 18 Mar 2022 09:23:21 -0400 Received: from [2a00:1450:4864:20::42c] (port=33497 helo=mail-wr1-x42c.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nVCZb-0002BV-Pq for qemu-devel@nongnu.org; Fri, 18 Mar 2022 09:23:21 -0400 Received: by mail-wr1-x42c.google.com with SMTP id q8so375463wrc.0 for ; Fri, 18 Mar 2022 06:23:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=sSwzNR8+SBA1DuRsakelB2z3vFtjsN8XSEy4XqrJuZ4=; b=lv5LmJKA6u4hyC7hFn0WCX6BN9RWXetBLt8ekcga9ryOBaRofiFiIZcfvW5FDcDxrR CZUojRA7wUoXnwk5zFpu4YwyVLvqdffd7dOAb1JG9WorESKcFoN3CT8Ex3hKy/s8o5+I KLpfgWnt9wMXc0c0+8Lg/p4hleX/UUASF2ZxnLsqHFFMj22w1QJkl/HYb8d6epXW8bY2 ub7TnQnfsdD8XdiYNbzowN7Bmnw+9YkX06316LBUtulC7racMO3Ko6L0JHzXi575LyqG PfYiDKiNGd9reghvwc38qj4lr+RWsMm+XwLhkuxLAlNqFOcvZwAjNQu6M5T86j3xEntC j8LQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=sSwzNR8+SBA1DuRsakelB2z3vFtjsN8XSEy4XqrJuZ4=; b=U3/wSZNxVtd7yYmPVROlAHJDi8f8/RrLut2fc1+oOLbowT4nZbdE30MT8RhS3xeJPE Q4CmXLf7haNkkzrk1uiS0xsR8+FSftSuV9IyghbEGxv0Y1FlJ1IP1BpwdQiPJBF/wpCk +0ZtMCoZGtSRsE0leKWTg8+kuzgju1YSuTb9L2kX3cFZ+Wa929N2PZquopRoDd0JCPpp 1hdAG+V7aIbJV7jNGkU20nAdisOb5nQS63BCsCVWptdlFF0wB5ywYCFjEFoT97WPom0W WWcLeFGM3WDPCqiVcL0nD8RYLuFj2jn2+bqj27uifbnE4Vmc40d2y563571wAPFpQAlt syXA== X-Gm-Message-State: AOAM532kd0RzzkL33yVGafh4Ww7m8cliUbYKIAeBvux4o7sNFSD+c+sz l1lf7NWj3igVuxUdkqbcGCmVQa5GFpoIPQ== X-Received: by 2002:a05:6000:15c2:b0:203:8348:8cbf with SMTP id y2-20020a05600015c200b0020383488cbfmr8068112wry.309.1647609798459; Fri, 18 Mar 2022 06:23:18 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id y15-20020a05600015cf00b00203e324347bsm6316599wry.102.2022.03.18.06.23.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Mar 2022 06:23:18 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 08/21] nsis installer: Fix mouse-over descriptions for emulators Date: Fri, 18 Mar 2022 13:22:53 +0000 Message-Id: <20220318132306.3254960-9-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220318132306.3254960-1-peter.maydell@linaro.org> References: <20220318132306.3254960-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::42c (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42c.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We use the nsis.py script to write out an installer script Section for each emulator executable, so the exact set of Sections depends on which executables were built. However the part of qemu.nsi which specifies mouse-over descriptions for each Section still has a hard-coded and very outdated list (with just i386 and alpha). This causes two problems. Firstly, if you build the installer for a configuration where you didn't build the i386 binaries you get warnings like this: warning 6000: unknown variable/constant "{Section_i386}" detected, ignoring (macro:_==:1) warning 6000: unknown variable/constant "{Section_i386w}" detected, ignoring (macro:_==:1) (this happens in our gitlab CI jobs, for instance). Secondly, most of the emulators in the generated installer don't have any mouseover text. Make nsis.py generate a second output file which has the necessary MUI_DESCRIPTION_TEXT lines for each Section it creates, so we can include that at the right point in qemu.nsi to set the mouse-over text. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: John Snow Message-id: 20220305105743.2384766-4-peter.maydell@linaro.org --- qemu.nsi | 5 +---- scripts/nsis.py | 13 ++++++++++++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/qemu.nsi b/qemu.nsi index 6edd82b385d..564d617d11f 100644 --- a/qemu.nsi +++ b/qemu.nsi @@ -228,10 +228,7 @@ SectionEnd ; Descriptions (mouse-over). !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN !insertmacro MUI_DESCRIPTION_TEXT ${SectionSystem} "System emulation." - !insertmacro MUI_DESCRIPTION_TEXT ${Section_alpha} "Alpha system emulation." - !insertmacro MUI_DESCRIPTION_TEXT ${Section_alphaw} "Alpha system emulation (GUI)." - !insertmacro MUI_DESCRIPTION_TEXT ${Section_i386} "PC i386 system emulation." - !insertmacro MUI_DESCRIPTION_TEXT ${Section_i386w} "PC i386 system emulation (GUI)." +!include "${BINDIR}\system-mui-text.nsh" !insertmacro MUI_DESCRIPTION_TEXT ${SectionTools} "Tools." !ifdef DLLDIR !insertmacro MUI_DESCRIPTION_TEXT ${SectionDll} "Runtime Libraries (DLL)." diff --git a/scripts/nsis.py b/scripts/nsis.py index 383bef70332..462d6cac3b6 100644 --- a/scripts/nsis.py +++ b/scripts/nsis.py @@ -33,7 +33,9 @@ def main(): subprocess.run(["make", "install", "DESTDIR=" + destdir + os.path.sep]) with open( os.path.join(destdir + args.prefix, "system-emulations.nsh"), "w" - ) as nsh: + ) as nsh, open( + os.path.join(destdir + args.prefix, "system-mui-text.nsh"), "w" + ) as muinsh: for exe in sorted(glob.glob( os.path.join(destdir + args.prefix, "qemu-system-*.exe") )): @@ -49,6 +51,15 @@ def main(): arch, exe ) ) + if arch.endswith('w'): + desc = arch[:-1] + " emulation (GUI)." + else: + desc = arch + " emulation." + + muinsh.write( + """ + !insertmacro MUI_DESCRIPTION_TEXT ${{Section_{0}}} "{1}" + """.format(arch, desc)) for exe in glob.glob(os.path.join(destdir + args.prefix, "*.exe")): signcode(exe)