gpt4 book ai didi

c - 将可执行文件移动到其他位置后,app.exe.manifest 设置将被忽略

转载 作者:行者123 更新时间:2023-11-30 19:31:17 26 4
gpt4 key购买 nike

我正在使用 MinGW 构建我的 Windows 应用程序:

windres app.rc -O coff -o app.res
gcc -w -mwindows -o app.exe app.c app.res

这是我的 app.exe.manifest:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
version="1.1.0.0"
processorArchitecture="x86"
name="controls"
type="win32"
/>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel
level="asInvoker"
uiAccess="false"
/>
</requestedPrivileges>
</security>
</trustInfo>
<asmv3:application>
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2017/WindowsSettings">
<gdiScaling>true</gdiScaling>
</asmv3:windowsSettings>
</asmv3:application>
</assembly>

我这样做是为了启用 Windows 10 的新 GDI 缩放。它工作正常,直到我将可执行文件移动到其他位置。

令人惊讶的是,复制整个目录并没有帮助,因此系统不需要 list 或资源文件。该路径似乎在某处被硬编码。

我该如何解决这个问题?

谢谢

最佳答案

结果我的 list 很糟糕。它不包含 xmlns:asmv3 参数

<assembly xmlns="urn:schemas-microsoft-com:asm.v1"  xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" manifestVersion="1.0">

关于c - 将可执行文件移动到其他位置后,app.exe.manifest 设置将被忽略,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49080894/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com