mirror of
				https://gitlab.com/freepascal.org/lazarus/lazarus.git
				synced 2025-11-04 15:49:32 +01:00 
			
		
		
		
	OpkMan: Reuse TPkgVersion from IdeIntf. Create RTTI with {$M+}.
git-svn-id: trunk@54408 -
This commit is contained in:
		
							parent
							
								
									a2d555718e
								
							
						
					
					
						commit
						e6bf771bf6
					
				@ -24,23 +24,36 @@ type
 | 
				
			|||||||
    );
 | 
					    );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  TPkgVersion = class
 | 
					  TPkgVersion = class
 | 
				
			||||||
 | 
					  private
 | 
				
			||||||
 | 
					    FMajor: integer;
 | 
				
			||||||
 | 
					    FMinor: integer;
 | 
				
			||||||
 | 
					    FRelease: integer;
 | 
				
			||||||
 | 
					    FBuild: integer;
 | 
				
			||||||
 | 
					    FValid: TPkgVersionValid;
 | 
				
			||||||
 | 
					    FOnChange: TNotifyEvent;
 | 
				
			||||||
 | 
					    function GetAsString: String;
 | 
				
			||||||
 | 
					    procedure SetAsString(const AValue: String);
 | 
				
			||||||
  public
 | 
					  public
 | 
				
			||||||
    Major: integer;
 | 
					 | 
				
			||||||
    Minor: integer;
 | 
					 | 
				
			||||||
    Release: integer;
 | 
					 | 
				
			||||||
    Build: integer;
 | 
					 | 
				
			||||||
    Valid: TPkgVersionValid;
 | 
					 | 
				
			||||||
    OnChange: TNotifyEvent;
 | 
					 | 
				
			||||||
    procedure Clear;
 | 
					    procedure Clear;
 | 
				
			||||||
    function Compare(Version2: TPkgVersion): integer;
 | 
					    function Compare(Version2: TPkgVersion): integer;
 | 
				
			||||||
    function CompareMask(ExactVersion: TPkgVersion): integer;
 | 
					    function CompareMask(ExactVersion: TPkgVersion): integer;
 | 
				
			||||||
    procedure Assign(Source: TPkgVersion);
 | 
					    procedure Assign(Source: TPkgVersion);
 | 
				
			||||||
    function AsString: string;
 | 
					    //function AsString: string;
 | 
				
			||||||
    function AsWord: string;
 | 
					    function AsWord: string;
 | 
				
			||||||
 | 
					    function GetIsNullVersion: Boolean;
 | 
				
			||||||
    function ReadString(const s: string): boolean;
 | 
					    function ReadString(const s: string): boolean;
 | 
				
			||||||
    procedure SetValues(NewMajor, NewMinor, NewRelease, NewBuild: integer;
 | 
					    procedure SetValues(NewMajor, NewMinor, NewRelease, NewBuild: integer;
 | 
				
			||||||
                        NewValid: TPkgVersionValid = pvtBuild);
 | 
					                        NewValid: TPkgVersionValid = pvtBuild);
 | 
				
			||||||
    function VersionBound(v: integer): integer;
 | 
					    function VersionBound(v: integer): integer;
 | 
				
			||||||
 | 
					  public
 | 
				
			||||||
 | 
					    property AsString: String read GetAsString write SetAsString;
 | 
				
			||||||
 | 
					    property Major: Integer read FMajor write FMajor;
 | 
				
			||||||
 | 
					    property Minor: Integer read FMinor write FMinor;
 | 
				
			||||||
 | 
					    property Release: Integer read FRelease write FRelease;
 | 
				
			||||||
 | 
					    property Build: Integer read FBuild write FBuild;
 | 
				
			||||||
 | 
					    property IsNullVersion: Boolean read GetIsNullVersion;
 | 
				
			||||||
 | 
					    property Valid: TPkgVersionValid read FValid write FValid;
 | 
				
			||||||
 | 
					    property OnChange: TNotifyEvent read FOnChange write FOnChange;
 | 
				
			||||||
  end;
 | 
					  end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  { PkgDependency flags }
 | 
					  { PkgDependency flags }
 | 
				
			||||||
@ -125,51 +138,82 @@ end;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
function TPkgVersion.Compare(Version2: TPkgVersion): integer;
 | 
					function TPkgVersion.Compare(Version2: TPkgVersion): integer;
 | 
				
			||||||
begin
 | 
					begin
 | 
				
			||||||
  Result:=Major-Version2.Major;
 | 
					  Result:=FMajor-Version2.FMajor;
 | 
				
			||||||
  if Result<>0 then exit;
 | 
					  if Result<>0 then exit;
 | 
				
			||||||
  Result:=Minor-Version2.Minor;
 | 
					  Result:=FMinor-Version2.FMinor;
 | 
				
			||||||
  if Result<>0 then exit;
 | 
					  if Result<>0 then exit;
 | 
				
			||||||
  Result:=Release-Version2.Release;
 | 
					  Result:=FRelease-Version2.FRelease;
 | 
				
			||||||
  if Result<>0 then exit;
 | 
					  if Result<>0 then exit;
 | 
				
			||||||
  Result:=Build-Version2.Build;
 | 
					  Result:=FBuild-Version2.FBuild;
 | 
				
			||||||
end;
 | 
					end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function TPkgVersion.CompareMask(ExactVersion: TPkgVersion): integer;
 | 
					function TPkgVersion.CompareMask(ExactVersion: TPkgVersion): integer;
 | 
				
			||||||
begin
 | 
					begin
 | 
				
			||||||
  if Valid=pvtNone then exit(0);
 | 
					  if FValid=pvtNone then exit(0);
 | 
				
			||||||
  Result:=Major-ExactVersion.Major;
 | 
					  Result:=FMajor-ExactVersion.FMajor;
 | 
				
			||||||
  if Result<>0 then exit;
 | 
					  if Result<>0 then exit;
 | 
				
			||||||
  if Valid=pvtMajor then exit;
 | 
					  if FValid=pvtMajor then exit;
 | 
				
			||||||
  Result:=Minor-ExactVersion.Minor;
 | 
					  Result:=FMinor-ExactVersion.FMinor;
 | 
				
			||||||
  if Result<>0 then exit;
 | 
					  if Result<>0 then exit;
 | 
				
			||||||
  if Valid=pvtMinor then exit;
 | 
					  if FValid=pvtMinor then exit;
 | 
				
			||||||
  Result:=Release-ExactVersion.Release;
 | 
					  Result:=FRelease-ExactVersion.FRelease;
 | 
				
			||||||
  if Result<>0 then exit;
 | 
					  if Result<>0 then exit;
 | 
				
			||||||
  if Valid=pvtRelease then exit;
 | 
					  if FValid=pvtRelease then exit;
 | 
				
			||||||
  Result:=Build-ExactVersion.Build;
 | 
					  Result:=FBuild-ExactVersion.FBuild;
 | 
				
			||||||
end;
 | 
					end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
procedure TPkgVersion.Assign(Source: TPkgVersion);
 | 
					procedure TPkgVersion.Assign(Source: TPkgVersion);
 | 
				
			||||||
begin
 | 
					begin
 | 
				
			||||||
  SetValues(Source.Major,Source.Minor,Source.Release,Source.Build,Source.Valid);
 | 
					  SetValues(Source.FMajor,Source.FMinor,Source.FRelease,Source.FBuild,Source.FValid);
 | 
				
			||||||
end;
 | 
					end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function TPkgVersion.AsString: string;
 | 
					function TPkgVersion.GetAsString: String;
 | 
				
			||||||
begin
 | 
					begin
 | 
				
			||||||
  Result:=IntToStr(Major)+'.'+IntToStr(Minor);
 | 
					  Result:=IntToStr(FMajor)+'.'+IntToStr(FMinor);
 | 
				
			||||||
  if (Build<>0) then
 | 
					  if (FBuild<>0) then
 | 
				
			||||||
    Result:=Result+'.'+IntToStr(Release)+'.'+IntToStr(Build)
 | 
					    Result:=Result+'.'+IntToStr(FRelease)+'.'+IntToStr(FBuild)
 | 
				
			||||||
  else if (Release<>0) then
 | 
					  else if (FRelease<>0) then
 | 
				
			||||||
    Result:=Result+'.'+IntToStr(Release)
 | 
					    Result:=Result+'.'+IntToStr(FRelease)
 | 
				
			||||||
 | 
					end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					procedure TPkgVersion.SetAsString(const AValue: String);
 | 
				
			||||||
 | 
					var
 | 
				
			||||||
 | 
					  Version: String;
 | 
				
			||||||
 | 
					  P, I, V: Integer;
 | 
				
			||||||
 | 
					begin
 | 
				
			||||||
 | 
					  Clear;
 | 
				
			||||||
 | 
					  if AValue = '' then Exit;
 | 
				
			||||||
 | 
					  I := 0;
 | 
				
			||||||
 | 
					  Version := Trim(AValue) + '.';
 | 
				
			||||||
 | 
					  repeat
 | 
				
			||||||
 | 
					     Inc(I);
 | 
				
			||||||
 | 
					     P := Pos('.', Version);
 | 
				
			||||||
 | 
					     if P <> 0 then
 | 
				
			||||||
 | 
					     begin
 | 
				
			||||||
 | 
					       V := StrToIntDef(Copy(Version, 1, P-1), 0);
 | 
				
			||||||
 | 
					       case I of
 | 
				
			||||||
 | 
					         1: FMajor   := V;
 | 
				
			||||||
 | 
					         2: FMinor   := V;
 | 
				
			||||||
 | 
					         3: FRelease := V;
 | 
				
			||||||
 | 
					         4: FBuild   := V;
 | 
				
			||||||
 | 
					       end;
 | 
				
			||||||
 | 
					       Delete(Version, 1, P);
 | 
				
			||||||
 | 
					     end;
 | 
				
			||||||
 | 
					  until (Version = '') or (P = 0) or (I > 4);
 | 
				
			||||||
end;
 | 
					end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function TPkgVersion.AsWord: string;
 | 
					function TPkgVersion.AsWord: string;
 | 
				
			||||||
begin
 | 
					begin
 | 
				
			||||||
  Result:=IntToStr(Major)+'_'+IntToStr(Minor);
 | 
					  Result:=IntToStr(FMajor)+'_'+IntToStr(FMinor);
 | 
				
			||||||
  if (Build<>0) then
 | 
					  if (FBuild<>0) then
 | 
				
			||||||
    Result:=Result+'_'+IntToStr(Release)+'_'+IntToStr(Build)
 | 
					    Result:=Result+'_'+IntToStr(FRelease)+'_'+IntToStr(FBuild)
 | 
				
			||||||
  else if (Release<>0) then
 | 
					  else if (FRelease<>0) then
 | 
				
			||||||
    Result:=Result+'_'+IntToStr(Release)
 | 
					    Result:=Result+'_'+IntToStr(FRelease)
 | 
				
			||||||
 | 
					end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function TPkgVersion.GetIsNullVersion: Boolean;
 | 
				
			||||||
 | 
					begin
 | 
				
			||||||
 | 
					  Result := (FMajor = 0) and (FMinor = 0) and (FRelease = 0) and (FBuild = 0);
 | 
				
			||||||
end;
 | 
					end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function TPkgVersion.ReadString(const s: string): boolean;
 | 
					function TPkgVersion.ReadString(const s: string): boolean;
 | 
				
			||||||
@ -215,14 +259,14 @@ begin
 | 
				
			|||||||
  NewMinor:=VersionBound(NewMinor);
 | 
					  NewMinor:=VersionBound(NewMinor);
 | 
				
			||||||
  NewRelease:=VersionBound(NewRelease);
 | 
					  NewRelease:=VersionBound(NewRelease);
 | 
				
			||||||
  NewBuild:=VersionBound(NewBuild);
 | 
					  NewBuild:=VersionBound(NewBuild);
 | 
				
			||||||
  if (NewMajor=Major) and (NewMinor=Minor) and (NewRelease=Release)
 | 
					  if (NewMajor=FMajor) and (NewMinor=FMinor) and (NewRelease=FRelease)
 | 
				
			||||||
  and (NewBuild=Build) and (NewValid=Valid) then exit;
 | 
					  and (NewBuild=FBuild) and (NewValid=FValid) then exit;
 | 
				
			||||||
  Major:=NewMajor;
 | 
					  FMajor:=NewMajor;
 | 
				
			||||||
  Minor:=NewMinor;
 | 
					  FMinor:=NewMinor;
 | 
				
			||||||
  Release:=NewRelease;
 | 
					  FRelease:=NewRelease;
 | 
				
			||||||
  Build:=NewBuild;
 | 
					  FBuild:=NewBuild;
 | 
				
			||||||
  Valid:=NewValid;
 | 
					  FValid:=NewValid;
 | 
				
			||||||
  if Assigned(OnChange) then OnChange(Self);
 | 
					  if Assigned(FOnChange) then FOnChange(Self);
 | 
				
			||||||
end;
 | 
					end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function TPkgVersion.VersionBound(v: integer): integer;
 | 
					function TPkgVersion.VersionBound(v: integer): integer;
 | 
				
			||||||
 | 
				
			|||||||
@ -35,7 +35,7 @@ uses
 | 
				
			|||||||
  // LazUtils
 | 
					  // LazUtils
 | 
				
			||||||
  FileUtil, Laz2_XMLCfg, LazFileUtils,
 | 
					  FileUtil, Laz2_XMLCfg, LazFileUtils,
 | 
				
			||||||
  // IdeIntf
 | 
					  // IdeIntf
 | 
				
			||||||
  PackageIntf,
 | 
					  PackageDependencyIntf, PackageIntf,
 | 
				
			||||||
  // OpkMan
 | 
					  // OpkMan
 | 
				
			||||||
  opkman_common, opkman_const, opkman_options;
 | 
					  opkman_common, opkman_const, opkman_options;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -64,35 +64,19 @@ type
 | 
				
			|||||||
  TPackageStates = set of TPackageState;
 | 
					  TPackageStates = set of TPackageState;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  TChangeType = (ctAdd, ctRemove);
 | 
					  TChangeType = (ctAdd, ctRemove);
 | 
				
			||||||
 | 
					 | 
				
			||||||
  TSortType = (stName, stDate);
 | 
					  TSortType = (stName, stDate);
 | 
				
			||||||
 | 
					 | 
				
			||||||
  TSortOrder = (soAscendent, soDescendent);
 | 
					  TSortOrder = (soAscendent, soDescendent);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  { TPackageVersion }
 | 
					  {$M+}
 | 
				
			||||||
 | 
					  TPackageVersion = class(TPkgVersion)
 | 
				
			||||||
  TPackageVersion = class(TPersistent)
 | 
					 | 
				
			||||||
  private
 | 
					 | 
				
			||||||
    FMajor: Integer;
 | 
					 | 
				
			||||||
    FMinor: Integer;
 | 
					 | 
				
			||||||
    FRelease: Integer;
 | 
					 | 
				
			||||||
    FBuild: Integer;
 | 
					 | 
				
			||||||
    function GetAsString: String;
 | 
					 | 
				
			||||||
    procedure SetAsString(const AValue: String);
 | 
					 | 
				
			||||||
    function GetIsNullVersion: Boolean;
 | 
					 | 
				
			||||||
  public
 | 
					 | 
				
			||||||
    procedure SetDefaults;
 | 
					 | 
				
			||||||
    procedure Assign(ASource: TPersistent); override;
 | 
					 | 
				
			||||||
    function CompareVersion(AVersion: TPackageVersion): Integer;
 | 
					 | 
				
			||||||
    function SameVersion(AVersion: TPackageVersion): Boolean;
 | 
					 | 
				
			||||||
    property AsString: String read GetAsString write SetAsString;
 | 
					 | 
				
			||||||
  published
 | 
					  published
 | 
				
			||||||
    property Major: Integer read FMajor write FMajor;
 | 
					    property Major;
 | 
				
			||||||
    property Minor: Integer read FMinor write FMinor;
 | 
					    property Minor;
 | 
				
			||||||
    property Release: Integer read FRelease write FRelease;
 | 
					    property Release;
 | 
				
			||||||
    property Build: Integer read FBuild write FBuild;
 | 
					    property Build;
 | 
				
			||||||
    property IsNullVersion: Boolean read GetIsNullVersion;
 | 
					    property IsNullVersion;
 | 
				
			||||||
  end;
 | 
					  end;
 | 
				
			||||||
 | 
					  {$M-}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  { TPackageDependency }
 | 
					  { TPackageDependency }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -318,89 +302,6 @@ var
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
implementation
 | 
					implementation
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{ TPackageVersion }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
function TPackageVersion.GetAsString: String;
 | 
					 | 
				
			||||||
begin
 | 
					 | 
				
			||||||
  Result := IntToStr(Major) + '.' + IntToStr(Minor) + '.' + IntToStr(Release) + '.' + IntToStr(Build);
 | 
					 | 
				
			||||||
end;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
procedure TPackageVersion.SetAsString(const AValue: String);
 | 
					 | 
				
			||||||
var
 | 
					 | 
				
			||||||
  Version: String;
 | 
					 | 
				
			||||||
  P, I: Integer;
 | 
					 | 
				
			||||||
begin
 | 
					 | 
				
			||||||
  SetDefaults;
 | 
					 | 
				
			||||||
  if AValue = '' then
 | 
					 | 
				
			||||||
    Exit;
 | 
					 | 
				
			||||||
  I := 0;
 | 
					 | 
				
			||||||
  Version := Trim(AValue) + '.';
 | 
					 | 
				
			||||||
  repeat
 | 
					 | 
				
			||||||
     Inc(I);
 | 
					 | 
				
			||||||
     P := Pos('.', Version);
 | 
					 | 
				
			||||||
     if P <> 0 then
 | 
					 | 
				
			||||||
     begin
 | 
					 | 
				
			||||||
       case I of
 | 
					 | 
				
			||||||
         1: FMajor := StrToIntDef(Copy(Version, 1, P - 1), 0);
 | 
					 | 
				
			||||||
         2: FMinor := StrToIntDef(Copy(Version, 1, P - 1), 0);
 | 
					 | 
				
			||||||
         3: FRelease := StrToIntDef(Copy(Version, 1, P - 1), 0);
 | 
					 | 
				
			||||||
         4: FBuild := StrToIntDef(Copy(Version, 1, P - 1), 0);
 | 
					 | 
				
			||||||
       end;
 | 
					 | 
				
			||||||
       Delete(Version, 1, P);
 | 
					 | 
				
			||||||
     end;
 | 
					 | 
				
			||||||
  until (Version = '') or (P = 0) or (I > 4);
 | 
					 | 
				
			||||||
end;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
function TPackageVersion.GetIsNullVersion: Boolean;
 | 
					 | 
				
			||||||
begin
 | 
					 | 
				
			||||||
  Result := (FMajor = 0) and (FMinor = 0) and (FRelease = 0) and (FBuild = 0);
 | 
					 | 
				
			||||||
end;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
procedure TPackageVersion.SetDefaults;
 | 
					 | 
				
			||||||
begin
 | 
					 | 
				
			||||||
  FMajor := 0;
 | 
					 | 
				
			||||||
  FMinor := 0;
 | 
					 | 
				
			||||||
  FRelease := 0;
 | 
					 | 
				
			||||||
  FBuild := 0;
 | 
					 | 
				
			||||||
end;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
procedure TPackageVersion.Assign(ASource: TPersistent);
 | 
					 | 
				
			||||||
var
 | 
					 | 
				
			||||||
  Source: TPackageVersion;
 | 
					 | 
				
			||||||
begin
 | 
					 | 
				
			||||||
  SetDefaults;
 | 
					 | 
				
			||||||
  if ASource is TPackageVersion then
 | 
					 | 
				
			||||||
  begin
 | 
					 | 
				
			||||||
    Source := ASource as TPackageVersion;
 | 
					 | 
				
			||||||
    Major := Source.Major;
 | 
					 | 
				
			||||||
    Minor := Source.Minor;
 | 
					 | 
				
			||||||
    Release := Source.Release;
 | 
					 | 
				
			||||||
    Build := Source.Build;
 | 
					 | 
				
			||||||
  end
 | 
					 | 
				
			||||||
  else
 | 
					 | 
				
			||||||
    inherited Assign(Source);
 | 
					 | 
				
			||||||
end;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
function TPackageVersion.CompareVersion(AVersion: TPackageVersion): Integer;
 | 
					 | 
				
			||||||
begin
 | 
					 | 
				
			||||||
  Result := Major - AVersion.Major;
 | 
					 | 
				
			||||||
  if (Result = 0) then
 | 
					 | 
				
			||||||
  begin
 | 
					 | 
				
			||||||
    Result := Minor - AVersion.Minor;
 | 
					 | 
				
			||||||
    if (Result = 0) then
 | 
					 | 
				
			||||||
    begin
 | 
					 | 
				
			||||||
      Result := Release - AVersion.Release;
 | 
					 | 
				
			||||||
      if (Result = 0) then
 | 
					 | 
				
			||||||
        Result := Build - AVersion.Build;
 | 
					 | 
				
			||||||
    end;
 | 
					 | 
				
			||||||
  end;
 | 
					 | 
				
			||||||
end;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
function TPackageVersion.SameVersion(AVersion: TPackageVersion): Boolean;
 | 
					 | 
				
			||||||
begin
 | 
					 | 
				
			||||||
  Result := CompareVersion(AVersion) = 0;
 | 
					 | 
				
			||||||
end;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
{ TPackageDependency }
 | 
					{ TPackageDependency }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
procedure TPackageDependency.SetMinVersion(const AValue: TPackageVersion);
 | 
					procedure TPackageDependency.SetMinVersion(const AValue: TPackageVersion);
 | 
				
			||||||
@ -576,7 +477,7 @@ end;
 | 
				
			|||||||
constructor TPackageFile.Create;
 | 
					constructor TPackageFile.Create;
 | 
				
			||||||
begin
 | 
					begin
 | 
				
			||||||
  FVersion := TPackageVersion.Create;
 | 
					  FVersion := TPackageVersion.Create;
 | 
				
			||||||
  FVersion.SetDefaults;
 | 
					  FVersion.Clear;
 | 
				
			||||||
  PackageStates := [];
 | 
					  PackageStates := [];
 | 
				
			||||||
  FDependencies := TPackageDependencies.Create(TPackageDependency);
 | 
					  FDependencies := TPackageDependencies.Create(TPackageDependency);
 | 
				
			||||||
end;
 | 
					end;
 | 
				
			||||||
@ -780,7 +681,7 @@ begin
 | 
				
			|||||||
    else
 | 
					    else
 | 
				
			||||||
    begin
 | 
					    begin
 | 
				
			||||||
      D2 := ASL.Objects[J] as TPackageDependency;
 | 
					      D2 := ASL.Objects[J] as TPackageDependency;
 | 
				
			||||||
      if D1.MinVersion.CompareVersion(D2.MinVersion) > 0 then
 | 
					      if D1.MinVersion.Compare(D2.MinVersion) > 0 then
 | 
				
			||||||
        D2.MinVersion.Assign(D1.MinVersion);
 | 
					        D2.MinVersion.Assign(D1.MinVersion);
 | 
				
			||||||
    end;
 | 
					    end;
 | 
				
			||||||
    if (ALevel >= 0) and (J = -1) Then
 | 
					    if (ALevel >= 0) and (J = -1) Then
 | 
				
			||||||
@ -1527,12 +1428,12 @@ begin
 | 
				
			|||||||
  if PackageDependency.MinVersion.IsNullVersion then
 | 
					  if PackageDependency.MinVersion.IsNullVersion then
 | 
				
			||||||
    MinVerOk := True
 | 
					    MinVerOk := True
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
    MinVerOk := PackageDependency.MinVersion.CompareVersion(DependencyPackage.Version) <= 0;
 | 
					    MinVerOk := PackageDependency.MinVersion.Compare(DependencyPackage.Version) <= 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if PackageDependency.MaxVersion.IsNullVersion then
 | 
					  if PackageDependency.MaxVersion.IsNullVersion then
 | 
				
			||||||
    MaxVerOk := True
 | 
					    MaxVerOk := True
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
    MaxVerOk := PackageDependency.MaxVersion.CompareVersion(DependencyPackage.Version) >= 0;
 | 
					    MaxVerOk := PackageDependency.MaxVersion.Compare(DependencyPackage.Version) >= 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  Result := (MinVerOk) and (MaxVerOk)
 | 
					  Result := (MinVerOk) and (MaxVerOk)
 | 
				
			||||||
end;
 | 
					end;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user