Results 1 to 5 of 5

Thread: win32, how to modify the manifest with qmake?

  1. #1
    Join Date
    Jan 2008
    Posts
    10
    Thanked 2 Times in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default win32, how to modify the manifest with qmake?

    Hi Qtlers..

    I'm trying to build an app on win32 using visual studio express 2008 and qt 4.6.2 that needs to have the "Run as Administrator" bit set in the executable. This will require change of the manifest file... instead of <requestedExecutionLevel level="asInvoker" uiAccess="false" /> you have to put <requestedExecutionLevel level="requireAdministrator" uiAccess="false" />.

    I can change this from within Visual Studio Express by going to Project Properties under Configuration Properties -> Linker -> Manifest File and then selecting "requireAdministrator" in "UAC Execution Level", but is there a way to do this automagically with qmake?

    I've searched through the source code to find both asInvoker and requireAdministrator so I dont think it's a trivial switch..

    Thanks,

    Andres

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: win32, how to modify the manifest with qmake?

    There is no direct support for that in QMake.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jan 2008
    Posts
    10
    Thanked 2 Times in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: win32, how to modify the manifest with qmake?

    no direct support, true, but the following appears to work:

    QMAKE_LFLAGS += /MANIFESTUAC:\"level=\'requireAdministrator\' uiAccess=\'false\'\"

    cheers.
    Andres

  4. #4
    Join Date
    Jan 2008
    Posts
    10
    Thanked 2 Times in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: win32, how to modify the manifest with qmake?

    further to that message.. in Qt 4.8.2 (not sure about other Qt 4.8 versions) you have to do:

    win32 {
    CONFIG += embed_manifest_exe
    QMAKE_LFLAGS_WINDOWS += /MANIFESTUAC:level=\'requireAdministrator\'
    }

    reason is that in msvc_objectmodel.cpp the options are parsed curiously.. so the double quotes in my previous post make qmake generate create wrong options.

  5. The following 2 users say thank you to andres for this useful post:

    kosasker (2nd January 2013), rawfool (13th August 2013)

  6. #5
    Join Date
    Jul 2012
    Location
    Singapore
    Posts
    7
    Thanks
    3
    Qt products
    Qt3
    Platforms
    Windows Symbian S60

    Default Re: win32, how to modify the manifest with qmake?

    I don not understand.....What is your meaning...

Similar Threads

  1. Replies: 2
    Last Post: 31st October 2009, 03:41
  2. mscvr90.dll and manifest in QT
    By smrtak in forum Qt Programming
    Replies: 0
    Last Post: 27th February 2009, 09:44
  3. can't create qmake when installing at windows XP with win32-g++
    By owen_263 in forum Installation and Deployment
    Replies: 4
    Last Post: 31st March 2008, 07:39
  4. No Manifest
    By Lele in forum Qt Programming
    Replies: 19
    Last Post: 21st August 2007, 09:12
  5. Win32 qmake: building a static library
    By Amanda in forum Qt Programming
    Replies: 5
    Last Post: 8th November 2006, 19:32

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.