From fec4e01aebaf1f09c5516b3c6e6c4bf53ad93d6c Mon Sep 17 00:00:00 2001 From: namoen0301 Date: Fri, 14 Nov 2025 21:09:12 +0800 Subject: [PATCH] NSIS: add ManifestDPIAwareness function * This PR added an undocumented function `ManifestDPIAwareness` and enable `PerMonitorV2` support (requires Win10 1703+) https://github.com/NSIS-Dev/nsis/blob/691211035c2aaaebe8fbca48ee02d4de93594a52/Docs/src/attributes.but#L290-L292 * Remove `XPStyle` because this function do nothing on NSIS 3.x PR #23426. --- dist/windows/config.nsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dist/windows/config.nsh b/dist/windows/config.nsh index 40fc6e0de..a5577d29c 100644 --- a/dist/windows/config.nsh +++ b/dist/windows/config.nsh @@ -51,6 +51,8 @@ Unicode true ManifestDPIAware true +; add an undocumented function in NSIS, PMv2 requires Win10 1703+ +ManifestDPIAwareness "PerMonitorV2,System" !ifdef USE_UPX !packhdr "$%TEMP%\exehead.tmp" 'upx.exe -9 --best --ultra-brute "$%TEMP%\exehead.tmp"' @@ -59,7 +61,6 @@ ManifestDPIAware true ;Setting the compression SetCompressor /SOLID LZMA SetCompressorDictSize 64 -XPStyle on !include "MUI2.nsh" !include "UAC.nsh"