delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/06/18/14:14:43

X-Recipient: archive-cygwin AT delorie DOT 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 AT users DOT sourceforge DOT 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 AT cygwin DOT com
Subject: Re: UAC .manifest files
References: <4A25FA67 DOT 4050805 AT users DOT sourceforge DOT net> <20090603081102 DOT GI23519 AT calimero DOT vinschen DOT de> <h074af$kjd$1 AT ger DOT gmane DOT org> <20090604082551 DOT GB29270 AT calimero DOT vinschen DOT de> <20090604113038 DOT GF21472 AT trikaliotis DOT net> <4A27C9DA DOT 5020609 AT cwilson DOT fastmail DOT fm> <4A27E612 DOT 2030400 AT users DOT sourceforge DOT net> <4A27F23C DOT 50508 AT gmail DOT com> <4A3A63C5 DOT 1030403 AT users DOT sourceforge DOT net>
In-Reply-To: <4A3A63C5.1030403@users.sourceforge.net>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT 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--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019