PDA

View Full Version : No Manifest



Lele
20th August 2007, 10:07
Hi all,
is there a way to specify that I don't want to use a manifest for my window app?
Having MANIFESTFILE:NO.
I tried CONFIG += embed_manifest_exe but I'd need to avoid using the manifest.
I checked that doc but I couldn't find.
thanks for any help in advance

bye

wysota
20th August 2007, 10:50
What is the reason for avoiding a manifest?

Lele
20th August 2007, 10:57
thanks for answering,

well to mkae sure there are no incompatibility
myapp.exe.manifest
and
Microsoft.VC80.CRT.manifest

using embed_manifest_exe, I don't have any change in the use of the Manifest, because cheking the generated project in the linker settings it keeps using
/MANIFEST /MANIFESTFILE:"..\.tmp\myapp\obj_release\\myapp.exe.intermediate. manifest"

wysota
20th August 2007, 11:02
If you won't use the manifest generated by Qt for your application, how do you expect the application to work? Get rid of the Microsoft manifest and use the one provided by Qt if you expect incompatibilities.

Lele
20th August 2007, 11:17
thanks again,
so you suggest to use embed_manifest_exe option in the pro file?
What I found is that the myapp.exe.intermediate.manifest used (with or without embed_manifest_exe option) has a wrong version...

Lele
20th August 2007, 11:54
So, my question is :
is there a way to avoid embedding the intermediate manifest ancd then specify a myapp.manifest as a separate file?
So something in the pro that will make the generated visual studio solution with
/MANIFEST:NO

thanks again

wysota
20th August 2007, 13:31
What happens if you compile your project only with qmake and nmake (without using Visual Studio at all)?

Lele
20th August 2007, 14:20
I got the manifest embedded the same, I can see with a resource editor and I can manually remove it, but I'd like to do that during the normal compilation.
thanks

wysota
20th August 2007, 15:04
What do you mean by "normal compilation"? If you mess with Visual Studio then it has nothing to do with Qt, so doing any changes within qmake project won't make a difference.

Lele
20th August 2007, 15:27
No mess, just generate the project from the .pro file and then build.
I'd only need a way to put
/MANIFESTFILE:NO
in the Linking options, and I thought this could be done in the .pro file, probably is a default Visual Studio settings...
Don't know how to change it anyway...

jpn
20th August 2007, 16:01
Try adding:

QMAKE_LFLAGS += /MANIFESTFILE:NO
(or QMAKE_LFLAGS_RELEASE) to your .pro file.

Lele
20th August 2007, 16:16
thanks, I tried that, but the manifest is embedded the same.
I see in the additional options /MANIFESTFILE:NO but in the "All options" there's /MANIFEST /MANIFESTFILE:"..\.tmp\beta\obj_release\\beta.exe.intermediate.ma nifest

Lele
20th August 2007, 17:59
I even tried to remove
embed_manifest_dll
embed_manifest_exe
in file qmake.conf in folder Qt\4.3.0\mkspecs\win32-msvc2005 but the manifest is generated the same....

any idea?

thanks

wysota
20th August 2007, 19:19
But WHY do you want to remove the manifest in the first place? As far as I know it's required for your application to run.

Lele
20th August 2007, 20:28
you can specify it in a separate file not embedded

wysota
20th August 2007, 22:34
But what is the point of doing that? I mean why in this particular case you want to avoid embedding the manifest? (I assume you already tried CONFIG-=embed_manifest_exe).

Lele
21st August 2007, 09:17
Yes I tried CONFIG-=embed_manifest_exe and the manifest is generated the same.
I managed to replace the default manifest by using mt.exe, but it would be better to have the chance to do that from the pro file.
Apparently CONFIG-=embed_manifest_exe doesn't work, qt bug?
thanks

wysota
21st August 2007, 09:30
As far as I understand the whole concept, the manifest will always be generated. It's just a matter of embedding it into the binary or not. The docs say embed_manifest_exe is not turned on by default, so unless you turned it on yourself, it shouldn't be active (contrary to embed_manifest_dll).

Lele
21st August 2007, 10:07
ok, that's exactly what I'm saying.
I think that removing embed_manifest_exe should trigger /MANIFEST:NO in the soulution generated, but it's not like that.

wysota
21st August 2007, 10:12
I say you don't have to remove it, just don't add it... It's not turned on by default. I asked you to run plain qmake, nmake combination (without going through VS solution) at the beginning to see if everything works fine. You can even make a new project from scratch (qmake -project) first to make sure no alien directives are placed into the project file. In this case the manifest shouldn't be embedded (at least according to the docs), but it should get generated (which seems fine).

And please, could you say WHY you want to get rid of the manifest generated by Qt?

BTW. The manifest is generated by qmake according to these rules:

win32-msvc2005:!equals(TEMPLATE_PREFIX, "vc"):equals(TEMPLATE, "app") {
QMAKE_LFLAGS += $$quote(/MANIFESTFILE:\"$${OBJECTS_DIR}\\$${TARGET}.intermediate.manifest\")
QMAKE_PREV_POST_LINK = $$QMAKE_POST_LINK
QMAKE_POST_LINK = $$quote(mt.exe -nologo -manifest \"$${OBJECTS_DIR}\\$${TARGET}.intermediate.manifest\" -outputresource: $(DESTDIR_TARGET);1$$escape_expand(\n\t))
QMAKE_POST_LINK += $$QMAKE_PREV_POST_LINK
}

You can remove the directive from the project file and add those of the above mentioned commands which you need directly into your project file.