Fix EXE manifest

Only Microsoft could come up with something so byzantine and prone to
silent failure
This commit is contained in:
Kovid Goyal 2022-07-11 13:13:27 +05:30
parent 424f0b8cc6
commit 55b3cfaf12
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -56,34 +56,26 @@ DESCRIPTIONS = {
'calibre-file-dialog': 'Helper program to show file open/save dialogs', 'calibre-file-dialog': 'Helper program to show file open/save dialogs',
} }
# https://msdn.microsoft.com/en-us/library/windows/desktop/dn481241(v=vs.85).aspx
SUPPORTED_OS = {
'w7': '{35138b9a-5d96-4fbd-8e2d-a2440225f93a}',
'w8': '{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}',
'w81': '{1f676c76-80e1-4239-95bb-83d0f6d0da78}',
'w10': '{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}',
}
EXE_MANIFEST = '''\ EXE_MANIFEST = '''\
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> <application xmlns="urn:schemas-microsoft-com:asm.v3">
<security> <windowsSettings> <longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware> </windowsSettings>
<requestedPrivileges> </application>
<requestedExecutionLevel level="asInvoker" uiAccess="false" /> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
</requestedPrivileges> <security>
</security> <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
</trustInfo> <requestedExecutionLevel level="asInvoker" uiAccess="false" />
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> </requestedPrivileges>
<application xmlns="urn:schemas-microsoft-com:asm.v3"> </security>
<supportedOS Id="{w10}"/> </trustInfo>
<windowsSettings xmlns:ws2="http://schemas.microsoft.com/SMI/2016/WindowsSettings"> <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<ws2:longPathAware>true</ws2:longPathAware> <application>
</windowsSettings> <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
</application> </application>
</compatibility> </compatibility>
</assembly> </assembly>
'''.format(**SUPPORTED_OS) '''
def printf(*args, **kw): def printf(*args, **kw):