Forum > Free Pascal

fpcres now supports compilation of RC files

(1/5) > >>

PascalDragon:
Hello together!

Thanks to the work of Martok the fpcres utility is now able to compile RC files into RES files.

To compile an RC file to a RES file you need to pass the -of res argument as otherwise the RC reader won't be used (it's a "catch all" TResourceReader descendant and thus not registered by default). You can specify include paths for the preprocessor using --include <path> and defines can be declared using -D sym (including defines with values using -D sym=val).

The Free Pascal compiler is capable of using fpcres for resource compilation as well, but due to bootstrapping issues that currently needs to be enabled using a new option -FF. Once a FPC release with a fpcres supporting RC files is released we'll make that option the default and deprecate windres/gorc (I currently plan to merge this into 3.2.1, thus 3.2.2 would support this and future 3.3.1 (and thus 3.4) would then use fpcres by default).

Please test this with your applications and report your problems as this is the biggest change regarding resource compilation since their introduction.

Compatibility note: due to build dependencies the FileInfo unit was moved from fcl-base to fcl-extra, so please keep a look out for stale PPU files.

Fred vS:
Would it mean that fpc could produce now *.res resource files without the need of windres in Windows and Unix OS system too?

If yes, wow and  many thanks.

Fre;D

ASBzone:

--- Quote from: PascalDragon on August 12, 2020, 11:36:31 pm ---Hello together!

Thanks to the work of Martok the fpcres utility is now able to compile RC files into RES files.

To compile an RC file to a RES file you need to pass the -of res argument as otherwise the RC reader won't be used (it's a "catch all" TResourceReader descendant and thus not registered by default). You can specify include paths for the preprocessor using --include <path> and defines can be declared using -D sym (including defines with values using -D sym=val).

...

--- End quote ---

Awesome news!   Thanks to Martok and everyone else involved...

olly:
https://forum.lazarus.freepascal.org/index.php/topic,50796.msg371698.html#msg371698

You weren't kidding! Good job to all!

Off topic, but let's hope we don't have to wait a long time for this to make a official release.  :)

PascalDragon:

--- Quote from: Fred vS on August 13, 2020, 12:45:19 am ---Would it mean that fpc could produce now *.res resource files without the need of windres in Windows and Unix OS system too?

--- End quote ---

Yes, though for now you need to pass the parameter -FF to the compiler so that it uses fpcres instead of windres / gorc.


--- Quote from: olly on August 13, 2020, 03:10:59 am ---Off topic, but let's hope we don't have to wait a long time for this to make a official release.  :)

--- End quote ---

As said the plan is to merge this to 3.2.1, so that the next minor release will contain it, allowing us to switch 3.3.1 to use it by default.

However to make it default we need people to test it with their projects now. It doesn't help if we make it default and later on people complain that we broke everything just because we weren't able to test whatever corner cases they have.

Navigation

[0] Message Index

[#] Next page

Go to full version