Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2016-08

Can .compiled files be safely removed?

6 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Bo Berglund

I am trying to test a fpc+lazarus file package for cross compilation on Windows (see thread "Compliments") and the downloaded set contains a lot of *.compiled files.
These contain unwanted absolute paths to the original location of internal files and I want to remove these .compiled files. Is that possible without breaking the functionality of the system?

I looked at this wiki page for info:
http://wiki.freepascal.org/File_extensions

Here the .compiled files are mentioned in connection to subversion or git as:
"These files are regenerated by the IDE or by a build so do not need to be stored"

Does this mean that they are not used by FPC/Lazarus once the build (of what?) has been completed and can safely be removed also in the project dir tree?

The files in question are located below these directories: .\lazarus\components
.\lazarus\doceditor
.\lazarus\docs
.\lazarus\lcl\units
.\lazarus\packager
.\lazarus\tools
.\lazarus\units

So they are all Lazarus files.

Bo Berglund Developer in Sweden

Reply by email

Graeme Geldenhuys
to Bo Berglund
Bo Berglund wrote
Here the .compiled files are mentioned in connection to subversion or git as: "These files are regenerated by the IDE or by a build so do not need to be stored"

Indeed, you can safely delete those files. I have a Git Ignore setting that makes sure those never end up in my code repositories.

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email

Bo Berglund
to Graeme Geldenhuys
Graeme Geldenhuys wrote 9 lines
On 2016-08-08 07:01, Bo Berglund wrote: > Here the .compiled files are mentioned in connection to subversion or > git as: > "These files are regenerated by the IDE or by a build so do not need > to be stored" Indeed, you can safely delete those files. I have a Git Ignore setting that makes sure those never end up in my code repositories.

Good,
then are they needed in any other way than for the system to create and use during builds?
If so is there a switch to tell Lazarus to not keep them after the fact?

Bo Berglund Developer in Sweden

Reply by email

Graeme Geldenhuys
to Bo Berglund
Bo Berglund wrote
Good, then are they needed in any other way than for the system to create and use during builds?

I don't actually know what that file is for. There is a build timestamp in there, so maybe Lazarus IDE uses that to detect if it should recompile a project or package... I honestly don't know.

If so is there a switch to tell Lazarus to not keep them after the fact?

I don't know of such a setting. I normally define a Unit Output path and a separate Target Path (where executable ends up), so the *.compiled file ends up with the *.ppu and *.o files in a separate directory to the generated executable. That way it doesn't bother me too much.

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email

Mattias Gaertner
to Bo Berglund: On Mon, 8 Aug 2016 17:18:38 +0100, Graeme Geldenhuys then are they needed in any other…
[...] > then are they needed in any other way than for the system to create > and use during builds?

The IDE uses them to determine if a rebuild (all) is needed. If it is missing on next compile, the IDE assumes a rebuild is needed. This means you don't need to store them in a source only repository (e.g. svn, git). If you distribute binary files (e.g. .ppu files) you should provide them. There is a platform independent version of the .compiled files. See the Makefile.compiled files.

Mattias

Reply by email

Mattias Gaertner
to Graeme Geldenhuys: I don't actually know what that file is for. There is a build timestamp in there, so…
Show quoted text 5 lines
[...] I don't know of such a setting. I normally define a Unit Output path and a separate Target Path (where executable ends up), so the *.compiled file ends up with the *.ppu and *.o files in a separate directory to the generated executable. That way it doesn't bother me too much.

That is the right place, because the .compiled files basically extend the .ppu files.

Mattias

Reply by email