[Pkg-pascal-devel] Bug#823706: Bug#823706: lazarus opengl

Michalis Kamburelis michalis.kambi at gmail.com
Mon Nov 7 16:26:01 UTC 2016


> It seems that I have to tell lazbuild to "-B" for *.lpk files. But how
> do I tell lazbuild to build in my $HOME directory similar as it does
> with *.lpk files. Building in the system directory obviously isn't
> working for a normal user:

You mean that building .lpi doesn't work in a directory that is not
writeable, by default. Hm, indeed.

1. It is possible to work around this with direct FPC options, but I
don't see any obvious way to pass them through lazbuild.

2. It is possible to modify the .lpi file, to set the output path to
anything you need. Testing, it works nicely, and possibly could be
even applied / unapplied automatically (without Lazarus GUI) with a
bit of sed. You simply add a line like

  <UnitOutputDirectory Value="/home/michalis/Desktop/tmp-units"/>

  inside the <SearchPaths> element in the xxx.lpi file. This makes the
whole compilation output (*.o, *.ppu, *.compiled files and the
resulting binary) go into the /home/michalis/Desktop/tmp-units,
outside of the source tree.

  But.. in your case, it's probably a useless advice, since you cannot
modify the .lpi, since this is not writeable by normal user too.

So, I don't see a way to do it. Probably someone in upstream knows
better, or can implement it in lazbuild if needed:)

Do you need this for Debian package? In an ideal version, all the .lpi
files should be already compiled in a binary package, alongside
"lazarus-ide" and "lazbuild" binaries. So user gets a compiled program
like "apiwizz" in /usr/bin/ , and doesn't need to compile it.

The need for user to compile stuff inside Lazarus sources normally
occurs only for packages (which may be needed by user's applications
or other packages), not for applications (*.lpi).

Regards,
Michalis



More information about the Pkg-pascal-devel mailing list