On Tue, 30 Jun 2009 16:23 +0200, "Ralf Wildenhues" wrote:
> * Charles Wilson wrote on Tue, Jun 30, 2009 at 02:05:47PM CEST:
> > * libltdl/config/ltmain.m4sh (func_emit_exe_manifest): New function.
> > (func_mode_link) [cygwin|mingw]: Create manifest files for wrapper
> > and target exe when target name matches heuristic that triggers
> > UAC problems for newer win32 OSs.

> Can you explain what the semantics for UAC files are (pointer is
> sufficient)?

On Vista and newer, applications whose names match certain patterns (yay
for security!) are automatically assumed to be installers, and when
launched trigger Vista's User Account Control (e.g. privilege elevation
prompt).  However, in many cases you don't WANT privelege elevation --
why should the BSD-flavor install.exe require Administrator privileges
when you do a "make install prefix=/home/my-stuff"?  So, you can add a
manifest file with the same name as the executable, following a
specified template [*], that suppresses the privelege elevation prompt.

These manifests need not be separate files.  MSVC provides a special
tool that can compile them into resource objects that are then linked in
to the executable (or DLL).  With binutils, you can instead create a
second file with the following content:

1 24 MOVEABLE PURE "<progname>.manifest"

and then

$ windres <progname>.rc <progname>.rc.o
$ ld -o <new-progname>.exe <progname>.exe <progname>.rc.o
$ mv <new-progname>.exe <progname>.exe

But that's overkill for the libtool cwrappers, and probably also for
most other executables...

http://cygwin.com/ml/cygwin/2006-12/msg00518.html (and thread)
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1020271&SiteID=1&mode=1
(and thread)

And remember, you only NEED manifests at all if your application's NAME
matches certain patterns that "look like" they might be installers.
Yeesh.

> Why does gcc but not msvc need them?

It does. cl.exe has a flag that causes it to automatically invoke the
MSVC manifest tool (mt? I forget), AND link the resulting object into
the target.  Peter's libtool patches exploit this functionality, which
is why he *doesn't* want libtool to create external xml manifests for
that toolchain.

> Can you convey the need for copyright assignment requirements for
> nontrivial patches?

[*] The bulk of the patch is a template: there is only one way to format
this manifest to accomplish the goal. Thus, the creative content of the
patch is about 7-8 lines, so it's still a (tiny change) IMO.  But IANAL,
so...

> Can you explain why automake should not need support for UAC files,
> and if it does need them, in what cases?  (Note I'm not asking you
> to write a patch.)

It probably should -- but the rules are very different, even require
different tools, depending on the toolchain in use. AND sometimes you
want external xml manifests, other times (if your toolchain supports it)
you want compiled-in resources.  AND you only ever need them if the
Windows version is Vista or above AND the target filename matches
certain patterns.  I'm not sure that we can yet formulate the correct
procedure, in order to codify it as "The Way" that automake should do
it.

This is why Yaakov took the easy way out: for the magic executable
names, just always create in-place external xml manifests and don't even
bother to install them -- because they are not always needed on the
destination system, even if they may be needed on the build system.
 
--
Chuck



Reply via email to