[Lazarus] Separation of source code and compiled units

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] Separation of source code and compiled units

Free Pascal - Lazarus mailing list
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.
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Separation of source code and compiled units

Free Pascal - Lazarus mailing list
Karl-Michael Schindler via lazarus <[hidden email]> 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 

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Separation of source code and compiled units

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
Am 02.11.2019 um 12:00 schrieb Sven Barth via <[hidden email]>:

> Karl-Michael Schindler via lazarus <[hidden email]> 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.


--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Separation of source code and compiled units

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
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.

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus