X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 	tests=AWL,BAYES_00,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <4A3A8401.2050309@users.sourceforge.net>
Date: Thu, 18 Jun 2009 13:14:25 -0500
From: "Yaakov (Cygwin/X)" <yselkowitz@users.sourceforge.net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1b3pre) Gecko/20090223 Thunderbird/3.0b2
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: UAC .manifest files
References: <4A25FA67.4050805@users.sourceforge.net> <20090603081102.GI23519@calimero.vinschen.de> <h074af$kjd$1@ger.gmane.org> <20090604082551.GB29270@calimero.vinschen.de> <20090604113038.GF21472@trikaliotis.net> <4A27C9DA.5020609@cwilson.fastmail.fm> <4A27E612.2030400@users.sourceforge.net> <4A27F23C.50508@gmail.com> <4A3A63C5.1030403@users.sourceforge.net>
In-Reply-To: <4A3A63C5.1030403@users.sourceforge.net>
Content-Type: multipart/mixed;  boundary="------------060200060209090704000706"
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

--------------060200060209090704000706
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

On 18/06/2009 10:56, Yaakov (Cygwin/X) wrote:
> Since I already have a libtool patch pending, I'll see if I can fix this
> as well.

Here's a patch.  Chuck?


Yaakov

--------------060200060209090704000706
Content-Type: text/x-patch;
 name="2.2.7a-uac-manifest.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="2.2.7a-uac-manifest.patch"

--- origsrc/libtool-2.2.7a/libltdl/config/ltmain.m4sh	2009-06-15 00:06:10.000000000 -0500
+++ src/libtool-2.2.7a/libltdl/config/ltmain.m4sh	2009-06-18 11:49:49.913954500 -0500
@@ -3748,6 +3748,32 @@ EOF
 }
 # end: func_emit_cwrapperexe_src
 
+# func_emit_exe_manifest
+# emit a Win32 UAC manifest for executable on stdout
+# Must ONLY be called from within func_mode_link because
+# it depends on a number of variable set therein.
+func_emit_exe_manifest()
+{
+    cat <<EOF
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+  <assemblyIdentity version="1.0.0.0"
+     processorArchitecture="X86"
+     name="$host_os.$PROGRAM.$outputname"
+     type="win32"/>
+
+  <!-- Identify the application security requirements. -->
+  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
+    <security>
+      <requestedPrivileges>
+        <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
+      </requestedPrivileges>
+    </security>
+  </trustInfo>
+</assembly>
+EOF
+}
+
 # func_win32_import_lib_p ARG
 # True if ARG is an import lib, as indicated by $file_magic_cmd
 func_win32_import_lib_p ()
@@ -7578,6 +7604,13 @@ EOF
 	    $opt_dry_run || {
 	      # note: this script will not be executed, so do not chmod.
 	      if test "x$build" = "x$host" ; then
+		# Create the UAC manifests first if necessary
+		case $output_name in
+		  *instal*|*patch*|*setup*|*update*)
+		    func_emit_exe_manifest > $cwrapper.manifest
+		    func_emit_exe_manifest > $output_path/$objdir/$output_name.exe.manifest
+		  ;;
+		esac
 		$cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
 	      else
 		func_emit_wrapper no > $func_ltwrapper_scriptname_result


--------------060200060209090704000706
Content-Type: text/plain; charset=us-ascii

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/
--------------060200060209090704000706--
