Recent

Author Topic: What file is that ?  (Read 1767 times)

dbannon

  • Hero Member
  • *****
  • Posts: 2794
    • tomboy-ng, a rewrite of the classic Tomboy
What file is that ?
« on: March 09, 2022, 06:03:57 am »
I refer to *.res and *.compiled files.

The wiki, https://wiki.freepascal.org/Lazarus_project_files, says that .compiled files should not be under a vcs and does not mention .res files.

The same page refers us to lazarus.gitignore on GitHub that says both should not be saved under git.

The official Lazarus Tree contains both .compiled and .res files.  The .gitignore file does mention link*.res but not .compiled at all.

Thoughts ?

Davo

Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

HeavyUser

  • Sr. Member
  • ****
  • Posts: 397
Re: What file is that ?
« Reply #1 on: March 09, 2022, 06:11:15 am »
I refer to *.res and *.compiled files.

The wiki, https://wiki.freepascal.org/Lazarus_project_files, says that .compiled files should not be under a vcs and does not mention .res files.

The same page refers us to lazarus.gitignore on GitHub that says both should not be saved under git.

The official Lazarus Tree contains both .compiled and .res files.  The .gitignore file does mention link*.res but not .compiled at all.

Thoughts ?

Davo
.compiled files are generated by the compiler every time so no they should not be in vcs. .Res are resource files they are used to link in .... well..... resources the application Icon, the windows manifest, resource strings defined by the components you use sounds mouse cursors and the rest of external resources that are going to be used from your application.
Those are provided by the component developer and they should be included in your vcs.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11452
  • FPC developer.
Re: What file is that ?
« Reply #2 on: March 09, 2022, 10:11:15 am »
Res is a bit complex in that sense. There are essentially three types in Delphi:

  • auto generated .res files (for forms etc).
  • other res files for which you have source (.rc) and are declared with the RC file in project or source like {$R 'logo.res' 'logo.rc'}
  • other res files for which you don't have source.

So category one shouldn't be in SVN (so essentially same as other pregenerated files like  .dcu/.o or .ppu).  Category two essentially also not, since they can be regenerated.

Finally category 3, that should be kept. In older Delphi these were often files to e.g. enable themes while the Delphi version didn't know that windows version. This is less of a problem with Lazarus.

You can also convert category 2 to 3 to simply including the .res (removing the .rc source), so that you don't have to add e.g. an image to SVN etc)

Note that the .res situation is still in flux as Free Pascal is switching from windres to an own resource compiler, which makes using it easier.
« Last Edit: March 09, 2022, 11:20:33 am by marcov »

AlexTP

  • Hero Member
  • *****
  • Posts: 2401
    • UVviewsoft
Re: What file is that ?
« Reply #3 on: March 09, 2022, 10:21:06 am »

PascalDragon

  • Hero Member
  • *****
  • Posts: 5469
  • Compiler Developer
Re: What file is that ?
« Reply #4 on: March 09, 2022, 01:27:23 pm »
.compiled files are generated by the compiler every time so no they should not be in vcs.

Just to clarify: the compiler does not generate any .compiled files. They are created by some build system (make, fpmake, lazbuild).

HeavyUser

  • Sr. Member
  • ****
  • Posts: 397
Re: What file is that ?
« Reply #5 on: March 09, 2022, 02:46:21 pm »
.compiled files are generated by the compiler every time so no they should not be in vcs.

Just to clarify: the compiler does not generate any .compiled files. They are created by some build system (make, fpmake, lazbuild).
I had no idea what creates them that's why I wanted to write by the compile process. In any case thanks for the feed back.

 

TinyPortal © 2005-2018