Recent

Author Topic: internettools cannot installed from online package manager  (Read 298 times)

wytwyt02

  • New Member
  • *
  • Posts: 44
internettools cannot installed from online package manager
« on: November 19, 2019, 01:01:18 pm »
When I install internettools from online package manager, It shows success installed, but not shows in the Option -> Install/Uninstall packages, and cannot use this package in unit.pas.

I check the github source and compare the downloaded source, I found online package manager downloaded source files is older than github files.

wp

  • Hero Member
  • *****
  • Posts: 6471
Re: internettools cannot installed from online package manager
« Reply #1 on: November 19, 2019, 05:41:59 pm »
InternetTools is a "runtime" package (convince yourself by looking at its .lpk file in the IDE: "Package" > "Open package file" > "Options" > "Package Options" > "IDE Integration" > "Package Type"). Such a package does not add anything to the component palette nor to the "Install/Uninstall packages" dialog. The button "Install" of the OPM here is labeled a bit incorrectly, only designtime packages must be "installed" (i.e. linked to the IDE).

When you want to use a unit of the "InternetTools" you must add the package to the requirements of the project: "Project" > "Project Inspector", Right-click "Required Packages" > "New requirement", select "InternetTools" in the list, "OK". This way the IDE knows where to find the unit. Do not add the path to the Internettools to the search path of the project as you might do in Delphi - bypassing the Lazarus package system can call for trouble!
Lazarus trunk / fpc 3.0.4 / all 32-bit on Win-10

wytwyt02

  • New Member
  • *
  • Posts: 44
Re: internettools cannot installed from online package manager
« Reply #2 on: November 21, 2019, 03:41:04 am »
InternetTools is a "runtime" package (convince yourself by looking at its .lpk file in the IDE: "Package" > "Open package file" > "Options" > "Package Options" > "IDE Integration" > "Package Type"). Such a package does not add anything to the component palette nor to the "Install/Uninstall packages" dialog. The button "Install" of the OPM here is labeled a bit incorrectly, only designtime packages must be "installed" (i.e. linked to the IDE).

When you want to use a unit of the "InternetTools" you must add the package to the requirements of the project: "Project" > "Project Inspector", Right-click "Required Packages" > "New requirement", select "InternetTools" in the list, "OK". This way the IDE knows where to find the unit. Do not add the path to the Internettools to the search path of the project as you might do in Delphi - bypassing the Lazarus package system can call for trouble!

Thanks, But when I follow your step, and doing following code:

Code: Pascal  [Select]
  1. query('doc(' + aFile + ')//table[@id="zhuye"]');
the errors shows:

Quote
File "D:\lazarus\every_day_maker\xquery__regex.pas" not found.

every_day_maker in the path is my project folder.

wp

  • Hero Member
  • *****
  • Posts: 6471
Re: internettools cannot installed from online package manager
« Reply #3 on: November 21, 2019, 11:04:30 am »
Did you add "internettools" to the requirements of your project? See screenshot.

I had problems calling query() in my test program because the compiler did not find unit FLREUnicode. There seems to be a bug in the internettools package path settings: Open the package, click "Options" and add "flre-master\src\Unicode" to the "other unit files" of node "Compiler options" > "Paths". After this change the demo program compiled.
Lazarus trunk / fpc 3.0.4 / all 32-bit on Win-10

wytwyt02

  • New Member
  • *
  • Posts: 44
Re: internettools cannot installed from online package manager
« Reply #4 on: November 21, 2019, 10:57:36 pm »
Did you add "internettools" to the requirements of your project? See screenshot.

I had problems calling query() in my test program because the compiler did not find unit FLREUnicode. There seems to be a bug in the internettools package path settings: Open the package, click "Options" and add "flre-master\src\Unicode" to the "other unit files" of node "Compiler options" > "Paths". After this change the demo program compiled.

Thanks, I download the source code from github and manually add path, it works