Sign in Join

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

Mailing lists / fpc-devel / 2011-05

fppkg question

9 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

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

Darius Blaszyk

Hi,

I've created a trivial front end for fppkg (see lazarus mailing list) but working on this I realized that they are not grouped in any way. Currently with approx. 70 packages this is not a real problem, but if the system will get used more widely it will be impossible to deduct the purpose (and possibly other info) from the package just by it's name.

Therefore I would like to request a new command named "info" that retrieves the info for a package from packages.xml. I would also like to add some more info in this file for a package:

- the topic that organizes the packages (FPC core / DB / buttons / charts / dialogs / etc)
- keywords to make it possible to search freely
- support contact (official / community)

See the following movie on youtube on a plugin system that has some of these features: http://www.youtube.com/watch?v=d9yyJmh3dyU&feature=player_embedded

Are / were there any plans ever in this direction? Am I free to create a couple of patches?

Regards, Darius

Reply by email

Michael Van Canneyt
to Darius Blaszyk
Darius Blaszyk wrote 13 lines
Hi, I've created a trivial front end for fppkg (see lazarus mailing list) but working on this I realized that they are not grouped in any way. Currently with approx. 70 packages this is not a real problem, but if the system will get used more widely it will be impossible to deduct the purpose (and possibly other info) from the package just by it's name. Therefore I would like to request a new command named "info" that retrieves the info for a package from packages.xml. I would also like to add some more info in this file for a package: - the topic that organizes the packages (FPC core / DB / buttons / charts / dialogs / etc) - keywords to make it possible to search freely - support contact (official / community) See the following movie on youtube on a plugin system that has some of these features: http://www.youtube.com/watch?v=d9yyJmh3dyU&feature=player_embedded Are / were there any plans ever in this direction? Am I free to create a couple of patches?

It exists.

If you :

   TFPPackage = Class(TStreamCollectionItem)
     Property Name : String Read FName Write SetName;
     Property Author : String Read FAuthor Write FAuthor;
     Property Version : TFPVersion Read FVersion Write SetVersion;
     Property License : String Read FLicense Write FLicense;
     Property Description : String Read FDescription Write FDescription;
     Property HomepageURL : String Read FHomepageURL Write FHomepageURL;
     Property DownloadURL : String Read FDownloadURL Write FDownloadURL;
     Property FileName : String Read GetFileName Write FFileName;
     Property Email : String Read FEmail Write FEmail;
   end

The same information can be stored in the fpmake.pp file.

All this info is supposed to be output in XML format from fpmake --manifest. fppkg picks it up and stores it in the repository.

If you want to extend it to include a category and keywords, be my guest.

Michael.

Reply by email

Unknown author
to Michael Van Canneyt
Michael Van Canneyt wrote 53 lines
On Tue, 10 May 2011, Darius Blaszyk wrote: > Hi, > > I've created a trivial front end for fppkg (see lazarus mailing > list) but working on this I realized that they are not grouped in any > way. Currently with approx. 70 packages this is not a real problem, > but if the system will get used more widely it will be impossible to > deduct the purpose (and possibly other info) from the package just by > it's name. > > Therefore I would like to request a new command named "info" that > retrieves the info for a package from packages.xml. I would also like > to add some more info in this file for a package: > > - the topic that organizes the packages (FPC core / DB / buttons / > charts / dialogs / etc) > - keywords to make it possible to search freely > - support contact (official / community) > > See the following movie on youtube on a plugin system that has some > of these features: > http://www.youtube.com/watch?v=d9yyJmh3dyU&feature=player_embedded > > Are / were there any plans ever in this direction? Am I free to > create a couple of patches? It exists. If you : TFPPackage = Class(TStreamCollectionItem) Property Name : String Read FName Write SetName; Property Author : String Read FAuthor Write FAuthor; Property Version : TFPVersion Read FVersion Write SetVersion; Property License : String Read FLicense Write FLicense; Property Description : String Read FDescription Write FDescription; Property HomepageURL : String Read FHomepageURL Write FHomepageURL; Property DownloadURL : String Read FDownloadURL Write FDownloadURL; Property FileName : String Read GetFileName Write FFileName; Property Email : String Read FEmail Write FEmail; end The same information can be stored in the fpmake.pp file. All this info is supposed to be output in XML format from fpmake --manifest. fppkg picks it up and stores it in the repository. If you want to extend it to include a category and keywords, be my guest.

Thanks, that was the class indeed I was looking for to extend.

Darius

Reply by email

Darius Blaszyk
to Unknown author
Show quoted text 41 lines
On Tue, 10 May 2011 08:30:28 +0200 (CEST), Michael Van Canneyt wrote: > On Tue, 10 May 2011, Darius Blaszyk wrote: > >> Hi, >> >> I've created a trivial front end for fppkg (see lazarus mailing list) but working on this I realized that they are not grouped in any way. Currently with approx. 70 packages this is not a real problem, but if the system will get used more widely it will be impossible to deduct the purpose (and possibly other info) from the package just by it's name. >> >> Therefore I would like to request a new command named "info" that retrieves the info for a package from packages.xml. I would also like to add some more info in this file for a package: >> >> - the topic that organizes the packages (FPC core / DB / buttons / charts / dialogs / etc) >> - keywords to make it possible to search freely >> - support contact (official / community) >> >> See the following movie on youtube on a plugin system that has some of these features: http://www.youtube.com/watch?v=d9yyJmh3dyU&feature=player_embedded >> >> Are / were there any plans ever in this direction? Am I free to create a couple of patches? > > It exists. > > If you : > > TFPPackage = Class(TStreamCollectionItem) > Property Name : String Read FName Write SetName; > Property Author : String Read FAuthor Write FAuthor; > Property Version : TFPVersion Read FVersion Write SetVersion; > Property License : String Read FLicense Write FLicense; > Property Description : String Read FDescription Write FDescription; > Property HomepageURL : String Read FHomepageURL Write FHomepageURL; > Property DownloadURL : String Read FDownloadURL Write FDownloadURL; > Property FileName : String Read GetFileName Write FFileName; > Property Email : String Read FEmail Write FEmail; > end > > The same information can be stored in the fpmake.pp file. > > All this info is supposed to be output in XML format from fpmake > --manifest. fppkg picks it up and stores it in the repository. > > If you want to extend it to include a category and keywords, be my guest. Thanks, that was the class indeed I was looking for to extend.

I created a patch here: http://bugs.freepascal.org/view.php?id=19348

Please review and commit if approved.

Regards, Darius

Reply by email

Michael Van Canneyt
to Darius Blaszyk
Darius Blaszyk wrote 10 lines
>> All this info is supposed to be output in XML format from fpmake >> --manifest. fppkg picks it up and stores it in the repository. >> >> If you want to extend it to include a category and keywords, be my guest. > > Thanks, that was the class indeed I was looking for to extend. I created a patch here: http://bugs.freepascal.org/view.php?id=19348 Please review and commit if approved.

Please rework the patch. I don't want the Error->ErrorFmt, Log->logFmt changes. The overloaded versions exist on purpose.

Michael.

Reply by email

Darius Blaszyk
to Michael Van Canneyt
Michael Van Canneyt wrote 17 lines
On Fri, 13 May 2011, Darius Blaszyk wrote: >>> All this info is supposed to be output in XML format from fpmake >>> --manifest. fppkg picks it up and stores it in the repository. >>> >>> If you want to extend it to include a category and keywords, be my guest. >> >> Thanks, that was the class indeed I was looking for to extend. > > I created a patch here: http://bugs.freepascal.org/view.php?id=19348 > > Please review and commit if approved. Please rework the patch. I don't want the Error->ErrorFmt, Log->logFmt changes. The overloaded versions exist on purpose.

What is the alternative then? Any suggestion?

Darius

Reply by email

Michael Van Canneyt
to Darius Blaszyk
Darius Blaszyk wrote 21 lines
On May 13, 2011, at 1:01 PM, Michael Van Canneyt wrote: > > > On Fri, 13 May 2011, Darius Blaszyk wrote: > >>>> All this info is supposed to be output in XML format from fpmake >>>> --manifest. fppkg picks it up and stores it in the repository. >>>> >>>> If you want to extend it to include a category and keywords, be my guest. >>> >>> Thanks, that was the class indeed I was looking for to extend. >> >> I created a patch here: http://bugs.freepascal.org/view.php?id=19348 >> >> Please review and commit if approved. > > Please rework the patch. I don't want the Error->ErrorFmt, Log->logFmt changes. > The overloaded versions exist on purpose. What is the alternative then? Any suggestion?

Never mind. I fixed it myself. Rev 17440.

You'll have to adapt the Lazarus callback, though. I added 'Const' to the parameter and changed the callback names to LogHandler/ErrorHandler.

Michael.

Reply by email

Joost van der Sluis
to Michael Van Canneyt
Michael Van Canneyt wrote 26 lines
On Fri, 13 May 2011, Darius Blaszyk wrote: > > On May 13, 2011, at 1:01 PM, Michael Van Canneyt wrote: > >> >> >> On Fri, 13 May 2011, Darius Blaszyk wrote: >> >>>>> All this info is supposed to be output in XML format from fpmake >>>>> --manifest. fppkg picks it up and stores it in the repository. >>>>> >>>>> If you want to extend it to include a category and keywords, be my guest. >>>> >>>> Thanks, that was the class indeed I was looking for to extend. >>> >>> I created a patch here: http://bugs.freepascal.org/view.php?id=19348 >>> >>> Please review and commit if approved. >> >> Please rework the patch. I don't want the Error->ErrorFmt, Log->logFmt changes. >> The overloaded versions exist on purpose. > What is the alternative then? Any suggestion? Never mind. I fixed it myself. Rev 17440.

I don't like the 'laz_list' exception in pkghandler.pp. I don't want any third-party-dependent code in fppkg. And binding on a specific name isn't fine either. fppkg should be for general use, if you need something special, use an add-in.
In this case it is probably also possible to come up with another solution. (why is it for, anyway?)

Joost

Reply by email

Darius Blaszyk
to Joost van der Sluis
Joost van der Sluis wrote 34 lines
On Fri, 2011-05-13 at 13:18 +0200, Michael Van Canneyt wrote: > > On Fri, 13 May 2011, Darius Blaszyk wrote: > >> >> On May 13, 2011, at 1:01 PM, Michael Van Canneyt wrote: >> >>> >>> >>> On Fri, 13 May 2011, Darius Blaszyk wrote: >>> >>>>>> All this info is supposed to be output in XML format from fpmake >>>>>> --manifest. fppkg picks it up and stores it in the repository. >>>>>> >>>>>> If you want to extend it to include a category and keywords, be my guest. >>>>> >>>>> Thanks, that was the class indeed I was looking for to extend. >>>> >>>> I created a patch here: http://bugs.freepascal.org/view.php?id=19348 >>>> >>>> Please review and commit if approved. >>> >>> Please rework the patch. I don't want the Error->ErrorFmt, Log->logFmt changes. >>> The overloaded versions exist on purpose. >> What is the alternative then? Any suggestion? > > Never mind. I fixed it myself. Rev 17440. I don't like the 'laz_list' exception in pkghandler.pp. I don't want any third-party-dependent code in fppkg. And binding on a specific name isn't fine either. fppkg should be for general use, if you need something special, use an add-in. In this case it is probably also possible to come up with another solution. (why is it for, anyway?)

As far as I found, the "list" action get's cached in the ExecuteActions and if found the action is not executed, but rather the action is ignored. While perfectly suitable for fppkg which is only run once though and then exits, the GUI version stays active and can run the same actions multiple times. This makes me think that I should probably create a Laz_ExecuteAction procedure and keep the original procedure in tact. I will create a patch for it.

Regards, Darius

Reply by email