Ilya

first of all: THANKS!

> This issue is explained in MSDN in section about SxS - Side by
> Side Components.  I've attached patch against current
> GvimExt/gvimext.rc that would make resource compiler add manifest
> inside generated DLL - this is what is required to make it run on
> WinXP SP2 and Win2k3.
> 
I first tried your patch, but then the resource compiler complained
he couldn't find a file named "winres.h". I then restored the
original files, applied the following patch to your patch, and then
applied your patch again. This was a full success! The dll now
worked! The patch that I had to apply to your patch was: Change the
names winres.h <--> winresrc.h:


*** gvimext.rc.patch.orig       2006-05-30 14:34:24.269676800 +0200
--- gvimext.rc.patch    2006-05-30 13:46:16.937897600 +0200
***************
*** 15,19 ****
  + #if defined(__BORLANDC__) || defined(__CYGWIN32__) ||
defined(__MINGW32__)
- + # include <winresrc.h>
- + #else
  + # include <winres.h>
  + #endif
--- 15,19 ----
  + #if defined(__BORLANDC__) || defined(__CYGWIN32__) ||
defined(__MINGW32__)
  + # include <winres.h>
+ + #else
+ + # include <winresrc.h>
  + #endif


But in spite of this success, I was not yet fully satisfied. (Yes, I
know, I have high demands): The linker itself creates a
gvimext.dll.manifest file, and I would like to use that one, but
only if it is present. Now, thank to your hint, I now that embedding
the manifest into the resources of a dll is THE solution! Therefore,
I restored the code to its original state (without applying any
patches).

>> Then I tried
>>
>> mt -outputresource:gvimext.dll -manifest gvimext.dll.manifest
>>
>> to include the dll into the resources of gvimext.dll. That helped
>> nothing.
>>   
> To include the manifest as a resource into the dll?  I don't know 
> exactly why this was not working for you.
>
Because it was not the right command -- but it was almost right.
Today, I tried (again without you patch):

mt -manifest gvimext.dll.manifest -outputresource:gvimext.dll;2

This worked again! Now I am happy because it is enough to add only
one single line to the original Makefile in order to make it work
also for the new version of the Microsoft Visual Studio:

if exist gvimext.dll.manifest do "the above command".

> This issue is explained in MSDN in section about SxS - Side by
> Side Components.
> 
Thanks again! That leaded me to the correct command:

http://msdn2.microsoft.com/en-us/library/ms235591(VS.80).aspx

With best regards

Mathias Michaelis

Reply via email to