[fpc-pascal] Resource compilation
Michael Van Canneyt
michael at freepascal.org
Sat Aug 4 01:10:43 CEST 2018
On Sat, 4 Aug 2018, Martok wrote:
> Am 25.09.2017 um 14:24 schrieb Sven Barth via fpc-pascal:
>> The RC language itself isn't *that* difficult. Main difficulty would be to essentially implement a C-preprocessor-compatible
>> preprocessor.
>
> Just "a few" months later, I finally got around to checking this out.
>
> You were completely right, the language itself is not very difficult, and can be processed into a TResource in one pass in a
> tply-generated parser. The preprocessor is also just a subset of C's (i.e.: no macros), so it would not be too complicated (I've
> done the same for idlproc before). There are dialect issues between windres and Microsoft RC, but they are minor.
>
> The more difficult part is implementing the remaining resource access classes for fcl-res. Well, not difficult per se, but the
> copy-on-write-sharing thing done there adds a lot of complexity for (IMHO) very little benefit and makes it a bit awkward to
> work with. There's also a lot of endian conversions that could probably be factored out.
>
> That sounds challenging. How much interest would there be in having a full resource compiler, with the appropriate
> changes/extensions to fcl-res?
I think a lot. There is a request in the bugtracker for a resource compiler since ages.
Michael.
More information about the fpc-pascal
mailing list