View Issue Details

IDProjectCategoryView StatusLast Update
0024482FPCUtilitiespublic2020-09-28 23:01
ReporterReinier OlislagersAssigned ToSven Barth  
Status resolvedResolutionfixed 
Platformx64 (with x86 compiler)OSWindows 
Product Version2.7.1 
Fixed in Version3.3.1 
Summary0024482: [Feature request] Expand fpcres with resource compiler feature
Descriptionfcl-res provides resource management capability, including support for binary executables and .res files.

fpcres could be expanded to work as a resource compiler: e.g. go from a .rc resource script to res/object file.
An additional bonus would be that it would allow better interoperability with tools that generate .rc files

- cross platform (if platforms do not support "real" resources, fcl-res could write out a .res file and the fpc resources code could be modified to look for that .res if no resources are found in the executable)
- pure Pascal, distributed with FPC, losing an external dependency

For this to work, fcl-res will need to be expanded with a
- resource reader for .rc scripts (+ the referenced files)
- resource writer for .rc scripts (+ writing the resources as files) - optional but useful for testing and using fpcres as resource decompiler
- modifications in the fpc code that calls the resource compiler so it uses fcl-res when needed

- test that uses fpcres to compile a resource, extracts the resource and compares them
- previously mentioned code to read .res files as resources if necessary
Additional InformationWhile a resource compiler is included in the Windows FPC installers, FPC devs/maintainers do not want mingw binutils (containing the windres) resource compiler as a dependency for e.g. Debian
see thread
and issue 23092

Specs for .rc format - note we only need a subset that covers FPC usage:
TagsNo tags attached.
Fixed in Revision46397
Attached Files


has duplicate 0024544 resolvedJonas Maebe [feature request] FPC doesn't have its own RC compiler 


Sven Barth

2013-05-26 15:27

manager   ~0067878

This idea is around since resources were implemented in 2.3.1. No one had the time to do this though, so the usual statement applies: patches are welcome. :)


Flávio Etrusco

2013-06-04 09:50

reporter   ~0068035

Last edited: 2013-06-04 09:51

View 2 revisions

Maybe this is of some use:

Unfortunately, and strangely, the writing&reading of resourcefiles seems to be the least document class and doesn't even include a license header :-/

Paul Ishenin

2013-09-17 10:42

developer   ~0070133

There are no problems with manipulating of resources inside *.res files. We already have a good fpc package for that and Lazarus already uses it facilities.

The problem is to write a good *.rc file parser. I already started one few years ago. I will try to find and attach it sources here.

Paul Ishenin

2013-09-17 10:57

developer (9,961 bytes)

Reinier Olislagers

2013-09-17 11:39

developer   ~0070135

Thanks, Paul.
Have meanwhile been working on "resource writer for .rc scripts (+ writing the resources as files)"; will now try to incorporate Paul's .rc parser code to get "resource reader for .rc scripts (+ the referenced files)"
Current code at directory resource.

Will report with workable patch or requests for help. Thanks.

Sven Barth

2020-09-28 23:01

manager   ~0125946

fpcres supports parsing of RC files now, so I'm resolving this. :)

Issue History

Date Modified Username Field Change
2013-05-26 11:57 Reinier Olislagers New Issue
2013-05-26 15:27 Sven Barth Note Added: 0067878
2013-05-27 09:10 Reinier Olislagers Additional Information Updated View Revisions
2013-06-03 17:50 Jonas Maebe Relationship added has duplicate 0024544
2013-06-04 09:50 Flávio Etrusco Note Added: 0068035
2013-06-04 09:51 Flávio Etrusco Note Edited: 0068035 View Revisions
2013-09-17 10:42 Paul Ishenin Note Added: 0070133
2013-09-17 10:57 Paul Ishenin File Added:
2013-09-17 11:39 Reinier Olislagers Note Added: 0070135
2014-09-17 19:55 Marco van de Voort Severity minor => feature
2020-09-28 23:01 Sven Barth Assigned To => Sven Barth
2020-09-28 23:01 Sven Barth Status new => resolved
2020-09-28 23:01 Sven Barth Resolution open => fixed
2020-09-28 23:01 Sven Barth Fixed in Version => 3.3.1
2020-09-28 23:01 Sven Barth Fixed in Revision => 46397
2020-09-28 23:01 Sven Barth FPCTarget => -
2020-09-28 23:01 Sven Barth Note Added: 0125946