Subject: Re: B20: Bug in windres???
From: [email-masked] (Charles Wilson)

6 Dec 1998 07:48:12 -0800
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
To: Jens Yllman <[email-masked]>
Cc: [email-masked]

Jens -
    Did you ever get an answer to this question? I'm using a .rc file that
works fine with Mickeysoft tools, but with windres, my executable has the
icons, and a _blank_ version properties page. I'm pretty sure it's a bug in
windres, since I did the following experiment:

ALL MICKEYSOFT:
run.rc --(using rc.exe from MS)--> run.res
run.c --(using cl.exe from MS)--> run.obj
run.obj + run.res --(using cl.exe from MS)--> run.exe
This version has icons + a filled in version properties page.

ALL CYGWIN:
run.rc --(using windres)--> run_res.o
run.c --(using gcc)--> run.o
run.o + run_res.o --(using "gcc -mwindows -e _mainCRTStartup run.o run_res.o
-o run.exe")--> run.exe
This version has icons but a blank version properties page.

MIXED 1:
run.rc --(using windres)--> run_windres.res  <<< forced windres to generate
a .res file >>>
run.c --(using cl.exe from MS)--> run.obj
run.obj + run_windres.res --(using cl.exe from MS)--> run.exe
This version has icons but a blank version properties page.

MIXED 2:
couldn't do this (use rc.exe to generate .res file, and then use gcc to
build run.o and run.exe) because gcc doesn't grok .res files. I tried using
res2coff, but res2coff doesn't grok "Named resource types" (????) If I could
do this experiment, and the result was a working run.exe with icons AND
filled in versions properties page, then the conclusion below would be
proven. Right now it's just a strong suspicion.

Anyway, the conclusion I draw is that (1) it's not the linker (cl vs. gcc)
(2) it is the resource compiler (rc vs. windres) that is the problem.

Any thoughts?

--Chuck Wilson

---------RC FILE--------

run ICON PRELOAD "run.ico"
rxvt ICON "rxvt.ico"
XEmacs ICON "xemacs.ico"
XEmacsFile ICON "File.ico"
XEmacsLisp ICON "Lisp.ico"

#include <windows.h>
#include "run.h"

1 VERSIONINFO
FILEVERSION 1, 1, 3, 0
PRODUCTVERSION 1, 1, 3, 0
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_APP
FILESUBTYPE 0
BEGIN
 BLOCK "StringFileInfo"
 BEGIN
  BLOCK "04090000"
  BEGIN
   VALUE "CompanyName", "Charles S. Wilson\000"
   VALUE "FileDescription", "Runs console-mode programs sans console.\000"
   VALUE "FileVersion", "1.1.3\000"
   VALUE "InternalName", "run\000"
   VALUE "LegalCopyright", "Copyright © 1988 Charles S. Wilson\000"
   VALUE "OriginalFilename", "run.exe\000"
   VALUE "ProductName","run\000"
   VALUE "ProductVersion","1.1.3\000"
   VALUE "GPL Copyleft", "Released under the GNU General Public License
version 2\000"
  END
 END
END

--------END RC FILE----------

Jens Yllman wrote:

>  Hello,
>
>  I have a problem with windres. I "compile" a .rc that looks like this:
>
> #include <windows.h>
>
> #define VERSIONINFO_1   1
>
> VERSIONINFO_1 VERSIONINFO
> FILEVERSION 0, 1, 0, 0
> PRODUCTVERSION 0, 1, 0, 0
> FILEOS VOS_NT_WINDOWS32
> FILETYPE VFT_APP
> BEGIN
>  BLOCK "StringFileInfo"
>  BEGIN
>   BLOCK "041d04b0"
>   BEGIN
>    VALUE "CompanyName", "Jens Yllman\0"
>    VALUE "FileDescription", "A small wallpaper changer.\0"
>    VALUE "FileVersion", "0.1\0"
>    VALUE "InternalName", "swwall\0"
>    VALUE "LegalCopyright", "Copyright © Jens Yllman 1998\0"
>    VALUE "OriginalFilename", "swwall.exe\0"
>   END
>  END
>
>  BLOCK "VarFileInfo"
>  BEGIN
>   VALUE "Translation", 0x41d, 1200
>  END
> END
>
>  The command line I use look like this:
>
> windres -i ver.rc -o ver.o
>
>  And the "compile" seems do work ok. And when I link it to my .exe it
> works ok to. And when I do "properties" on the .exe in Explorer I now
> have a "Version" page. But this page does not contain the information I
> have put in the ver.rc. It is empty.
>
>  Anybody know how to get version info into you .exe using gnu-win32???
>
>  Or maybe someone know if this is a bug???
>
>  Jens Yllman

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".