How to install internettools ?? lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- benz8 · 2014-10-06 09:06 When i install the package from" internettools.lpk" i get a erreur message : not found "xquery.pas" !! i must install it to ?? ---------------------------------------------------------------------- benz8 · 2014-10-06 10:36 xquery.pas(72,12) Fatal: Can not find unit xquery used by simplehtmltreeparser. ---------------------------------------------------------------------- Mike.Cornflake · 2014-10-06 10:44 I'm wildly guessing this is what you're trying to install http://www.benibela.de/documentation/internettools/ I note this on the first line: QuoteSince the Internet Tools and their XQuery-Engine consist of a set of simple Pascal units they do not require installation. So, it doesn't look to me like you will actually need to to install a package.  Just ensure you have all the required files, and that they are in your project search path.  Hmmm.  But if that was the case, you wouldn't be seeing this error anyway... Can you confirm if there is a file called xquery.pas somewhere in the collection you downloaded?   Maybe it's a separate download.... ---------------------------------------------------------------------- benz8 · 2014-10-06 13:47 i find the file 'xquery.pas' in the path '\internettools\data\ xquery.pas' but i have alaways the erreur message  'xquery.pas not fount' ---------------------------------------------------------------------- Mike.Cornflake · 2014-10-06 14:03 Try adding that XQuery.pas to the package as a file (Click the Ajouter button).  Once you've added that, you may need to repeat the exercise with a few related files.  If this works, let Benibela know the file is missing from the package.  Going on his documentation, I don't think he expected anyone to actually use the package, so might not have kept it up to date...  (Or, of course, something else is happening...) ---------------------------------------------------------------------- wp · 2014-10-06 14:13 If I download the internettools from this url (http://www.benibela.de/bin/sources/internettools.zip) there is no problem at all to compile the package internettools.lpk. ---------------------------------------------------------------------- magleft · 2014-10-06 16:59 Do you have added the '\internettools\data\ in paths? ---------------------------------------------------------------------- benz8 · 2014-10-06 21:40 whay lazarus can't accept uses 'simpleinternet' after installation ??? ---------------------------------------------------------------------- Mike.Cornflake · 2014-10-06 21:47 Well, the biggest clue is in the error.  You have to add the package internettools to your project. Lazarus - Project - Project Inspector - second add button (Add other) - Second Tab Sheet (Add new requirement), from the dropdown list, choose InternetTools. UPDATE:  Might be worth reading through the following so you've got an idea of what's happening http://wiki.freepascal.org/Lazarus_Packages ---------------------------------------------------------------------- benz8 · 2014-10-06 22:04 Yep! it work, Very good thank's all : Mike.Cornflake, magleft, wp, ---------------------------------------------------------------------- coradi · 2017-11-03 12:22 Hallo, if I try this I get ---------------------------------------------------------------------- Mike.Cornflake · 2017-11-03 16:43 Quote from: coradi on November 03, 2017, 01:22:45 pmHallo, if I try this I get Your screenshot only shows 3 of the 4 warnings.  None of those will cause compilation to fail.  You need to show us what the error is (Fehler I think).  There should be a vertical scrollbar ---------------------------------------------------------------------- coradi · 2017-11-03 17:44 ups,  :-) here it is ---------------------------------------------------------------------- Mike.Cornflake · 2017-11-03 18:42 Quote from: coradi on November 03, 2017, 06:44:19 pmups,  :-) here it is Hmmm, could be several things.  I'm not actually all that familiar with the software package.   Where did you download internettools from, and what version of Lazarus/fpc are you using?  When I get a chance (could be a while), I'll download and attempt to reproduce the issue. In the meantime, I note wp's comment above.  If you downloaded from a different source, could you re-try from this one? Quote from: wp on October 06, 2014, 04:13:39 pmIf I download the internettools from this url (http://www.benibela.de/bin/sources/internettools.zip) there is no problem at all to compile the package internettools.lpk. ---------------------------------------------------------------------- coradi · 2017-11-03 19:23 I loaded it direct from the source, newest Verison.Lazrus newest Version ---------------------------------------------------------------------- molly · 2017-11-03 20:44 Add the import/FLRE/src directory to your project or copy the .pas files from there to your project's directory. Better would perhaps be to add FLRE to your FPC packages as it is a Free Pascal project and not specifically a Lazarus one. FLRE is not 'installed' by package interrnettools (it was written by BeRo and not by user BeniBela who wrote internettools). Your project is unable to locate the required source-files, hence the error. ---------------------------------------------------------------------- Bazzao · 2018-04-04 03:28 Hi Molly, Internettools is what I want. I have downloaded the zip file and extracted it. I don't think I will need it for many projects, but will need it for a few so how do I "Add the import/FLRE/src directory" to the project? And while on the subject, where is a good place for little units such as these, given it is to be used only in a few applications. I feel the source code area for the current project is not suitable. Also note, for the current project, I have 2 build modes. Thanks Bazza ---------------------------------------------------------------------- molly · 2018-04-04 04:51 Quote from: Bazzao on April 04, 2018, 05:28:25 amInternettools is what I want. I have downloaded the zip file and extracted it. Earlier in this thread it is mentioned (link to wiki available as well) how to install the internettools package to your lazarus installation and how to add this dependency to your current project (e.g. there seems no apparent reason to repeat, unless you experience issues with these instructions) QuoteI don't think I will need it for many projects, but will need it for a few so how do I "Add the import/FLRE/src directory" to the project? The easiest way would be to extract the FLRE sources and copy the files from that mentioned directory into the (root) folder of your current project. QuoteAnd while on the subject, where is a good place for little units such as these, given it is to be used only in a few applications. I feel the source code area for the current project is not suitable. For a) testing purposes and b) not using it often it would suffice to just copy the FLRE files to your projects directory. If you would want to do it in a more sturdy manner then i already mentioned to add FLRE units to your free pascal installation (free pascal, not lazarus). The easiest solution can be done using one of following two methods a) copy compiled FLRE units into your free pascal units directory (situated at architecture subdirectory) or b) add an additional units directory for 3th party units (let say for example they are situated in unitsx, with a subdirectory for every individual 3th party addition). The latter requires you to add the new unitsx unit directory to your units search directory inside your free pascal configuration file (for example -FuX:\Development\pascal\FPC\$FPCVERSION\unitsx\$FPCTARGET\*) QuoteAlso note, for the current project, I have 2 build modes. Whether that is of influence or not depends on the differences in build mode and/or what it is you desire. Do you have you Free Pascal units compiled separately using those build modes as well ? if so, then apply the same for the FLRE sources and compile twice, once for each build-mode. In that case you know which subdirectories (for the different builds) to use. If not, then just simply compile the FLRE sources with FPC using default build mode used by Free Pascal (as was done for all the other free pascal packages) and you should be good to go to use those. Because things can be tricky (make sure to use verbose logging to get better informed where the compiler is looking/searching), feel free to complain in case you experience problems. Make sure to post full log messages in order to be able to locate the culprit so that we're able to pinpoint what's going wrong. Other approaches are quite possible (and perhaps even easier) but for those i would redirect you to original author of internettools. I have mentioned in the past that i've got no clue as of why this 'solution' (which actually isn't a solution rather a burden for end-user) was chosen and i refuse to fill in the gaps for the original author. He created this mess, so he should fix it ---------------------------------------------------------------------- Bazzao · 2018-04-04 07:58 Hi Molly, Thanks for the quick reply. If you mean http://wiki.freepascal.org/Lazarus_Packages then I am struggling, as it is so generic. I did look at that before posting and posted because it is all gobbledy-gook to me. I tried adding files from Internet tools to project inspector, but got the same error message as others in previous posts. During a build it asked me if I wanted the package linked to the 4 build modes there (I only use 2), so I accepted the default (all checked). It asked me a similar question a second time, so I accepted the default of all checked. When you don't know, just accept the default. After the supposed build, again the same error message as others in previous posts. Copying source files to the projects root I want to absolutely avoid as I store projects in different subdirectories. > copy compiled FLRE units into your free pascal units directory (situated at architecture subdirectory) or "situated at architecture subdirectory" ... you have lost me. Bazza ---------------------------------------------------------------------- molly · 2018-04-04 08:42 Ok, let's start from scratch then, breaking things down in individual steps. Part 1: install a new package. 1) download internettools zip archive. 2) extract the archive to a location where you (read: lazarus) have enough access rights to be able to read the extracted files. 3) start lazarus, and follow instructions (note the correct paragraph) This will/should add a new (previously non existing package) internettools to your lazarus list of known packages. Part 2: Add/install package to your lazarus installation Now that you've done the previously part, you should be able to add an already existing package to your lazarus installation. Part 3; Add the package to the list of dependencies of your project. See Reply #8 made by Mike.Cornflake Quote from: Mike.Cornflake on October 06, 2014, 11:47:58 pm... You have to add the package internettools to your project. Lazarus - Project - Project Inspector - second add button (Add other) - Second Tab Sheet (Add new requirement), from the dropdown list, choose InternetTools. In addition to the above, it seems that when defining use FLRE, there is also the dependency for this package. I suggested to add this package to Free Pascal, to make it more permanent (and also usable when using stand-alone fpc compiler. It is just a suggestion, not a must). If you look at the FPC installation inside you lazarus directory, you'll (hopefully) notice a path something similar as: D:\Apps\Development\Lazarus\fpc\3.0.4\units\i386-win32 the part i386-win32 is also named the architecture. This will be named differently when you are targeting another platform, f.e. (cross) compiling your application for the pi would be using the units located in the path like: D:\Apps\Development\Lazarus\fpc\3.0.4\units\arm- linux If you have used different build-modes for Free pascal then one way to distinguish is to place them inside another directory that explicitly distinguishes between different builds (in order to prevent constant recompilation when changing build-modes). For example my debug compiled units are located at: D:\Apps\Development\Lazarus\fpc\3.0.4\unitsdbg\arm-linux That hopefully answers your questions related to architecture and build modes. if not then feel free to ask (*) (*) In case this is magic to your ears, then please forget about it immediately. Because in that case you do not use different build modes for your FPC units/packages and you should not start worrying about that at this point in time. Part 4: the FLRE units 1) Inside the archive you've downloaded/extracted  is a directory named import/FLRE/src 2) copy these files to a location where you are able to compile them with plain FPC compiler (or use lazarus to open the files and compile them). 3) copy the compiled units into D:\Apps\Development\Lazarus\fpc\3.0.4\units\i386-win32\FLRE (replace the used path in this example with the one used on your system and take note of the architecture that you are using. It would have to match yours). That should work for you to have a more permanents installation of the FLRE package. With all these steps you should now be able to open up your project (or start a new one), add the internettools dependency to your project and start using the internettools package. Don't forget to set the internettools parameters correctly before compiling/building your project. e.g. explicitly setting use FLRE define if that is what you wish for the package to use (same as for other options available in the internettools package) In case of errors, please state which part, which number and what error message you receive and try to post a verbose log (or better yet, try to read the verbose log yourself and see what the compiler actually tries to do). These logs can be very long, so you could cut some stuff away, but take note of parts where it tries to search for the (missing) units. ---------------------------------------------------------------------- Bazzao · 2018-04-04 09:52 Hi Molly, Thanks it worked. Still only half way through your post though. Will read and digest the rest. I did have some compile errors, but worked my way through them (getting lots of experience). While I was waiting to get internettools compiled I developed the rest of the scraping code, and the results with the tools working are as expected, so the scraping works. Many thanks, Bazza