[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 08/21] nsis installer: Fix mouse-over descriptions for emulators
From: |
Peter Maydell |
Subject: |
[PULL 08/21] nsis installer: Fix mouse-over descriptions for emulators |
Date: |
Fri, 18 Mar 2022 13:22:53 +0000 |
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 <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: John Snow <jsnow@redhat.com>
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)
--
2.25.1
- [PULL 00/21] target-arm queue, Peter Maydell, 2022/03/18
- [PULL 01/21] target/arm: Fix sve2 ldnt1 and stnt1, Peter Maydell, 2022/03/18
- [PULL 02/21] target/arm: Fix pauth_check_trap vs SEL2, Peter Maydell, 2022/03/18
- [PULL 03/21] target/arm: Fix handling of LPAE block descriptors, Peter Maydell, 2022/03/18
- [PULL 05/21] hw/misc/npcm7xx_clk: Don't leak string in npcm7xx_clk_sel_init(), Peter Maydell, 2022/03/18
- [PULL 04/21] hw/dma/xlnx_csu_dma: Set TYPE_XLNX_CSU_DMA class_size, Peter Maydell, 2022/03/18
- [PULL 06/21] nsis installer: List emulators in alphabetical order, Peter Maydell, 2022/03/18
- [PULL 07/21] nsis installer: Suppress "ANSI targets are deprecated" warning, Peter Maydell, 2022/03/18
- [PULL 08/21] nsis installer: Fix mouse-over descriptions for emulators,
Peter Maydell <=
- [PULL 09/21] hw/intc: Rename CONFIG_ARM_GIC_TCG into CONFIG_ARM_GICV3_TCG, Peter Maydell, 2022/03/18
- [PULL 11/21] target/arm: Log M-profile vector table accesses, Peter Maydell, 2022/03/18
- [PULL 13/21] hw/arm/xlnx-zynqmp: Add an unimplemented SERDES area, Peter Maydell, 2022/03/18
- [PULL 10/21] hw/arm/virt: Fix gic-version=max when CONFIG_ARM_GICV3_TCG is unset, Peter Maydell, 2022/03/18
- [PULL 12/21] target/arm: Log fault address for M-profile faults, Peter Maydell, 2022/03/18
- [PULL 14/21] target/arm: Make rvbar settable after realize, Peter Maydell, 2022/03/18
- [PULL 15/21] hw/misc: Add a model of the Xilinx ZynqMP CRF, Peter Maydell, 2022/03/18
- [PULL 16/21] hw/arm/xlnx-zynqmp: Connect the ZynqMP CRF, Peter Maydell, 2022/03/18
- [PULL 18/21] hw/arm/xlnx-zynqmp: Connect the ZynqMP APU Control, Peter Maydell, 2022/03/18
- [PULL 17/21] hw/misc: Add a model of the Xilinx ZynqMP APU Control, Peter Maydell, 2022/03/18