From d6aedf99e8e5bae7a35ec48dc1e3c8a8cdf6b49a Mon Sep 17 00:00:00 2001 From: juha Date: Fri, 5 Feb 2021 11:28:01 +0000 Subject: [PATCH] OPM: Use FPC_FULLVERSION for checking compiler version. git-svn-id: trunk@64461 - --- .gitattributes | 1 - .../onlinepackagemanager/fpcmod/opkman_httpclient.pas | 2 -- components/onlinepackagemanager/opkman_downloader.pas | 4 +--- components/onlinepackagemanager/opkman_fpcdef.inc | 5 ----- components/onlinepackagemanager/opkman_updates.pas | 11 ++++++----- components/onlinepackagemanager/opkman_uploader.pas | 4 +--- components/onlinepackagemanager/opkman_zipper.pas | 4 +--- 7 files changed, 9 insertions(+), 22 deletions(-) delete mode 100644 components/onlinepackagemanager/opkman_fpcdef.inc diff --git a/.gitattributes b/.gitattributes index f0224ba9c2..049636b6a5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3920,7 +3920,6 @@ components/onlinepackagemanager/opkman_createrepositoryfrm.pas svneol=native#tex components/onlinepackagemanager/opkman_createrepositorypackagefrm.lfm svneol=native#text/plain components/onlinepackagemanager/opkman_createrepositorypackagefrm.pas svneol=native#text/pascal components/onlinepackagemanager/opkman_downloader.pas svneol=native#text/pascal -components/onlinepackagemanager/opkman_fpcdef.inc svneol=native#text/pascal components/onlinepackagemanager/opkman_installer.pas svneol=native#text/pascal components/onlinepackagemanager/opkman_intf.pas svneol=native#text/pascal components/onlinepackagemanager/opkman_intf_packagelistfrm.lfm svneol=native#text/plain diff --git a/components/onlinepackagemanager/fpcmod/opkman_httpclient.pas b/components/onlinepackagemanager/fpcmod/opkman_httpclient.pas index 9fd681454c..e25f0c66e8 100644 --- a/components/onlinepackagemanager/fpcmod/opkman_httpclient.pas +++ b/components/onlinepackagemanager/fpcmod/opkman_httpclient.pas @@ -21,8 +21,6 @@ unit opkman_httpclient; {$mode objfpc}{$H+} -{$INCLUDE opkman_fpcdef.inc} - interface uses diff --git a/components/onlinepackagemanager/opkman_downloader.pas b/components/onlinepackagemanager/opkman_downloader.pas index b09b07ee1c..1313cd12af 100644 --- a/components/onlinepackagemanager/opkman_downloader.pas +++ b/components/onlinepackagemanager/opkman_downloader.pas @@ -26,15 +26,13 @@ unit opkman_downloader; {$mode objfpc}{$H+} -{$INCLUDE opkman_fpcdef.inc} - interface uses Classes, SysUtils, fpjson, LazIDEIntf, md5, // OpkMan opkman_common, opkman_serializablepackages, opkman_const, opkman_options, - {$IFDEF FPC320}fphttpclient, opensslsockets{$ELSE}opkman_httpclient{$ENDIF}; + {$IF FPC_FULLVERSION>=30200}fphttpclient, opensslsockets{$ELSE}opkman_httpclient{$ENDIF}; type TDownloadType = (dtJSON, dtPackage, dtUpdate); diff --git a/components/onlinepackagemanager/opkman_fpcdef.inc b/components/onlinepackagemanager/opkman_fpcdef.inc deleted file mode 100644 index 440aa14fc1..0000000000 --- a/components/onlinepackagemanager/opkman_fpcdef.inc +++ /dev/null @@ -1,5 +0,0 @@ -{$IF FPC_VERSION = 3} - {$IF FPC_RELEASE > 1} - {$DEFINE FPC320} - {$ENDIF} -{$ENDIF} diff --git a/components/onlinepackagemanager/opkman_updates.pas b/components/onlinepackagemanager/opkman_updates.pas index be050c142f..6bb18f659a 100644 --- a/components/onlinepackagemanager/opkman_updates.pas +++ b/components/onlinepackagemanager/opkman_updates.pas @@ -25,8 +25,6 @@ unit opkman_updates; {$mode objfpc}{$H+} -{$INCLUDE opkman_fpcdef.inc} - interface uses @@ -37,8 +35,11 @@ uses // OpkMan opkman_serializablepackages, opkman_options, opkman_common, opkman_visualtree, opkman_OpenSSLfrm, - {$IFDEF FPC320}zipper,{$ELSE}opkman_zip,{$ENDIF} - {$IFDEF FPC320}fphttpclient, opensslsockets{$ELSE}opkman_httpclient{$ENDIF}; + {$IF FPC_FULLVERSION>=30200} + zipper, fphttpclient, opensslsockets; + {$ELSE} + opkman_zip, opkman_httpclient; + {$ENDIF} const OpkVersion = 1; @@ -251,7 +252,7 @@ begin FreeOnTerminate := True; OnTerminate := @DoTerminated; FHTTPClient := TFPHTTPClient.Create(nil); - {$IFDEF FPC320} + {$IF FPC_FULLVERSION>=30200} FHTTPClient.IOTimeout := Options.ConTimeOut*1000; {$ENDIF} if Options.ProxyEnabled then diff --git a/components/onlinepackagemanager/opkman_uploader.pas b/components/onlinepackagemanager/opkman_uploader.pas index 343418a551..f924489c75 100644 --- a/components/onlinepackagemanager/opkman_uploader.pas +++ b/components/onlinepackagemanager/opkman_uploader.pas @@ -26,15 +26,13 @@ unit opkman_uploader; {$mode objfpc}{$H+} -{$INCLUDE opkman_fpcdef.inc} - interface uses Classes, SysUtils, base64, // OpkMan opkman_options, opkman_const, - {$IFDEF FPC320}fphttpclient, opensslsockets{$ELSE}opkman_httpclient{$ENDIF}; + {$IF FPC_FULLVERSION>=30200}fphttpclient, opensslsockets{$ELSE}opkman_httpclient{$ENDIF}; type TOnUploadProgress = procedure(Sender: TObject; AFileName: String) of object; diff --git a/components/onlinepackagemanager/opkman_zipper.pas b/components/onlinepackagemanager/opkman_zipper.pas index bedaf52700..0959d9cf04 100644 --- a/components/onlinepackagemanager/opkman_zipper.pas +++ b/components/onlinepackagemanager/opkman_zipper.pas @@ -26,8 +26,6 @@ unit opkman_zipper; {$mode objfpc}{$H+} -{$INCLUDE opkman_fpcdef.inc} - interface uses @@ -36,7 +34,7 @@ uses FileUtil, LazFileUtils, // OpkMan opkman_serializablepackages, opkman_common, - {$IFDEF FPC320}zipper{$ELSE}opkman_zip{$ENDIF}; + {$IF FPC_FULLVERSION>=30200}zipper{$ELSE}opkman_zip{$ENDIF}; type TOnProgressEx = procedure(Sender : TObject; const ATotPos, ATotSize: Int64);