[fpc-devel] Enabling use of {$R *.dfm} on Windows

Sergei Gorelkin sergei_gorelkin at mail.ru
Sat Jul 28 05:02:08 CEST 2007


Here is a status update:

I tested the utility with binutils 2.16.91 under win32. It works when 
invoked as 'fpc -FCwindr <other options>'.

I've also made some modifications:
- windres name is hardcoded, but can be overriden by setting WINDRES 
environment variable;
- added checking extension of input files. By default, only .dfm, .xfm, 
.lfm and .mfm are recognized as component streams, but this list can be 
extended using DFMEXTS environment variable. If set, it must contain 
semicolon-separated list of extensions, e.g. DFMEXTS=ex1;ex2;ex3
- if '-O res' is given in the commandline and input file is a component 
stream, it writes .res file directly, without involving windres.


I also investigated win64/gorc in more details. It appears that gorc 
'/machine' switch applies only to .o files, not to .res. Also there is 
no difference between .res files generated from the same source by 
windres and gorc. So it should be possible to switch resource compiling 
for win64 to windres by changing res_win64_gorc_info.rcbin and 
res_win64_gorc_info.rccmd to the values used in res_gnu_windres_info - 
then the utility will be supported for win64 without any further efforts.

My next task is to investigate cross-compiling issues...

Sergei
-------------- next part --------------
A non-text attachment was scrubbed...
Name: windr.zip
Type: application/x-zip-compressed
Size: 3306 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20070728/3a103ea4/attachment.bin>


More information about the fpc-devel mailing list