[Feature request] Expand fpcres with resource compiler feature
Original Reporter info from Mantis: BigChimp
-
Reporter name: Reinier Olislagers
Original Reporter info from Mantis: BigChimp
- Reporter name: Reinier Olislagers
Description:
fcl-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
Advantages:
- 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
Optionally:
- 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 information:
While 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
http://www.mail-archive.com/fpc-pascal@lists.freepascal.org/msg30191.html
and issue 23092
Specs for .rc format - note we only need a subset that covers FPC usage:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa381043%28v=vs.85%29.aspx
Mantis conversion info:
- Mantis ID: 24482
- OS: Windows
- OS Build: Vista
- Platform: x64 (with x86 compiler)
- Version: 2.7.1
- Fixed in version: 3.3.1
- Fixed in revision: 46397 (#f1b9989b)