Recent

Author Topic: Online Package Manager  (Read 836022 times)

garlar27

  • Hero Member
  • *****
  • Posts: 652
Re: Online Package Manager
« Reply #1455 on: November 30, 2018, 01:00:59 pm »
Sorry but I had to ask:
Why OPM is not in OPM?

balazsszekely

  • Guest
Re: Online Package Manager
« Reply #1456 on: November 30, 2018, 09:05:54 pm »
Hi sir.
We have a new version of REST Dataware. You can update OPM.
Thanks.
Done. Thanks for the new version.

Quote
Sorry but I had to ask:
Why OPM is not in OPM?
OPM is constantly changing, the trunk version of OPM won't compile with Lazarus 1.8 or Lazarus 2.0.

antispam88

  • Jr. Member
  • **
  • Posts: 60
Re: Online Package Manager
« Reply #1457 on: December 02, 2018, 08:01:17 pm »
I did tests also with 2.0 RC2 and with trunk 59715. In both versions a package is marked as installed when the package is only loaded via "Open Package File (.lpk)".

Best regards,
antispam88

balazsszekely

  • Guest
Re: Online Package Manager
« Reply #1458 on: December 03, 2018, 08:31:53 am »
I did tests also with 2.0 RC2 and with trunk 59715. In both versions a package is marked as installed when the package is only loaded via "Open Package File (.lpk)".
Fixed in r. 59717, please test. Thanks again for the feedback.

Hansaplast

  • Hero Member
  • *****
  • Posts: 674
  • Tweaking4All.com
    • Tweaking4All
Re: Online Package Manager
« Reply #1459 on: December 03, 2018, 07:41:09 pm »
Tip for macOS users with Little Snitch as their firewall;
I got the "unable to resolve packages.lazarus-ide.org" error.

This is caused by Little Snitch since it automatically blocks applications that are not signed.
In the Little Snitch rules one needs to enable/allow this for Lazarus.

RastaManKing

  • New Member
  • *
  • Posts: 14
Re: Online Package Manager
« Reply #1460 on: December 03, 2018, 08:17:24 pm »
Tip for macOS users with Little Snitch as their firewall;
I got the "unable to resolve packages.lazarus-ide.org" error.

This is caused by Little Snitch since it automatically blocks applications that are not signed.
In the Little Snitch rules one needs to enable/allow this for Lazarus.
this is also true for windows and windows firewall, linux works perfectly out of the box :)

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: Online Package Manager
« Reply #1461 on: December 08, 2018, 01:39:53 pm »
Hi, I had some problems with Lazarus 2 RC2, first I needed to install the 32 bit cross compiler to install packages with OPM, else any package installation says can't find ppc386, maybe because the project I wish to install packages is configured to 32 bit? (Edit: It makes sense to install the cross compiler).

Well, then I need to install indylaz, and it says Unit not found 'IdAboutVCL'.

Edit: Seems that it fails to extract the 'Core' folder since it's almost empty, I downloaded it manually from the zip file link.
« Last Edit: December 08, 2018, 02:00:34 pm by lainz »

balazsszekely

  • Guest
Re: Online Package Manager
« Reply #1462 on: December 09, 2018, 04:09:59 pm »
Sorry for the late response, I was away for a few days.

@Hansaplast
Quote
Tip for macOS users with Little Snitch as their firewall;
I got the "unable to resolve packages.lazarus-ide.org" error.
This is caused by Little Snitch since it automatically blocks applications that are not signed.
In the Little Snitch rules one needs to enable/allow this for Lazarus
Thanks for the feedback.

@lainz
Quote
I had some problems with Lazarus 2 RC2, first I needed to install the 32 bit cross compiler to install packages with OPM, else any package installation says can't find ppc386, maybe because the project I wish to install packages is configured to 32 bit? (Edit: It makes sense to install the cross compiler).
Yes, most likely the packages are configured to 32 bit. OPM only passes the package to the IDE, the IDE decides what compiler to use. I will try to improve this in the future.

Quote
Well, then I need to install indylaz, and it says Unit not found 'IdAboutVCL'.
Edit: Seems that it fails to extract the 'Core' folder since it's almost empty, I downloaded it manually from the zip file link.
I saw this before, when the Indy folder already exists, and you try to install it again, the extraction fails for some reason. Unfortunately I have no idea why.

gerardus

  • Jr. Member
  • **
  • Posts: 93
Re: Online Package Manager
« Reply #1463 on: December 13, 2018, 11:30:53 am »
Hi GetMem,
First, congrats for the OPM tool, it's a very good thing for Lazarus.
I have two Lazarus installs for working (2.0 RC2 Linux 64 bits and 1.8.4 Windows 64 bits). In both, I use the IBX package and it's version 2.2.0 that OPM has currently.
I see in that same forum 2.3.2 is available.
How does OPM work? Does it depend on you to make the new version available manually?
Best regards,
Gerard.

balazsszekely

  • Guest
Re: Online Package Manager
« Reply #1464 on: December 13, 2018, 01:15:53 pm »
Hi gerardus,

Quote
First, congrats for the OPM tool, it's a very good thing for Lazarus.
Thank you.

Quote
I have two Lazarus installs for working (2.0 RC2 Linux 64 bits and 1.8.4 Windows 64 bits). In both, I use the IBX package and it's version 2.2.0 that OPM has currently.
I see in that same forum 2.3.2 is available.
Yes, I can update to 2.3.2, but it has separate files for windows and linux, which is strange: http://www.mwasoftware.co.uk/ibx

Quote
How does OPM work? Does it depend on you to make the new version available manually?
Usually yes, but the package maintener can provide a json file, which will notify the user if a new version of the package is available.

gerardus

  • Jr. Member
  • **
  • Posts: 93
Re: Online Package Manager
« Reply #1465 on: December 13, 2018, 06:06:01 pm »
Yes, I can update to 2.3.2, but it has separate files for windows and linux, which is strange: http://www.mwasoftware.co.uk/ibx

Strange indeed. A quick comparison of the source code shows no differences.

Usually yes, but the package maintener can provide a json file, which will notify the user if a new version of the package is available.

Ok, thanks. I don't really need the new IBX version, it was basically curiosity. 
« Last Edit: December 13, 2018, 06:09:41 pm by gerardus »

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: Online Package Manager
« Reply #1466 on: December 16, 2018, 07:32:05 pm »
Download is slow, i'm downloading at 200 kb/s when I regularly download between 3 and 4 mb/s from GitHub. Not bad, just noticed it when trying to download Castle Game Engine that's maybe a really big package.

Maybe we can mirror it at github with github downloads in a project, also you can get the number of downloads from each package.

I will investigate the GitHub API if we can build an automatic mirror.

Edit, found this: https://github.com/hypermodules/gh-release-assets

You pass an array of files and all of them are uploaded.

I was building one with Lazarus, but I have no idea on how to make a post request with a zip file on it.
« Last Edit: December 17, 2018, 12:08:22 am by lainz »

balazsszekely

  • Guest
Re: Online Package Manager
« Reply #1467 on: December 17, 2018, 07:44:01 am »
@lainz
Quote
Download is slow, i'm downloading at 200 kb/s when I regularly download between 3 and 4 mb/s from GitHub. Not bad, just noticed it when trying to download Castle Game Engine that's maybe a really big package.
Most likely the download speed is limited by the site administrator(@Marc). Usually a package is a few MB in size, so 200 KB/s should be OK in most cases. Castle Game Engine and RestDataware are the two exception with 126 MB size and 154 MB respectively. Even with +100MB size, a few minutes is more then enough to download a package. Not exceptional but acceptable in my opinion. :)

Quote
Maybe we can mirror it at github with github downloads in a project, also you can get the number of downloads from each package.
I'm not against it, but somebody must maintain the mirror. Unfortunately my time is very limited lately.

Quote
I will investigate the GitHub API if we can build an automatic mirror.
Edit, found this: https://github.com/hypermodules/gh-release-assets
You pass an array of files and all of them are uploaded.
Looks good.

Quote
I was building one with Lazarus, but I have no idea on how to make a post request with a zip file on it.
I use the following code to upload zip files to my server:
Code: Pascal  [Select][+][-]
  1. function PostFile(const AURL, AFieldName, AFileName: String): Boolean;
  2. var
  3.   SS: TStringStream;
  4. begin
  5.   Result := False;
  6.   SS := TStringStream.Create('');
  7.   try
  8.     FHTTPClient := TFPHTTPClient.Create(nil);
  9.     try
  10.       try
  11.         FHttpClient.FileFormPost(AURL, AFieldName, AFileName, SS);
  12.       except
  13.       end;
  14.       Result := SS.DataString = 'zipok';
  15.     finally
  16.       FHTTPClient.Free;
  17.     end;
  18.   finally
  19.     SS.Free;
  20.   end;
  21. end;

Php on server side:
Code: PHP  [Select][+][-]
  1. <?php
  2.   if (isset($_FILES['zip']['name']) && !empty($_FILES['zip']['name']))
  3.   {
  4.     $tmp_name_zip = $_FILES['zip']['tmp_name'];
  5.  
  6.     $location = 'zipfiles/';
  7.     if (move_uploaded_file($tmp_name_zip, $location . $_FILES['zip']['name']))      
  8.       echo 'zipok';
  9.   }
  10. ?>

In your case, assuming that the server accepts files, just check the SS.DataString. It should contain the server response.
« Last Edit: December 17, 2018, 08:12:24 am by GetMem »

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: Online Package Manager
« Reply #1468 on: December 18, 2018, 12:32:35 am »
Thanks for the code I should try again.

antispam88

  • Jr. Member
  • **
  • Posts: 60
Re: Online Package Manager
« Reply #1469 on: December 23, 2018, 12:44:59 pm »
I did tests also with 2.0 RC2 and with trunk 59715. In both versions a package is marked as installed when the package is only loaded via "Open Package File (.lpk)".
Fixed in r. 59717, please test. Thanks again for the feedback.

Sry for my late answer!
I tested it with trunk (r. 59862) and it is now ok.
But in 2.0.0 RC3 it is still marked as installed. Any chance to get a fix for 2.0.0?
Best regards,
antispam88

 

TinyPortal © 2005-2018