On 03/06/2009 03:11, Corinna Vinschen wrote:
I never saw more than exactly this list.

Got it (and with "instal" with one L).

I don't know if it matters, but it certainly doesn't hurt either.  As a
suggestion, when automating this, the name could be constructed like
this:

   Organization=Cygwin
   Division=<packagename>
   Name=<executable>

As for why, IIRC you mentioned[1] before that the manifests are cached; I suppose the name= attribute would be used in the cached data, hence the requirement to be unique.

Some additional googling revealed that you also mentioned that the manifests need to be executable[2].

The attached patch is what I have in mind. It won't apply to SVN trunk yet due to other uncommitted patches in the queue, but I need to fix that soon to get a long-overdue release out the door. Anything else that I may not be aware of before I commit this?

[1] http://www.cygwin.com/ml/cygwin/2008-11/msg00163.html
[2] http://www.cygwin.com/ml/cygwin-apps/2008-08/msg00148.html


Yaakov
Index: bin/cygport.in
===================================================================
--- bin/cygport.in      (revision 6306)
+++ bin/cygport.in      (working copy)
@@ -1123,6 +1156,7 @@
 #      __prepinfo
 #      __prepman
 #      __prepstrip
+#      __prepuac
 #      __prepvargames
 #      __prep_empty_dirs
 #      __prep_libtool_modules
@@ -1371,13 +1419,8 @@
 
        # *.so: Apache2 modules, OCaml stublibs, Ruby modules
        # *.oct: Octave modules
-       for exe in $(find * -type f -name '*.dll' -o -name '*.exe' -o -name 
'*.so' -o -name '*.oct')
+       for exe in $(find * -type f -writable -a \( -name '*.dll' -o -name 
'*.exe' -o -name '*.so' -o -name '*.oct' \))
        do
-               if [ ! -w ${exe} ]
-               then
-                       continue
-               fi
-
                # OCaml bytecode must not be stripped
                # this test generates false positives with the ocaml core and
                # compilers, but should otherwise be accurate
@@ -1404,6 +1447,29 @@
        done
 }
 
+__prepuac() {
+       local exe exename;
+
+       cd ${D};
+
+       echo "Preparing executables for UAC:";
+
+       for exe in $(find * -type f -executable -a \( -name '*instal*.exe' -o 
-name '*patch*.exe' -o -name '*setup*.exe' -o -name '*update*.exe' \))
+       do
+               exename=${exe##*/};
+
+               # Mono assemblies may already include .manifest files.
+               if [ ! -e ${exe}.manifest ]
+               then
+                       echo "        ${exe}";
+                       sed -e "s|@PKGNAME@|${PN//.}|" \
+                               -e "s|@APPNAME@|${exename%.exe}|" \
+                               ${_privdatadir}/uac-manifest.in > 
${exe}.manifest
+                       chmod +x ${exe}.manifest
+               fi
+       done
+}
+
 __prep_symlinks() {
        local l l_src
 
@@ -1443,12 +1504,13 @@
        __prepvargames;
        __prep_empty_dirs;
        __prepstrip;
+       __prepuac;
        __prep_libtool_modules;
 }
 
 # protect functions
 readonly -f __prepdoc __prepetc __prepman __prepinfo __prepvargames 
__prep_empty_dirs \
-            __prepstrip __prep_symlinks __prep_libtool_modules __src_postinst
+            __prepstrip __prepuac __prep_symlinks __prep_libtool_modules 
__src_postinst
 
 
 
################################################################################
Index: data/Makefile.am
===================================================================
--- data/Makefile.am    (revision 6446)
+++ data/Makefile.am    (working copy)
@@ -1,4 +1,8 @@
-dist_pkgdata_DATA = cygport.nanorc mirrors sample.cygport
+dist_pkgdata_DATA = \
+       cygport.nanorc  \
+       mirrors                 \
+       sample.cygport  \
+       uac-manifest.in
 
 bashcompletiondir = /etc/bash_completion.d
 dist_bashcompletion_DATA = cygport-bash-completion
Index: data/uac-manifest.in
===================================================================
--- data/uac-manifest.in        (revision 0)
+++ data/uac-manifest.in        (revision 0)
@@ -0,0 +1,16 @@
+<?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="cygw...@pkgname@....@appname@"
+     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>

--
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/

Reply via email to