Resource files

Heinz malagana15 at yahoo.es
Wed May 21 13:29:50 PDT 2008


jcc7 Wrote:

> == Quote from arnaud (arnaud.versini at gmail.com)'s article
> > Bill Baxter a écrit :
> > > torhu wrote:
> > >> BCS wrote:
> > >>> Reply to torhu,
> > >>>
> > >>>> I'm looking for info how to create resource files for use with dmd.
> > >>>> Do they use the same format as Microsoft's files?  Any good doc links?
> > >>>>
> > >>>
> > >>> http://www.digitalmars.com/ctg/rcc.html
> > >>
> > >> I know about rcc.exe, that page doesn't help me at all.
> > >
> > > What is it you want then?  The only connection between dmd and Windows
> > > resource files is that you can compile one with rcc and link it into
> > > your exe with dmd.
> > >
> > > RCC is stuck a few steps behind current Windows standards.  Namely, it
> > > does not support large, PNG-compressed Vista icons.  I filed a bug for
> > > it a while back. Maybe that's the kind of info you were looking for?
> > >
> > > --bb
> > digital mars RCC.exe is compatible with microsoft rcc? This RC file
> > doesn't compile with digital mars, but compil with MinGW or VS.
> > #include <windows.h>
> > 2 24 "rename.exe.manifest"
> > // include for version info constants
> > 1 VERSIONINFO
> > FILEVERSION 0,1,0,0
> > PRODUCTVERSION 0,1,0,0
> > FILETYPE VFT_APP
> > {
> > 	BLOCK "StringFileInfo"
> > 	{
> > 		BLOCK "040C04E4"
> > 		{
> 
> 
> I don't know. Perhaps RCC requires "BEGIN" and "END" instead of "{" and "}".
> 
> 
> (Below is an example of a file that Digital Mars' RCC compiled for me.)
> 
> #include "resource.h"
> 
> 1000 ICON MOVEABLE PURE LOADONCALL DISCARDABLE pgmIcon
> 1 VERSIONINFO
> FILEVERSION    pgmMajVer, pgmMinVer, pgmBuild, 0
> PRODUCTVERSION pgmMajVer, pgmMajVer, pgmBuild, 0
> FILEOS 0x4
> FILETYPE 0x1
> BEGIN
> BLOCK "StringFileInfo"
> BEGIN
> 	BLOCK "040904B0"
> 	BEGIN
>         VALUE "LegalCopyright", pgmCopyright
>         VALUE "FileDescription",  pgmFileDescription
> 		VALUE "Author", "John Doe"
> 		VALUE "CompanyName", pgmCompanyName
> 		VALUE "ProductName", pgmTitle
> 		VALUE "FileVersion", pgmVersion
> 		VALUE "ProductVersion", pgmVersion
> 		VALUE "InternalName", pgmInternalName
> 		VALUE "OriginalFilename", pgmOriginalFilename
> 	END
> END
> 
> BLOCK "VarFileInfo"
> BEGIN
> 	VALUE "Translation", 0x0409,  0x04B0 //0x0409 0x04B0
> END
> END

I use rc.exe (Microsoft Resource Compiler). It comes bundled in every VS6 product CD (VB6, VC++6, etc). If you have purchased a VS product in the past then explore the CD and you'll find this utility under tools or common (i don't remember).

MS RC doesn't have problems at all with big pngs and works perfect with the digital mars linker.


More information about the Digitalmars-d-learn mailing list