-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding Lazarus Package file support to Indy 10.7 #576
base: Indy-10.7
Are you sure you want to change the base?
Conversation
Lib/System/IdWship6.pas
Outdated
@@ -34,6 +34,7 @@ interface | |||
|
|||
{$I IdCompilerDefines.inc} | |||
|
|||
{$IFDEF WINDOWS} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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.