compiler for KDE on Windows

Ralf Habacker ralf.habacker at freenet.de
Thu May 7 08:59:53 CEST 2009


Ralf Habacker schrieb:
> Christian Ehrlicher schrieb:
>   
>>> Von: Bernhard Reiter
>>> On Tuesday 05 May 2009, Christian Ehrlicher wrote:
>>>     
>>>       
>>>> I'm thinking about dropping msvc2005 for kde4.4. Don't know what to do
>>>> about mingw though...
>>>>       
>>>>         
>>> I have an interest of keeping mingw.
>>>
>>> The reason is that it can be controlled better as
>>> it is Free Software and that it enables cross-compilation.
>>> Cross compilation is important as it makes it easier to automate
>>> a test and build process, including the necessary steps to compile the 
>>> matching source code for each distributable binary.
>>>
>>>     
>>>       
>> The problem with mingw (3.4.x and 4.x) is that they don't support the crappy manifest things and we need to build something around this. Maybe with a custom PRE_BUILD command or something. But someone has to figure it out...
>>
>> So we need a small tool which
>> - reads the current manifest resource (so we could also use it for msvc2005 which already adds a small manifest but which is not enough)
>> - modifies it to accomplish with Vista and up
>> - writes it back to the executable/library
>> I tested this already (manually) and vista accepted my modified manifest and executed update_mime_database without asking the user :)
>>
>> If someone knows how to read resources from executables (and maybe has a working example) let me know...
>>   
>>     
> http://www.codeproject.com/KB/cpp/dynares.aspx may help.
>   
In the kdewin32 package there is an initial version of a manifest 
extractor/update tool like msvc's mt see kdesupport/kdewin32/tools/mt.

Another approach is by using windres from the mingw tool chain. It is 
possible out of the box to compile a rc file containing a manifest 
definition into a res file which could be linked into a target. See the 
following example:

--------test.manifest start --------
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
 <assemblyIdentity
  version="1.0.0.0"
  processorArchitecture="X86"
  name="Ecofinance.Displayclient.Owdisp"
  type="win32"
 />
 
 <description>OWIL Displayclient</description>
 <dependency>
  <dependentAssembly>
   <assemblyIdentity
    type="win32"
    name="Microsoft.Windows.Common-Controls"
    version="6.0.0.0"
    processorArchitecture="X86"
    publicKeyToken="6595b64144ccf1df"
    language="*"
   />
  </dependentAssembly>
 </dependency>
</assembly>

--------test.manifest end--------


--------test.rc start --------
#include "winuser.h"

CREATEPROCESS_MANIFEST_RESOURCE_ID   RT_MANIFEST    "test.manifest"
--------test.rc end --------

With this files the related .res file could be created with the 
following command line:

windres --inpout-format=rc  --input=test.rc  --output-format res 
--output=test.res


@Christian: Which informations are exactly required in the manifest - 
are the trustInfo/security stuff enough ? It is only required to provide 
executables with a manifest resource or is it also required to add a 
manifest to dll's ?


Regards
Ralf




More information about the Kde-windows mailing list