Recent

Author Topic: Examples of third-party packages in the new Examples Window  (Read 2443 times)

dbannon

  • Hero Member
  • *****
  • Posts: 2802
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Examples of third-party packages in the new Examples Window
« Reply #15 on: April 02, 2023, 04:17:18 am »
 :-\
I have examined the packages in OPM, A..F and found three that will not work my proposed model (of guessing top of package tree using OtherUnitFiles). And found several more that would not work if some Examples were later added in the most sensible place.

So, that means it needs to be done the hard way. Here is my plan -

  • First we test for <ExamplesDirectory Value="XXX"/> in the LPK file. If we find it, use it as authorative. Looks like this eg -
    Code: XML  [Select][+][-]
    1.     <?xml version="1.0" encoding="UTF-8"?>
    2.     <CONFIG>
    3.       <Package Version="5">
    4.         <Name Value="NewPackage"/>
    5.         <Type Value="RunAndDesignTime"/>
    6.         <ExamplesDirectory Value="../"/>

  • Failing the above, we try the guess model using OtherUnitFiles, that will work for the majority of existing packages, is easily and quickly done and will allow most packages to work without rebuilding (or editing) the existing LPK file.

    Maintainers of packages can then choose how they wish to make their package compliant, for many, it will be just a case of adding meta data files, only a few will need to force the issue with the first option.


    OK, now the nasty question, do 'you' want me meddling with the core code that writes out packages ?  I can easily make the existing examplewindow code do whats needed but changes will have to happen to that packaging code too ! I have not yet looked to see  just how that will work.

    Davo



Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

dbannon

  • Hero Member
  • *****
  • Posts: 2802
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Examples of third-party packages in the new Examples Window
« Reply #16 on: April 03, 2023, 06:15:18 am »
I have posted a bug report with a patch that solves this matter for about 90% of packages. The remaining 10% will need to be solved by altering the packaging code.

https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/40190

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

 

TinyPortal © 2005-2018