Embed manifest file to require administrator execution level with mingw32

后端 未结 2 1658
时光取名叫无心
时光取名叫无心 2021-02-20 15:13

I\'m cross compiling an application with i586-mingw32msvc under ubuntu.

I\'m having difficulties understanding how to embed a manifest file to require administrator exec

相关标签:
2条回答
  • 2021-02-20 15:30

    With regard to the magic voodoo numbers 1 and 24:

    1 24 "hello.exe.manifest"
    

    That line translates to somthing like this:

    ID_MANIFEST RT_MANIFEST "hello.exe.manifest"
    

    where those defines are as defined as follows:

    #define ID_MANIFEST 1
    #ifndef RT_MANIFEST
    #define RT_MANIFEST MAKEINTRESOURCE(24)
    #endif
    

    As shown above by the conditional wrappers, the RT_MANIFEST might already be defined and if you do a Google search for that RT_MANIFEST term you will find lots of hits with more details on what is going on.

    0 讨论(0)
  • 2021-02-20 15:32

    With some intense voodoo I got it to work with this on my hello.rc file:

    1 24 "hello.exe.manifest"
    

    Won't even search to know what the 24 is for (resource type manifest?!).. :-)

    0 讨论(0)
提交回复
热议问题