Boost logo

Boost :

Subject: Re: [boost] Embedding manifest into the regression tests (was: [testers] [log] Problems with tests)
From: Sergey Cheban (s.cheban_at_[hidden])
Date: 2013-05-13 16:37:36


13.05.2013 21:50, Andrey Semashev пишет:

>> May be, it is reasonable to add the "/MANIFEST" to the linker options
>> explicitly.
> I know little about Windows manifests, but if I'm not mistaken,
> /manifestdependency describes the dependency to be put in the manifest and
> /MANIFEST only tells the linker to generate the .manifest file. If MSVC 10 and
> 11 removed their /manifestdependency then what should be put into the
> manifest?
The manifests are used for several puropses in Windows:
1. To specify the dependencies between components.
2. To specify the security level of the application.
3. To specify the compatibility level between the application and the
operating system.
4. To register the COM classes implemented in the assembly.

According to the MSDN
(http://msdn.microsoft.com/en-us/library/f2c0w594%28v=vs.80%29.aspx),
"if /MANIFEST is not specified and the linker is passed
/MANIFESTDEPENDENCY comments, a manifest file will be created".

If there are no /MANIFESTDEPENDENCY options and the /MANIFEST option is
specified, some manifest will be generated anyway. Its content will
depend on the /MANIFESTUAC linker option.

By default, the following manifest is generated:
=================================
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
   <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
     <security>
       <requestedPrivileges>
         <requestedExecutionLevel level='asInvoker' uiAccess='false' />
       </requestedPrivileges>
     </security>
   </trustInfo>
</assembly>
=================================

In msvc-9.0, the CRT contains the /manifestdependency comment, and so
the manifest is generated by default and bjam uses it. In msvc-10.0 and
msvc-11.0, the CRT does not contain the /manifestdependency comment, and
so the manifest is not generated by default.

Generally speaking, the modern windows application should have the
manifest inside. Otherwise, the modern versions of Windows will run it
in the compatibility mode (for example, they may guess the required
security level from the name of the executable file).

-- 
Best regards,
Sergey Cheban

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk