diff options
author | Joerg Bornemann <joerg.bornemann@digia.com> | 2014-01-22 15:32:53 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-28 14:34:49 +0100 |
commit | eef3c06603778b9c06a8295f5e11b17255b52bb7 (patch) | |
tree | b07ce9c202bb64920ac1d3db87bd2a00f60b5ff9 | |
parent | 546b9faa04845ca636203679a1ce29b6f3015335 (diff) | |
download | qttools-eef3c06603778b9c06a8295f5e11b17255b52bb7.tar.gz qttools-eef3c06603778b9c06a8295f5e11b17255b52bb7.tar.bz2 qttools-eef3c06603778b9c06a8295f5e11b17255b52bb7.zip |
make the MinGW build of lupdate work for non-admin users
Windows User Access Control thinks that lupdate is an installer,
because of the string "update" in the executable name.
MSVC automatically creates and embeds a manifest into the executable
to state that lupdate doesn't need admin rights.
For MinGW we now embed a handcrafted manifest.
[ChangeLog][lupdate] Fixed lupdate requiring admin rights when built
with MinGW.
Task-number: QTBUG-36369
Change-Id: I306ba4c13014f2e39fc5785bb90bacd951726ad4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
-rw-r--r-- | src/linguist/lupdate/lupdate.exe.manifest | 13 | ||||
-rw-r--r-- | src/linguist/lupdate/lupdate.pro | 4 | ||||
-rw-r--r-- | src/linguist/lupdate/lupdate.rc | 4 |
3 files changed, 21 insertions, 0 deletions
diff --git a/src/linguist/lupdate/lupdate.exe.manifest b/src/linguist/lupdate/lupdate.exe.manifest new file mode 100644 index 00000000..945d2899 --- /dev/null +++ b/src/linguist/lupdate/lupdate.exe.manifest @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> + <!-- Make sure Windows UAC does not believe lupdate is an installer. --> + <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> + <security> + <requestedPrivileges> + <requestedExecutionLevel + level="asInvoker" + uiAccess="false"/> + </requestedPrivileges> + </security> + </trustInfo> +</assembly> diff --git a/src/linguist/lupdate/lupdate.pro b/src/linguist/lupdate/lupdate.pro index bd67e49a..710fd9b1 100644 --- a/src/linguist/lupdate/lupdate.pro +++ b/src/linguist/lupdate/lupdate.pro @@ -29,6 +29,10 @@ HEADERS += \ lupdate.h \ ../shared/simtexth.h +mingw { + RC_FILE = lupdate.rc +} + qmake.name = QMAKE qmake.value = $$shell_path($$QMAKE_QMAKE) QT_TOOL_ENV += qmake diff --git a/src/linguist/lupdate/lupdate.rc b/src/linguist/lupdate/lupdate.rc new file mode 100644 index 00000000..45c49357 --- /dev/null +++ b/src/linguist/lupdate/lupdate.rc @@ -0,0 +1,4 @@ +#define RT_MANIFEST 24 +#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1 + +CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "lupdate.exe.manifest" |