[Lazarus] Absolute paths on different platforms

Mark Morgan Lloyd markMLl.lazarus at telemetry.co.uk
Sat Jun 25 22:33:48 CEST 2011


Max Vlasov wrote:
> Hi,
> 
> I found that Lazarus does a great job when one uses the same lpi/lpk
> on different platforms. I currently have one question. If a path for
> example to some library folder is absolute, I get obvious
> non-existence error with a text "...contains a non-existing directory"
> (for example when letter based windows paths used and I'm in linux and
> press ok in project options ). I should just choose Ignore when the
> message appear, but I suppose for a large project it can be tedious
> and if I wrongly choose cancel,  I can lose some information (although
> I can live with that). I know that I should avoid absolute paths, but
> sometimes it's hard to do.
> 
> I see two options (if either possible)
> - Ignore absolute paths from another platform (for example c:\src
> found in linux Lazarus). But I'm not sure whether it's always
> possible.
> - Introduce a setting to suppress this warning. I think if it becomes
> too tedious, I will be ready to switch this off completely. And it's
> much easier to implement that the first suggestion. I tried to find,
> maybe it's already there, but failed, sorry

The third possibility is to keep your directory structure the same on 
all platforms, e.g. Lazarus in /usr/local/share/lazarus and your sources 
in /usr/local/src. If you treat a Linux system as your master, and are 
fairly careful about not copying stuff back from Windows unless really 
necessary, you won't "pollute" paths with things like drive letters.

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]




More information about the Lazarus mailing list