multiple manifest files Topic is solved

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
El_isra
Experienced Solver
Experienced Solver
Posts: 50
Joined: Tue Apr 13, 2021 1:10 am
Location: Buenos Aires, Argentina
Contact:

multiple manifest files

Post by El_isra »

Hi.

how can I use multiple manifest files on the same program?

i'm trying to add an extra manifest to auto request admin privileges for my program (wich needs them to function)
i'm using
Compiler: TDM-GCC 10.3.0 (both 32bit and 64bit versions)
IDE: Code::Blocks
wxwidget: 3.0.5 Unicode, Monolithic, static, release.

the solution so far was to add it into a separated rc file, but this does not work when I compile the program with the 64bit compiler...

any idea why is this happening?
How can I merge both rc files into one? (i've seen this is not a good practice)

when I move the definition of my manifest file to the main .rc it complains of redefinition of 1 value.

here is the rc file
The second one is literally this:

Code: Select all


1        RT_MANIFEST    "manifest.bin"
User avatar
doublemax
Moderator
Moderator
Posts: 19116
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: multiple manifest files

Post by doublemax »

If you #define wxUSE_NO_MANIFEST to 1 before including "wx/msw/wx.rc" you disable wxWidgets' own manifest. Then you can provide your own, complete manifest.
Use the source, Luke!
El_isra
Experienced Solver
Experienced Solver
Posts: 50
Joined: Tue Apr 13, 2021 1:10 am
Location: Buenos Aires, Argentina
Contact:

Re: multiple manifest files

Post by El_isra »

doublemax wrote: Sun Jan 29, 2023 8:09 am If you #define wxUSE_NO_MANIFEST to 1 before including "wx/msw/wx.rc" you disable wxWidgets' own manifest. Then you can provide your own, complete manifest.
Tested it and still same issue...

Could this be related to the windres version provided on tdm-gcc?

the 32bit compiler has windres 2.32
while the 64bit one has windres 2.36.1
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4193
Joined: Sun Jan 03, 2010 5:45 pm

Re: multiple manifest files

Post by PB »

Did you check the build log to make sure the define was properly passed to the resource compiler?

AFAIK, C::B does not pass the C++ defines to the resource compiler, these need to be defined in the build target's Project / Compiler settings / Other resource compiler options
cb-windres-def.png
cb-windres-def.png (18.64 KiB) Viewed 1004 times
and can be seen in the resource compiler command line, e.g. like this
windres.exe -ID:\Dev\Desktop\!Lib\wxWidgets-3.2.1\include -ID:\Dev\Desktop\!Lib\wxWidgets-3.2.1\lib\gcc_dll-x64\mswud -DwxUSE_NO_MANIFEST=1 -J rc -O coff -i C:\dev\cb-tests\test321\resource.rc -o obj\Debug\resource.res
I would also make sure the new manifest includes all necessary information, such as the common controls or DPI-awareness compatibility.
El_isra
Experienced Solver
Experienced Solver
Posts: 50
Joined: Tue Apr 13, 2021 1:10 am
Location: Buenos Aires, Argentina
Contact:

Re: multiple manifest files

Post by El_isra »

PB wrote: Sun Jan 29, 2023 5:30 pm Did you check the build log to make sure the define was properly passed to the resource compiler?

AFAIK, C::B does not pass the C++ defines to the resource compiler, these need to be defined in the build target's Project / Compiler settings / Other resource compiler options
cb-windres-def.png
and can be seen in the resource compiler command line, e.g. like this
windres.exe -ID:\Dev\Desktop\!Lib\wxWidgets-3.2.1\include -ID:\Dev\Desktop\!Lib\wxWidgets-3.2.1\lib\gcc_dll-x64\mswud -DwxUSE_NO_MANIFEST=1 -J rc -O coff -i C:\dev\cb-tests\test321\resource.rc -o obj\Debug\resource.res
I would also make sure the new manifest includes all necessary information, such as the common controls or DPI-awareness compatibility.
the macro was properly defined.

the issue was the manifest..

i've successfully merged the admin privileges node into wxwdigets stock manifest files files.

to anyone looking to make wxwidgets programs auto request admin privs. here are the manifest files:
https://github.com/israpps/HDL-Batch-in ... C/manifest
and of course copied the preprocessor conditions for those manifest
https://github.com/israpps/HDL-Batch-in ... e.rc#L2-L3
https://github.com/israpps/HDL-Batch-in ... .rc#L7-L32
Post Reply