Adding Lazarus Package file support to Indy 10.7#576
Adding Lazarus Package file support to Indy 10.7#576MWASoftware wants to merge 13 commits intoIndySockets:Indy-10.7from
Conversation
Lib/System/IdWship6.pas
Outdated
|
|
||
| {$I IdCompilerDefines.inc} | ||
|
|
||
| {$IFDEF WINDOWS} |
There was a problem hiding this comment.
IdWship6 is a Windows-only unit. It should not be compiled in other platforms. This check is redundant.
There was a problem hiding this comment.
Lazarus/fpc is a cross-platform write once environment and has a substantial number of Windows users. It is wrong to exclude a unit from a Lazarus package on the grounds that it can only be used in Windows.
Conditional compilation within the unit is the simplest way of allowing platform specific code to be part of a unit. The Lazarus IDE maintains package units automatically and platform specific units cannot be readily included in a package whilst compiling them only when the package is compiled on their target platform.
lazarus-fpc/indysystem.pas
Outdated
| IdBaseComponent, IdComponent, IdCTypes, IdException, IdGlobal, IdIDN, | ||
| IdResourceStrings, IdResourceStringsDotNet11, IdResourceStringsIconv, | ||
| IdResourceStringsKylixCompat, IdResourceStringsTextEncoding, | ||
| IdResourceStringsUnix, IdResourceStringsVCLPosix, IdStack, IdStackBSDBase, |
There was a problem hiding this comment.
VCLPosix is for Delphi only. FreePascal should not be compiling Indy's VCLPosix units. Also, FreePascal should not be compiling Unix units on Windows, and vice versa.
There was a problem hiding this comment.
I can confirm that removing the VCLPosix units does not seem to affect the Lazarus packages on Linux or Windows and have removed them from the lazarus packages on my Indy10-7 branch.
lazarus-fpc/indysystem.pas
Outdated
| IdResourceStringsKylixCompat, IdResourceStringsTextEncoding, | ||
| IdResourceStringsUnix, IdResourceStringsVCLPosix, IdStack, IdStackBSDBase, | ||
| IdStackConsts, IdStream, IdStreamVCL, IdStruct, IdTransactedFileStream, | ||
| IdVCLPosixSupplemental, IdWinsock2, IdWship6, IdAntiFreezeBase, |
There was a problem hiding this comment.
IdWinsock2 and IdWship6 should not be compiled on non-Windows platforms. And Posix units should not be compiled on Windows.
…dows builds these will be in search path and hence included in builds.
Author: Tony Whyman <tony.whyman@mccallumwhyman.com>
|
I have brought the Indy-10.7 branch in my repo up-to-date and tested. Note: I found an error in the merge changes from your upstream repo - a missing parameter in Lib/Core/IdDsnBaseCmpEdt.pas in a call to showaboutbox. I had to fix this to compile and test - hopefully added the correct param value. If you do merge my changes in, I suggest you add "-s recursive -X renormalize" to git merge e.g. The reason for this is that I am working on Linux and some files have LF endings instead of CR/LF. See the .gitattributes file. |
|
This pull requests removes the out-of-date "getIndy.sh" and replaces it with a set of lazarus packages in the new subdir "lazarus-fpc". This packages have the same structure as the Delphi packages and do not require any changes to the source tree to be
used.
Makefile.fpc files are also provided for use with fpcmake.
See README.lazarus-fpc for more information.
There are also some minor patches to the source files in order to ensure that they can be compiled with FPC.