Lnet, Indy new versions ? lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- mirce.vladimirov · 2015-09-29 12:51 I got Lnet 0.6.5 released in March 2011 on http://sourceforge.net/projects/lazarus-ccr/files/lNet/ and Indy indy4lazarus-20040117 on  http://sourceforge.net/projects/indy4lazarus/?source=typ_redirect. I wanted to test Indy. Tried to install but diferent kind of errors reported about comment on leve13 in IdWinSock2.pas then i removed those extra "{" and tried to install again but then another error was reported about "asm found instead of begin", something like that. It was too much work for me, I know there are alternatives in FreePascal/Lazarus. So i dumped the Indy4Laz and I turned on to Lnet 0.6.5, initially had a little problem but few people on this forum helped me out and i finally managed to programaticaly download stuf via Lnet's FTP and I thought everything was fine, But nope, I bumped into a bug described at http://forum.lazarus.freepascal.org/index.php/topic,12422.msg63878. html#msg63878 where Lnet's author Almindor (highest respect for his work on Lnet) says he was going to fix that bug for the next release and that gave me hope that there are probably later versions of both Indy4Lazarus and Lnet but it is mabe me that cant google it out. So, does anybody knows, are there later stabile versions than these ? P.S. I know about Synapse, it's really great, powerful yet simple to use, but it's not supported for WinCE/WindowsMobile/WindowsEmbeded. ---------------------------------------------------------------------- ChrisF · 2015-09-29 12:55 Current version of Indy:   http://indy.fulgan.com/ (in zip directory) Indy forum:   http://forums2.atozed.com/ ---------------------------------------------------------------------- derek.john.evans · 2015-09-29 13:30 I don't even try to install the fulgan Indy version. Its too problematic. Just add these 3 folders to your project path: Code: [Select]indy\Lib\Protocols; indy\Lib\System; indy\Lib\Core; And then create your Indy components in code. Its a far more powerful way to get full control over Indy. Or, the other option, is to get the Indy version released with CodeTyphon. (07-07-2015 ver 10.6.2.10  SVN Rev 5284) from the CodeTyphon libraries: http://www.pilotlogic.com/codetyphon/current/src/typhon_src.7z Copy the folder pl_Indy to your components folder. Open the package, and you need to replace the requirement "bs_ideintf" with "ideintf". It will then compile and install into Lazarus, and you will have a bunch of pretty new component tabs. Even though I have the Typhon version installed, I only use it to find components and units. I still create the components via code. ---------------------------------------------------------------------- ChrisF · 2015-09-29 13:43 Quote from: Geepster on September 29, 2015, 03:30:36 pmI don't even try to install the fulgan Indy version. Its too problematic.   [...] I don't agree. The current versions of the fulgan Indy release are less "problematic". Currently, the only remaining trouble concerning the installation is the necessity to compile the package twice before installing it and rebuilding the IDE. And it's not really necessary to add the Indy paths in the project (if Indy controls are not used, I mean): adding the indylaz package in the concerned project dependencies is much more simple and portable, IMHO. ---------------------------------------------------------------------- derek.john.evans · 2015-09-29 13:49 Quote from: ChrisF on September 29, 2015, 03:43:48 pmCurrently, the only remaining trouble concerning the installation is the necessity to compile the package twice before installing it and rebuilding the IDE. I'll try that next time I install. Thanks for the info. ---------------------------------------------------------------------- derek.john.evans · 2015-09-29 14:04 Quote from: Geepster on September 29, 2015, 03:49:06 pmQuote from: ChrisF on September 29, 2015, 03:43:48 pmCurrently, the only remaining trouble concerning the installation is the necessity to compile the package twice before installing it and rebuilding the IDE. I'll try that next time I install. Thanks for the info. Tried it. Grrrrr. Missing files. I tried the instructions from here: http://wiki.freepascal.org/Indy_with_Lazarus Obviously it is possible, but I prefer the 3 project path method, or Typhon library method. ---------------------------------------------------------------------- ChrisF · 2015-09-29 15:27 Well, I don't intend to force anybody to use a given method to install Indy. But I think it would be easier, especially for people who are not "experts", to just use the standard package released by default for Indy. Apparently, the standard package is working for some other people, including me (see the last page of  this topic http://forum.lazarus.freepascal.org/index.php/topic,20782.45.html, for instance). But I'm afraid the wiki is a bit outdated. Could you please post the error message you've got (i.e. what file is missing) ? It would interesting to know which problem you've encountered, in order to see if this issue could be fixed. For instance, as an illustration here are my own -standard- steps to install Indy (fulgan current package): - unzip the whole package (though only a few directories are needed, indeed), - open the Indy package (indylaz.lpk) in the Lazarus IDE, - compile it., - compile it once again. This is the only remaining issue concerning the installation; and the second compilation is extremely fast as it's not really a "compilation", - use -> install, - rebuild the Lazarus IDE. It's OK for me, without any directory manipulations nor any file changes or updates. There are still a few issues for Indy but they are not really concerning the installation: - as spotted by GetMem, there is a problem with the TIdSync unit (if you are using it of course), - the by-default icons installed in the Lazarus IDE are the 16 color ones: they are a bit "weird" (at least IMHO). But .lrs files with the 256 color ones are available (they must be replaced before the package compilation step). ---------------------------------------------------------------------- derek.john.evans · 2015-09-29 15:57 WinXP LAZ1.5 FPC3.0 Unzipped into C:\components\Indy10_5304\ indysystemlaz.lpk seems to be missing (apart from the builder template) I'm unsure what the package builder stuff does. It seems like the packages don't refer to the filenames in the directory structure, or, maybe paths have to be set, or, I don't know. Would be nice if this was cleared up. **EDIT** I tried the package from here which compiled. http://forum.lazarus.freepascal.org/index.php/topic,20782.msg178828.ht ml#msg178828 So, I guess, the Indy guys need to update their package. ---------------------------------------------------------------------- balazsszekely · 2015-09-29 16:48 @Geepster 1. Create a folder inside "$(LazarusDir)/Components",  Indy10.6.2.0 for example. 2. Unzip "Indy10_5304.zip\Lib\Core" , "Indy10_5304.zip\Lib\Protocols", "Indy10_5304.zip\Lib\System" and "Indy10_5304.zip\Lib\indylaz.lpk"   to Indy10.6.2.0. 3. Open indylaz.lpk, compile twice, then install. 4. You have the latest version of indy ---------------------------------------------------------------------- ChrisF · 2015-09-29 17:18 @Geepster: Did you use the .lpk files into the \Builder(\Package Generator\LazTemplates) directory ? (Edit: Or have you used the "all files in one directory method" of the Wiki with the current .lpk file ?) If yes, it's the reason of your troubles: this directory is not to be used for. In fact, and as also indicated by GetMem, only -a part- of the files and subdirectories of the \Lib directory must be used. I've made a test using the standard (i.e. fulgan) \Lib\indylaz.lpk file with a configuration similar to yours (WinXP with trunk versions of FPC and Lazarus) and it's OK for me. Anyway, there is an additional problem with the trunk versions of Lazarus. When you modify the "Set UTF-8 in RTL" option, the Indy package is compiled with some other parts of the LCL; which is really a problem at this step, because of the current remaining issue (i.e. the reason to compile Indy twice during the installation of the package). *** Edit*** BTW, by curiosity I've just had a quick glance at the Code Typhon version of Indy. Apparently they have provided a fix for the remaining issue (in ctinfo.txt): QuoteNOTE: IdStream.pas: spilt to IdStream_int.inc, IdStream_imp.inc and add to IdGlobal.pas And they are also installing the 256 colors icons by default. ---------------------------------------------------------------------- Graeme · 2015-09-30 08:32 Quote from: Geepster on September 29, 2015, 04:04:52 pmObviously it is possible, but I prefer the 3 project path method I haven't tried the latest Indy, but in general I fully agree with what you said. These days I have more issues with Lazarus Packages than ever before. Due to that I now rather opt to use Path Macros and specify the paths in new project templates - pretty much like MSEide does as standard for years. This method just works, and no more fighting with Laz Packages, and I get more optimised compiled units and executables in the end. ---------------------------------------------------------------------- Graeme · 2015-09-30 08:35 Quote from: ChrisF on September 29, 2015, 05:27:57 pmsteps to install Indy (fulgan current package): This is the first time I hear the term "fulgan". Would you mind explaining what that is? Is it the official Indy or a fork? ---------------------------------------------------------------------- mirce.vladimirov · 2015-09-30 08:48 Quote from: ChrisF on September 29, 2015, 02:55:54 pmCurrent version of Indy:   http://indy.fulgan.com/ (in zip directory) Indy forum:   http://forums2.atozed.com/ @graeme This was a few posts back. ---------------------------------------------------------------------- Graeme · 2015-09-30 10:13 Quote from: mirce.vladimirov on September 30, 2015, 10:48:09 amIndy forum:   http://forums2.atozed.com/ This was a few posts back. Thanks.  Umm.... Forums.... What happened to the NNTP newsgroups?  atozedsoftware.infy.fpc etc.  If they dropped NNTP, that is a real shame too.... I hate web forums! ---------------------------------------------------------------------- Thaddy · 2015-09-30 12:46 Quote from: Graeme on September 30, 2015, 12:13:41 pmQuote from: mirce.vladimirov on September 30, 2015, 10:48:09 amIndy forum:   http://forums2.atozed.com/ This was a few posts back. Thanks.  Umm.... Forums.... What happened to the NNTP newsgroups?  atozedsoftware.infy.fpc etc.  If they dropped NNTP, that is a real shame too.... I hate web forums! NNTP has no authentication mechanism since it is derived from old spec SMTP, making it very, very vulnerable to spoofing and spamming. Hence nobody wants to, or should, use it. It has passed its sell-by date. (This time I leave out what some consider Indy bashing since it is not relevant) ---------------------------------------------------------------------- Graeme · 2015-09-30 13:25 Quote from: Thaddy on September 30, 2015, 02:46:40 pmNNTP has no authentication mechanism since it is derived from old spec SMTP Wow, wrong on both counts. NNTP was originally (loosely) based on the UUCP network design. If you didn't know (maybe too young), UUCP was a direct point-to-point network via telephone lines. NNTP also has authentication support written into the protocol specification documents - see the link below.   https://tools.ietf.org/html/rfc4643 Most NNTP admins simply don't bother setting up authentication, because it is one extra hurdle for the end-user, before they can post messages. I consider that a benefit. As for spamming.... that seems generally limited to USENET, not privately hosted news servers. I've been hosting my own news server for about 7 years now (for some open source projects) and don't have any spammers at all. ps:  Embarcadero (the owner of Delphi) has a News Server setup that require authentication to read and post messages. On a side note, they also have a Web Forum interface to that news server (I have this too for my own News Server). So the best of both worlds. ;-) I do understand the younger generation [not implying anything regarding your age] like web forums, because they just love emoticons and web browsers. I personally love NNTP because I can download messages and read offline if I choose, great for archiving and full text searching, messages are mostly plain-text, and most importantly, I can choose my own News Client software (which contains the features I like - eg: ignore messages from specific people, arrange message threads, tag or label messages of interest, sorting in various ways, custom filtering, portable client on flash drive etc). QuoteIt has passed its sell-by date. I definitely disagree with you on that. Just because some technology was designed so well and just works (hardly any maintenance or improvements required to the specification for years), doesn't mean it is outdated or obsolete. It simply means it has achieved its purpose, and does its job very well. Like I said, I see many benefits of NNTP over web forums. Anyway, back to Indy's News Server - I see you can still post message to it, so that is good. ---------------------------------------------------------------------- balazsszekely · 2015-09-30 15:11 Ok, but who likes Indy? And who really hates it? Most importantly why? ---------------------------------------------------------------------- Graeme · 2015-09-30 15:35 Quote from: GetMem on September 30, 2015, 05:11:30 pmOk, but who likes Indy? And who really hates it? Most importantly why? I have tried both Synapse and Indy in various projects. Synapse is nice and less complicated (how it is written) that Indy. But the issue with Synapse is that it only gives you the bare bones. They leave it for you to implement every protocol yourself. Yes they supply a handful or protocols, but then only the client versions of them. This is where Indy shines! Indy supplies you with every protocol under the sun, and they include both the Client and the Server. That is very convenient, and saves me a ton of time. Indy also seems like a much more actively developed project than Synapse. So my money is on Indy. ---------------------------------------------------------------------- mirce.vladimirov · 2015-10-03 13:22 I must say Indy works great with Lazarus,  very powerful. I made few tests with Geepster's suggestion : QuoteJust add these 3 folders to your project path: Code: [Select]indy\Lib\Protocols; indy\Lib\System; indy\Lib\Core; And in my testing desktop-application all went good. Now when I wanted to implement stuff in my WinCE application i got this errorr during compile : Code: [Select]C:\lazarus\components\Indy10_5304\Lib\System\IdWship6.pa s(610,32) Error: Incompatible type for arg no. 1: Got "PWideChar", expected "PChar" C:\lazarus\components\Indy10_5304\Lib\System\IdWship6.pas(617,32) Error: Incompatible type for arg no. 2: Got "PWideChar", expected "PChar" C:\lazarus\components\Indy10_5304\Lib\System\IdWship6.pas(738,7) Error: Incompatible type for arg no. 2: Got "PWideChar", expected "PChar" C:\lazarus\components\Indy10_5304\Lib\System\IdWship6.pas(772,32) Error: Incompatible type for arg no. 2: Got "PWideChar", expected "PChar" C:\lazarus\components\Indy10_5304\Lib\System\IdWship6.pas(787,24) Error: Incompatible type for arg no. 1: Got "PWideChar", expected "PChar" C:\lazarus\components\Indy10_5304\Lib\System\IdWship6.pas(1101,19) Error: Incompatible type for arg no. 1: Got "Array[0..5] Of WideChar", expected "PChar" C:\lazarus\components\Indy10_5304\Lib\System\IdWship6.pas(1102,17) Warning: Local variable "szBuffer" does not seem to be initialized C:\lazarus\components\Indy10_5304\Lib\System\IdWship6.pas(1140,25) Error: Incompatible type for arg no. 1: Got "Array[0..5] Of WideChar", expected "PChar" C:\lazarus\components\Indy10_5304\Lib\System\IdWship6.pas(1155,27) Error: Incompatible type for arg no. 1: Got "Array[0..5] Of WideChar", expected "PChar" C:\lazarus\components\Indy10_5304\Lib\System\IdWship6.pas(1159,49) Error: Incompatible type for arg no. 1: Got "PWideChar", expected "PChar" C:\lazarus\components\Indy10_5304\Lib\System\IdWship6.pas(1160,42) Error: Incompatible type for arg no. 2: Got "PWideChar", expected "PChar" C:\lazarus\components\Indy10_5304\Lib\System\IdWship6.pas(1222,43) Error: Incompatible type for arg no. 1: Got "PWideChar", expected "PChar" C:\lazarus\components\Indy10_5304\Lib\System\IdWship6.pas(1223,36) Error: Incompatible type for arg no. 2: Got "PWideChar", expected "PChar" C:\lazarus\components\Indy10_5304\Lib\System\IdWship6.pas(1255,39) Error: Incompatible type for arg no. 2: Got "PWideChar", expected "PChar" C:\lazarus\components\Indy10_5304\Lib\System\IdWship6.pas(1416,28) Error: Incompatible type for arg no. 1: Got "PWideChar", expected "PChar" C:\lazarus\components\Indy10_5304\Lib\System\IdWship6.pas(1419,31) Error: Incompatible type for arg no. 1: Got "PWideChar", expected "PChar" C:\lazarus\components\Indy10_5304\Lib\System\IdWship6.pas(1528) Fatal: There were 15 errors compiling module, stopping And there is also a picture attached which explains more.  Is it a parameter that I'm passing to a Indy's program ? Or is there a workaround that I could do ? ---------------------------------------------------------------------- derek.john.evans · 2015-10-03 13:40 Looks like a UNICODE setting issue. In IdGlobal (line 390) you have: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i     {$IFDEF UNICODE}  TIdPlatformString = TIdUnicodeString;  TIdPlatformChar = TIdWideChar;  PIdPlatformChar = PIdWideChar;    {$ELSE}  TIdPlatformString = AnsiString;  TIdPlatformChar = TIdAnsiChar;  PIdPlatformChar = PIdAnsiChar;    {$ENDIF}   On my desktop, UNICODE is undefined. It looks like you have it defined somehow for WINCE. Either in your project or, some setting that effects IdCompilerDefines.inc Thats my guess. ---------------------------------------------------------------------- Jurassic Pork · 2015-10-03 13:46 hello, Mirce, may be you can look at  here Friendly, J.P