Thread overview
Resource files
May 10, 2008
torhu
May 10, 2008
BCS
May 10, 2008
torhu
May 10, 2008
Bill Baxter
May 18, 2008
arnaud
May 21, 2008
jcc7
May 21, 2008
Heinz
May 21, 2008
Bill Baxter
May 21, 2008
arnaud
May 10, 2008
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?
May 10, 2008
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


May 10, 2008
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.
May 10, 2008
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
May 18, 2008
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"
		{
			VALUE "CompanyName", "cie"
			VALUE "FileVersion", "1"
			VALUE "FileDescription", "blabla"
			VALUE "InternalName", "blabla"
			VALUE "LegalCopyright", "blabla"
			VALUE "LegalTrademarks", "blabla"
			VALUE "OriginalFilename", "blabla"
			VALUE "ProductName", "blabla"
			VALUE "ProductVersion", "blabla"
		}
	}
	BLOCK "VarFileInfo"
	{
		VALUE "Translation", 0x040C, 1252
	}
}

What's the problem?
May 21, 2008
== Quote from arnaud (arnaud.versini@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
May 21, 2008
jcc7 Wrote:

> == Quote from arnaud (arnaud.versini@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.
May 21, 2008
jcc7 a écrit :
> == Quote from arnaud (arnaud.versini@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
Thanks, it's works
May 21, 2008
Heinz wrote:
> 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.

Ooh, didn't know that.  Thanks for the tip!

rc.exe probably comes with every version of Visual Studio, including the free MS VC Express Toolkit, since you can't make a real Windows app without a resource compiler.

I just didn't expect it would work with DMD's linker.  That's good news!

--bb