Forum > Third party

Online Package Manager

(1/474) > >>

balazsszekely:
Hi,

 I decided to implement the online package manager(opkman). The first alpha version is ready and it works like this: the packages are zipped and stored in a webserver(repository) along with a json file. I chose zip to minimize server load. The json file contains all the necessary info about the packages. Once installed into the IDE, the opkman downloads, then serialize the json file into a package list. The list is  displayed in a tree. On request the packages can be downloaded or/and installed. For now the repository is read-only, it contains only eight, well known(I guess?) packages. The nature/type of the eight package is irrelevant for now, since we are only testing the functionality of the opkman. Few notes:
 
 1. Supported versions: Laz 1.6+(FPC 3.0.0+). I did the implementation/testing with Lazarus trunk(FPC 3.0.0)
 2. Tested under the following widgetsets: Win32/64, GTK2, Carbon
 3. After install, you can find opkman in the "Package" menu
 4. Link: http://wiki.freepascal.org/Online_Package_Manager
 
 Please test! Suggestions are welcome.
 
 PS: Big thanks to @Leledumbo for hosting the repository.
 
regards,
GetMem


Edit: stable != alpha(thanks Graeme) + screenshot added.

Graeme:

--- Quote from: GetMem on October 05, 2016, 09:33:55 am ---stable(alpha) version

--- End quote ---

stable and alpha are two opposites of the scale. I had to laugh when I read that. :)

Thanks for sharing, and good luck with the package manager though.

Bostjan:
Is this to be something like "NuGet" for MS visual studio ? (https://en.wikipedia.org/wiki/NuGet, https://www.nuget.org/)

If so, I think it is really good idea. Worst part of Delphi/Lazarus for me is that you must hunt various packages across the internet and central repository would be so much better.

balazsszekely:

--- Quote ---@Graeme
stable and alpha are two opposites of the scale. I had to laugh when I read that.
--- End quote ---
:D What I meant to say is the first alpha that's stable enough for test, but you're right, it's kinda confusing.  Point taken, I edited my post.


--- Quote ---@Bostjan
Is this to be something like "NuGet" for MS visual studio ? (https://en.wikipedia.org/wiki/NuGet, https://www.nuget.org/)
--- End quote ---
Yes, something similar.


--- Quote ---Worst part of Delphi/Lazarus for me is that you must hunt various packages across the internet and central repository would be so much better.
--- End quote ---
I agree 100%.

rvk:
Nice work :)

Error in trunk:

--- Code: ---opkman_mainfrm.pas(129,48) Error: Incompatible types: got "<procedure variable type of procedure(TObject;AnsiString;TErrorType;const AnsiString) of object;Register>" expected "<procedure variable type of procedure(TObject;UTF8String;TErrorType;const AnsiString) of object;Register>"

--- End code ---
on

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---  PackageDownloader.OnJSONDownloadCompleted := @DoOnJSONDownloadCompleted;Making it this works:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---    procedure DoOnJSONDownloadCompleted(Sender: TObject; AJSON: UTF8String; AErrTyp: TErrorType; const AErrMsg: String = '');TJSONStringType is an UTF8String in trunk.

Suggestion #1: Making the packages-list more compact. Only expanding when choosing the +

Suggestion #2: Putting the "Online Package Manager" above the "Install/Uninstall packages". I'm very used to be "Install" being the last in that menu :) Although, if this becomes the standard the position at the bottom might be preferred.

Note: The GetIt Package Manager of Delphi resides in the Tools menu. But Delphi doesn't have a dedicated "Packages" menu, only a Component-menu where "Install packages" sits.

Question: What packages will be provided in the end. Will the lazarus-ccr packages/components be added? Now you have the standard packages in the Lazarus distribution, the lazarus-ccr and everything else with separate download via Wiki-links. Maybe all these should be combined.

If these are not combined maybe it should be possible to add multiple "Remote repositories". (That would also allow you to make your own repository in addition to the default ones provided)

Navigation

[0] Message Index

[#] Next page

Go to full version