Sign in Join

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

Mailing lists / lazarus / 2019-11

Separation of source code and compiled units

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

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

Karl-Michael Schindler

Hi

I am working on the package description for lazarus for MacPorts and are struggling with the following: $PREFIX/share/lazarus contains the source code as well as the compiled units. In case lazarus is recompiled the directory $PREFIX/share/lazarus needs to be writable by all users. At least this is as far as I got. Is there a way to keep the source files readonly and place the compiled files somewhere separate? How has this been dealt with for linux?

Greetings - Michael.

Reply by email

Sven Barth
to Karl-Michael Schindler

Karl-Michael Schindler via lazarus schrieb
am Sa., 2. Nov. 2019, 11:27:

Show quoted text 10 lines
Hi I am working on the package description for lazarus for MacPorts and are struggling with the following: $PREFIX/share/lazarus contains the source code as well as the compiled units. In case lazarus is recompiled the directory $PREFIX/share/lazarus needs to be writable by all users. At least this is as far as I got. Is there a way to keep the source files readonly and place the compiled files somewhere separate? How has this been dealt with for linux?

If I remember correctly then Lazarus recompiles itself into a directory in the user's home directory if the original isn't writable.

Regards,
Sven

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20191102/d7fd44f4/attachment.html>

Reply by email

Karl-Michael Schindler
Sven Barth via wrote 18 lines
Karl-Michael Schindler via lazarus schrieb am Sa., 2. Nov. 2019, 11:27: > Hi > > I am working on the package description for lazarus for MacPorts and are > struggling with the following: $PREFIX/share/lazarus contains the source > code as well as the compiled units. In case lazarus is recompiled the > directory $PREFIX/share/lazarus needs to be writable by all users. At least > this is as far as I got. Is there a way to keep the source files readonly > and place the compiled files somewhere separate? How has this been dealt > with for linux? If I remember correctly then Lazarus recompiles itself into a directory in the user's home directory if the original isn't writable. Regards, Sven

I looked into that and I might even manage to bend it, in order to use $PREFIX/var/lib/lazarus and keep $PREFIX/share/lazarus readonly.

But before going down that way with all the time for testing, i would appreciate opinions on that?

Regards - Michael.

Reply by email

Giuliano Colla
to Karl-Michael Schindler: Hi I am working on the package description for lazarus for MacPorts and are struggling…

Il 02/11/2019 11:26, Karl-Michael Schindler via lazarus ha scritto:

I am working on the package description for lazarus for MacPorts and are struggling with the following: $PREFIX/share/lazarus contains the source code as well as the compiled units. In case lazarus is recompiled the directory $PREFIX/share/lazarus needs to be writable by all users. At least this is as far as I got. Is there a way to keep the source files readonly and place the compiled files somewhere separate? How has this been dealt with for linux?

As Sven pointed, in Linux when the $PREFIX/lazarus directory is not writable, the compiled files and the executable are put into the user's home directory under ~/.lazarus (which is also the default path for user configuration files). Executable in ~/.lazarus/bin, compiled units in ~/.lazarus/lib and ~/.lazarus/units.
That's the default behaviour, but you may also select a different target directory for your recompiled copy from Tools->Configure "Build Lazarus"->Target directory.

Moreover, startlazarus will check if the lazarus copy in $PREFIX/lazarus is newer than your local recompiled lazarus, which happens if you update to a new version. In that case it will ask you which one you want to start.

If you make $PREFIX/lazarus writable, you will always have only one copy of Lazarus. If you don't, you will have two copies: the original one, and your recompiled one.

Giuliano

Do not do to others as you would have them do to you.They might have different tastes.

Reply by email