On Sat, 18 Mar 2006 12:28:37 +0100
Mattias Gaertner <[EMAIL PROTECTED]> wrote:
> On Sat, 18 Mar 2006 12:46:54 +0200
> "Graeme Geldenhuys" <[EMAIL PROTECTED]> wrote:
>
> > On 18/03/06, Mattias Gaertner <[EMAIL PROTECTED]> wrote:
> > > If the package is not installed or 'marked for installation', then the
> > > uninstall should be disabled.
> >
> > Then there is no bug, Lazarus worked correctly.
> >
> > > > I better go and look at the wiki to see if they mention the problem
> > > > that tripped me over. If not, I will add it. Specifying unit paths
> > > > in the package that should be auto added to whatever project uses
> > > > the package. Don't specify paths that are earlier than the path
> > > > that the .lpk file lives in!!! My directory layout caused me to do
> > > > that, which gave me major headaches!
> > >
> > > Can you give an example?
> >
> > I will add an example to the wiki as well.
> >
> > I will use the tiOPF framework as an example The tiOPF has the
> > following directory layout, due to the fact that it compiles for FPC,
> > Delphi 5-7, D2005 and D2006
> >
> > Source <= full path
> > \Programming\3rdParty\tiOPF\Source
> > \Compilers
> > \Delphi7 <= Delphi 7 package files live here
> > \D2005
> > \FPC <= the tiOPF.lpk lived here
> > \Core <= core unit files
> > \Options <= optional unit file for extra features
> > \GUI
> >
> > Using this example, I included in the "Options - Usage - Units"
> > editbox the following paths:
> > "$(PkgOutDir);..\..\Core;..\..\Options;..\..\GUI" which will be added
> > to whatever project uses this package.
> >
> > I thought that those relative paths will get expanded correctly, but was
> > wrong. I expected the relative paths to get translated to the following
> > in the project using the tiOPF.lpk package:
> > ..\..\Core => \Programming\3rdParty\tiOPF\Source\Core
> >
> >
> > The project using the package was in the following directory:
> > \Programming\MasterMaths\M2Browser\Source\Browser.lpr
> >
> > The inherited paths in the project translated to a completely
> > different location, except for the $PkgOutDir. To solve the problem, I
> > had to move the tiOPF.lpk from the \Source\Compiler\FPC directory to
> > the \Source directory, and amend the Unit paths in the package to
> > "$(PkgOutDir);Core;Options;GUI", which then worked fine.
> >
> > My conclusion was that you can only specify path deeper in the dir
> > hierarchy based on the location of the .lpk file, and not any other
> > paths earlier in the dir hierarchy.
> >
> > Damn! It is much easier to show someone the problem than trying to
> > convey it in a email. :-)
>
> So, the bug is that '../../Core' is not expanded relative to the .lpk.
> I will take a look.
I just created a package with some relative usage paths. They work relative
to the .lpk.
Can you take a look at the Compiler Options -> inherited page and tell if
they look correct?
> BTW, it is a bad idea to share source paths. For example if FPC needs to
> rebuild a source it will put the .ppu to various places on your disk.
> Better share only .ppu directories.
Mattias
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives