Sign in Join

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

Mailing lists / fpc-pascal / 2020-04

Prevent full unit path in ppu files? together with -Ur

3 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

Martin

When building packages for an installer, one uses -Ur.

Yet (on Windows) I noted, that the ppu contain the full path to the source file used to build that ppu.

Not a major issue, but slightly awkward.
- The files (ppu, and maybe sources) will be packed into an installer
- The end user installs them to a patch of their choice. This is most likely different from the build system.

In the best case, the end users system has now links to none existing files. In the worst case, the links point to a different installation, with different versions of the files.

Well probably no harm, since fpc will not recompile those files. Problematic maybe if other tools (like Lazarus) read that info from the ppu.

Therefore the question: Can that full path be prevented from getting into the ppu (or any other file)?

Reply by email

Martin Frb
to Martin
Martin wrote 22 lines
When building packages for an installer, one uses -Ur. Yet (on Windows) I noted, that the ppu contain the full path to the source file used to build that ppu. Not a major issue, but slightly awkward. - The files (ppu, and maybe sources) will be packed into an installer - The end user installs them to a patch of their choice. This is most likely different from the build system. In the best case, the end users system has now links to none existing files. In the worst case, the links point to a different installation, with different versions of the files. Well probably no harm, since fpc will not recompile those files. Problematic maybe if other tools (like Lazarus) read that info from the ppu. Therefore the question: Can that full path be prevented from getting into the ppu (or any other file)?

Just digging a bit deeper, searching all files indicates that this full path is stored in *.fpm files

Reply by email

Joost van der Sluis
to Martin Frb

Op 12-04-2020 om 17:26 schreef Martin Frb

Show quoted text 8 lines
On 12/04/2020 16:31, Martin wrote: > When building packages for an installer, one uses -Ur. > Therefore the question: Can that full path be prevented from getting > into the ppu (or any other file)? > Just digging a bit deeper, searching all files indicates that this full path is stored in *.fpm files

That's intentional. That way you can re-compile the package, when one of the packages that this package depends on has been changed.

Note that you should never pack this file, that would be useless.

Unless if you want to distribute a binary version of a fpmake-package. You have to add the -fsp parameter to the fpmake-executable to provide the path to the sources. The official fpc-releases should do so...

Regards,

Joost.

Reply by email