1
0
mirror of https://bitbucket.org/Dennis07/lina-components.git synced 2025-08-24 21:49:04 +02:00

Version 1.0 DEV 1.17

Signed-off-by: Dennis07 <den.goehlert@t-online.de>
This commit is contained in:
Dennis07
2017-07-05 02:59:39 +02:00
parent 31d66a5d9f
commit 3add381cd9
9 changed files with 557 additions and 293 deletions

Binary file not shown.

View File

@@ -32,7 +32,6 @@ object fmMain: TfmMain
Height = 200
Align = alRight
TabOrder = 1
ExplicitHeight = 201
object btLaunch: TButton
Left = 8
Top = 168
@@ -69,9 +68,6 @@ object fmMain: TfmMain
Height = 19
Panels = <>
SimplePanel = True
ExplicitLeft = 192
ExplicitTop = 208
ExplicitWidth = 0
end
object DelphiManager: TDelphiManager
Left = 40

View File

@@ -54,7 +54,7 @@ end;
procedure TfmMain.btLaunchClick(Sender: TObject);
begin
DelphiManager.Launch(NameToDelphiVersion(rgVersions.Items.Strings[rgVersions.ItemIndex]));
DelphiManager.Versions[NameToDelphiVersion(rgVersions.Items.Strings[rgVersions.ItemIndex])].Launch;
end;
procedure TfmMain.btRefreshClick(Sender: TObject);
@@ -63,7 +63,7 @@ var
Index: TDelphiVersion;
begin
rgVersions.Items.Clear;
Installed := DelphiManager.Installed;
Installed := DelphiManager.InstalledVersions;
for Index := Low(TDelphiVersion) to High(TDelphiVersion) do
begin
if Index in Installed then
@@ -86,7 +86,7 @@ end;
procedure TfmMain.FormCreate(Sender: TObject);
begin
StatusBar.SimpleText := 'Built with ' + DelphiManager.VersionFullName + ' "' + DelphiManager.VersionCodeName + '" and Lina Components v' + FloatToStr(DelphiManager.LinaVersion) + ' for ' + DelphiManager.LocalPlatformFullName;
StatusBar.SimpleText := 'Built with ' + DelphiManager.Info.VersionFullName + ' "' + DelphiManager.Info.VersionCodeName + '" and Lina Components v' + FloatToStr(DelphiManager.Info.LinaVersion) + ' for ' + DelphiManager.Info.LocalPlatformFullName;
btRefresh.Click;
end;

Binary file not shown.

Binary file not shown.

View File

@@ -30,7 +30,7 @@ type
TSplashScreenAnimation = (ssaNone,ssaShallow);
TProgressBarManagerMode = (pmmNone,pmmBattery,pmmDownload);
TListBoxManagerMode = (lmmNone,lmmEdit,lmmComboBox);
TDiagramLayout = (dloColumns,dloPoints,dloLines,dloCustom);
TDiagramLayout = (dloColumns,dloPoints,dloStraightLines,dloCurvedLines,dloCustom);
TDiagramGridLines = (dglHorizontal,dglVertical,dglBoth);
TDiagramTrendLineMethod = (dtlFirstLast,dtlAvgAll,dtlAvgLeftRight);
@@ -549,6 +549,10 @@ type
constructor Create(ADiagram: TDiagram);
destructor Destroy; override;
function AddData(Data: TDiagramValueData): TDiagramValue;
procedure ImportFromFile(const FileName: String);
procedure ExportToFile(const FileName: String);
procedure LoadFromFile(const FileName: String);
procedure SaveToFile(const FileName: String);
property MinValue: Integer read GetMinValue;
property MaxValue: Integer read GetMaxValue;
property MidValue: Integer read GetMidValue;
@@ -832,6 +836,14 @@ type
procedure SetScale(Value: TDiagramScale);
procedure SetAutoColors(Value: TDiagramAutoColors);
procedure SetTrendLine(Value: TDiagramTrendLine);
function GetValueRect(Index: Integer): TRect; overload;
function GetZeroWidth: Integer;
function GetZeroHeight: Integer;
function GetValueHeight(Value: Integer): Integer;
function GetHeightValue(Height: Integer): Integer;
function GetValueLeft(Index: Integer): Integer;
function GetValueWidth: Integer;
function GetValueSpace: Integer;
protected
{ Protected-Deklarationen }
procedure Paint; override;
@@ -845,24 +857,25 @@ type
procedure DrawValue(Index: Integer); virtual;
procedure DrawColumn(Index: Integer); virtual;
procedure DrawPoint(Index: Integer); virtual;
procedure DrawLine(Index: Integer); virtual;
function ZeroWidth: Integer;
function ZeroHeight: Integer;
function ValueHeight(Value: Integer): Integer;
function HeightValue(Height: Integer): Integer;
function ValueLeft(Index: Integer): Integer;
function ValueWidth: Integer;
function ValueSpace: Integer;
procedure DrawStraightLine(Index: Integer); virtual;
procedure DrawCurvedLine(Index: Integer); virtual;
procedure PropertyChange(Sender: TObject);
procedure MouseMove(Shift: TShiftState; X, Y: Integer); override;
procedure CMMouseEnter(var Message: TMessage); message CM_MOUSEENTER;
procedure CMMouseLeave(var Message: TMessage); message CM_MOUSELEAVE;
function GetValueRect(Value: TDiagramValue): TRect; overload;
public
{ Public-Deklarationen }
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
function ValueRect(Index: Integer): TRect; overload;
function ValueRect(Value: TDiagramValue): TRect; overload;
property ValueRect[Index: Integer]: TRect read GetValueRect;
property ZeroWidth: Integer read GetZeroWidth;
property ZeroHeight: Integer read GetZeroHeight;
property ValueHeight[Value: Integer]: Integer read GetValueHeight;
property HeightValue[Height: Integer]: Integer read GetHeightValue;
property ValueLeft[Index: Integer]: Integer read GetValueLeft;
property ValueWidth: Integer read GetValueWidth;
property ValueSpace: Integer read GetValueSpace;
published
{ Published-Deklarationen }
{ Ereignisse }
@@ -2592,6 +2605,59 @@ begin
(Add as TDiagramValue).Data := Data;
end;
procedure TDiagramValues.ImportFromFile(const FileName: String);
var
DataFile: file of TDiagramValueData;
Data: TDiagramValueData;
begin
AssignFile(DataFile,FileName);
Reset(DataFile);
while not Eof(DataFile) do
begin
Read(DataFile,Data);
AddData(Data);
end;
CloseFile(DataFile);
end;
procedure TDiagramValues.ExportToFile(const FileName: String);
var
DataFile: file of TDiagramValueData;
Index: Integer;
Data: TDiagramValueData;
begin
AssignFile(DataFile,FileName);
Reset(DataFile);
for Index := 0 to Count - 1 do
begin
Data := (Items[Index] as TDiagramValue).Data;
Write(DataFile,Data);
end;
CloseFile(DataFile);
end;
procedure TDiagramValues.LoadFromFile(const FileName: String);
begin
Clear;
ImportFromFile(FileName);
end;
procedure TDiagramValues.SaveToFile(const FileName: String);
var
DataFile: file of TDiagramValueData;
Index: Integer;
Data: TDiagramValueData;
begin
AssignFile(DataFile,FileName);
Rewrite(DataFile);
for Index := 0 to Count - 1 do
begin
Data := (Items[Index] as TDiagramValue).Data;
Write(DataFile,Data);
end;
CloseFile(DataFile);
end;
{ ----------------------------------------------------------------------------
TDiagramScaleValueArtLines
---------------------------------------------------------------------------- }
@@ -3281,24 +3347,35 @@ begin
end;
end;
end;
dloLines: for Index := 0 to Values.Count - 1 do
begin
if (Values.Items[Index] as TDiagramValue).Visible then
begin
DrawLine(Index);
if Assigned(OnDrawValue) then
begin
OnDrawValue(Self,Index);
end;
end;
end;
dloStraightLines: for Index := 0 to Values.Count - 1 do
begin
if (Values.Items[Index] as TDiagramValue).Visible then
begin
DrawStraightLine(Index);
if Assigned(OnDrawValue) then
begin
OnDrawValue(Self,Index);
end;
end;
end;
dloCurvedLines: for Index := 0 to Values.Count - 1 do
begin
if (Values.Items[Index] as TDiagramValue).Visible then
begin
DrawCurvedLine(Index);
if Assigned(OnDrawValue) then
begin
OnDrawValue(Self,Index);
end;
end;
end;
dloCustom: for Index := 0 to Values.Count - 1 do
begin
if (Values.Items[Index] as TDiagramValue).Visible then
begin
if Assigned(OnCustomDrawValue) then
begin
OnCustomDrawValue(Self,Index,ValueRect(Index));
OnCustomDrawValue(Self,Index,ValueRect[Index]);
end;
if Assigned(OnDrawValue) then
begin
@@ -3400,13 +3477,13 @@ begin
Index := ZeroHeight + Scale.Bar.RulerGap;
while Index < Height do
begin
TextOut(ZeroWidth - Scale.Bar.RulerWidth - TextWidth(IntToStr(HeightValue(Index))),Index - Font.Height div 2,IntToStr(HeightValue(Index)));
TextOut(ZeroWidth - Scale.Bar.RulerWidth - TextWidth(IntToStr(HeightValue[Index])),Index - Font.Height div 2,IntToStr(HeightValue[Index]));
Inc(Index,Scale.Bar.RulerGap);
end;
Index := ZeroHeight - Scale.Bar.RulerGap;
while Index >= 0 do
begin
TextOut(ZeroWidth - Scale.Bar.RulerWidth - TextWidth(IntToStr(HeightValue(Index))),Index - Font.Height div 2,IntToStr(HeightValue(Index)));
TextOut(ZeroWidth - Scale.Bar.RulerWidth - TextWidth(IntToStr(HeightValue[Index])),Index - Font.Height div 2,IntToStr(HeightValue[Index]));
Dec(Index,Scale.Bar.RulerGap);
end;
end;
@@ -3497,14 +3574,14 @@ begin
begin
if (Values.Items[Index] as TDiagramValue).Value > 0 then
begin
MoveTo(ZeroWidth,ValueHeight((Values.Items[Index] as TDiagramValue).Value));
LineTo(ValueLeft(Index) + ValueWidth div 2,ValueHeight((Values.Items[Index] as TDiagramValue).Value));
MoveTo(ZeroWidth,ValueHeight[(Values.Items[Index] as TDiagramValue).Value]);
LineTo(ValueLeft[Index] + ValueWidth div 2,ValueHeight[(Values.Items[Index] as TDiagramValue).Value]);
end else
begin
MoveTo(ZeroWidth,ValueHeight((Values.Items[Index] as TDiagramValue).Value) - 1);
LineTo(ValueLeft(Index) + ValueWidth div 2,ValueHeight((Values.Items[Index] as TDiagramValue).Value) - 1);
MoveTo(ZeroWidth,ValueHeight[(Values.Items[Index] as TDiagramValue).Value] - 1);
LineTo(ValueLeft[Index] + ValueWidth div 2,ValueHeight[(Values.Items[Index] as TDiagramValue).Value] - 1);
end;
LineTo(ValueLeft(Index) + ValueWidth div 2,ZeroHeight);
LineTo(ValueLeft[Index] + ValueWidth div 2,ZeroHeight);
end;
end;
end;
@@ -3562,11 +3639,11 @@ begin
Line := TLine.Create;
case TrendLine.Method of
dtlFirstLast: begin
Line.LoadFromPoints(Point(ValueLeft(Values.First), ValueHeight((Values.Items[Values.First] as TDiagramValue).Value)) ,
Point(ValueLeft(Values.Last ) + ValueWidth,ValueHeight((Values.Items[Values.Last ] as TDiagramValue).Value)));
Line.LoadFromPoints(Point(ValueLeft[Values.First], ValueHeight[(Values.Items[Values.First] as TDiagramValue).Value]) ,
Point(ValueLeft[Values.Last ] + ValueWidth,ValueHeight[(Values.Items[Values.Last ] as TDiagramValue).Value]));
end;
dtlAvgAll: begin
Line.Offset := ValueHeight(Values.AvgValue);
Line.Offset := ValueHeight[Values.AvgValue];
Line.Slope := 0;
end;
dtlAvgLeftRight: begin
@@ -3598,8 +3675,8 @@ begin
Inc(Index);
end;
RightY := RightY div ((Values.VisibleCount + 1) div 2);
Line.LoadFromPoints(Point( (Width - ZeroWidth) div 4,ValueHeight(LeftY)) ,
Point(Width - (Width - ZeroWidth) div 4,ValueHeight(RightY)));
Line.LoadFromPoints(Point( (Width - ZeroWidth) div 4,ValueHeight[LeftY]) ,
Point(Width - (Width - ZeroWidth) div 4,ValueHeight[RightY]));
end;
end;
MoveTo(ZeroWidth,Line.Offset);
@@ -3636,7 +3713,7 @@ begin
begin
Brush.Color := (Values.Items[Index] as TDiagramValue).Color;
end;
Rectangle(ValueLeft(Index),ZeroHeight,ValueLeft(Index) + ValueWidth,ValueHeight((Values.Items[Index] as TDiagramValue).Value));
Rectangle(ValueLeft[Index],ZeroHeight,ValueLeft[Index] + ValueWidth,ValueHeight[(Values.Items[Index] as TDiagramValue).Value]);
end;
end;
@@ -3667,11 +3744,11 @@ begin
begin
Brush.Color := (Values.Items[Index] as TDiagramValue).Color;
end;
Ellipse(ValueLeft(Index),ValueHeight((Values.Items[Index] as TDiagramValue).Value) - ValueWidth div 2,ValueLeft(Index) + ValueWidth,ValueHeight((Values.Items[Index] as TDiagramValue).Value) + ValueWidth div 2);
Ellipse(ValueLeft[Index],ValueHeight[(Values.Items[Index] as TDiagramValue).Value] - ValueWidth div 2,ValueLeft[Index] + ValueWidth,ValueHeight[(Values.Items[Index] as TDiagramValue).Value] + ValueWidth div 2);
end;
end;
procedure TDiagram.DrawLine(Index: Integer);
procedure TDiagram.DrawStraightLine(Index: Integer);
begin
with Canvas do
begin
@@ -3681,7 +3758,7 @@ begin
Brush.Style := bsSolid;
if Index = 0 then
begin
MoveTo(ZeroWidth + Padding.Left,ValueHeight((Values.Items[Index] as TDiagramValue).Value));
MoveTo(ZeroWidth + Padding.Left,ValueHeight[(Values.Items[Index] as TDiagramValue).Value]);
end else
begin
//MoveTo(
@@ -3689,7 +3766,25 @@ begin
end;
end;
function TDiagram.ZeroWidth: Integer;
procedure TDiagram.DrawCurvedLine(Index: Integer);
begin
with Canvas do
begin
Pen.Width := (Values.Items[Index] as TDiagramValue).BorderWidth;
Pen.Color := (Values.Items[Index] as TDiagramValue).Color;
Pen.Style := psSolid;
Brush.Style := bsSolid;
if Index = 0 then
begin
MoveTo(ZeroWidth + Padding.Left,ValueHeight[(Values.Items[Index] as TDiagramValue).Value]);
end else
begin
//MoveTo(
end;
end;
end;
function TDiagram.GetZeroWidth: Integer;
var
Index: Integer;
MaxWidth: Integer;
@@ -3723,7 +3818,7 @@ begin
end;
end;
function TDiagram.ZeroHeight: Integer;
function TDiagram.GetZeroHeight: Integer;
begin
if Values.MinValue >= 0 then
begin
@@ -3740,7 +3835,7 @@ begin
end;
end;
function TDiagram.ValueHeight(Value: Integer): Integer;
function TDiagram.GetValueHeight(Value: Integer): Integer;
begin
if Value = 0 then
begin
@@ -3757,7 +3852,7 @@ begin
end;
end;
function TDiagram.HeightValue(Height: Integer): Integer;
function TDiagram.GetHeightValue(Height: Integer): Integer;
begin
if Height = ZeroHeight then
begin
@@ -3774,7 +3869,7 @@ begin
end;
end;
function TDiagram.ValueLeft(Index: Integer): Integer;
function TDiagram.GetValueLeft(Index: Integer): Integer;
var
ValueIndex: Integer;
begin
@@ -3788,12 +3883,12 @@ begin
end;
end;
function TDiagram.ValueWidth: Integer;
function TDiagram.GetValueWidth: Integer;
begin
Result := ValueSpace - Padding.Left - Padding.Right;
end;
function TDiagram.ValueSpace: Integer;
function TDiagram.GetValueSpace: Integer;
begin
if Values.Count = 0 then
begin
@@ -3831,19 +3926,19 @@ begin
end;
end;
function TDiagram.ValueRect(Index: Integer): TRect;
function TDiagram.GetValueRect(Index: Integer): TRect;
begin
Result := ValueRect(Values.Items[Index] as TDiagramValue);
Result := GetValueRect(Values.Items[Index] as TDiagramValue);
end;
function TDiagram.ValueRect(Value: TDiagramValue): TRect;
function TDiagram.GetValueRect(Value: TDiagramValue): TRect;
begin
if Value.Visible then
begin
Result := Rect(ValueLeft(Value.Index),Padding.Top,ValueLeft(Value.Index) + ValueWidth,Height - Padding.Bottom);
Result := Rect(ValueLeft[Value.Index],Padding.Top,ValueLeft[Value.Index] + ValueWidth,Height - Padding.Bottom);
end else
begin
Result := Rect(ValueLeft(Value.Index),Padding.Top,ValueLeft(Value.Index),Height - Padding.Bottom);
Result := Rect(ValueLeft[Value.Index],Padding.Top,ValueLeft[Value.Index],Height - Padding.Bottom);
end;
end;

View File

@@ -26,7 +26,7 @@ type
TBatteryFlag = (bfHealthy,bfLow,bfCritical,bfCharge,bfHealthyAccu,bfNone,bfUnknown);
TBatteryStatus = (bsInternal,bsExternal);
TProcessRefreshMode = (prNone,prAccess,prTime);
TDelphiVersion = (dv7,dv2005,dv2006,dv2007,dv2009,dv2010,dvXE,dvXE2,dvXE3,dvXE4,dvXE5,dvXE6,dvXE7,dvXE8,dv10);
TDelphiVersion = (dv7,dv2005,dv2006,dv2007,dv2009,dv2010,dvXE,dvXE2,dvXE3,dvXE4,dvXE5,dvXE6,dvXE7,dvXE8,dv10,dv101,dv102);
TDelphiVersions = set of TDelphiVersion;
TDelphiCompilerOptions = set of (dcmDebug,dcmConsole,dcmTypeInfo,dcmUnicode,dcmExtSyntax,dcmAssembler,dcmCondExpr);
TDelphiTargetPlatform = (dpWin32,dpWin64,dpOSX32,dpAndroid32,dpIOSDev,dpIOSSim,dpIOSDev32,dpIOSDev64);
@@ -171,19 +171,17 @@ type
property OnChanging: TStringContainerChangingEvent read FChangingEvent write FChangingEvent;
end;
{$IFNDEF NO_MULTIPLATFORM}
[ComponentPlatformsAttribute(pidWin32 or pidWin64)]
{$ENDIF}
TDelphiManager = class(TComponent)
TDelphiManager = class;
TDelphiManagerInfo = class
private
{ Private-Deklarationen }
FAbout: TComponentAbout;
FDelphiManager: TDelphiManager;
{ Methoden }
function GetVersion: TDelphiVersion;
function GetVersionName: String;
function GetVersionFullName: String;
function GetVersionCodeName: String;
function GetInstalled: TDelphiVersions;
function GetCompilerVersion: Extended;
function GetRuntimeVersion: Extended;
function GetLinaVersion: Extended;
@@ -193,20 +191,15 @@ type
function GetLocalPlatform: TDelphiLocalPlatform;
function GetLocalPlatformName: String;
function GetLocalPlatformFullName: String;
protected
{ Protected-Deklarationen }
function RegistryPath(const Version: TDelphiVersion): String;
function TargetPlatformKey(const TargetPlatform: TDelphiTargetPlatform): String;
public
{ Public-Deklarationen }
constructor Create(AOwner: TComponent); override;
constructor Create(ADelphiManager: TDelphiManager);
destructor Destroy; override;
{ Eigenschaften }
property Version: TDelphiVersion read GetVersion;
property VersionName: String read GetVersionName;
property VersionFullName: String read GetVersionFullName;
property VersionCodeName: String read GetVersionCodeName;
property Installed: TDelphiVersions read GetInstalled;
property CompilerVersion: Extended read GetCompilerVersion;
property RuntimeVersion: Extended read GetRuntimeVersion;
property LinaVersion: Extended read GetLinaVersion;
@@ -216,17 +209,65 @@ type
property LocalPlatform: TDelphiLocalPlatform read GetLocalPlatform;
property LocalPlatformName: String read GetLocalPlatformName;
property LocalPlatformFullName: String read GetLocalPlatformFullName;
end;
TDelphiManagerVersion = class
private
{ Private-Deklarationen }
FVersion: TDelphiVersion;
{ Methoden }
function RootDir(const Version: TDelphiVersion): String;
function ExeName(const Version: TDelphiVersion): String;
function Edition(const Version: TDelphiVersion): TDelphiEdition;
function Language(const Version: TDelphiVersion): String;
function TargetPlatforms(const Version: TDelphiVersion): TDelphiTargetPlatforms;
function VariablePath(const Version: TDelphiVersion; const Variable: String): String;
procedure BrowsingPaths(const Version: TDelphiVersion; const TargetPlatform: TDelphiTargetPlatform; var Target: TStrings);
procedure SearchPaths(const Version: TDelphiVersion; const TargetPlatform: TDelphiTargetPlatform; var Target: TStrings);
procedure EnvironmentVariables(const Version: TDelphiVersion; Target: TStrings);
procedure Launch(const Version: TDelphiVersion);
function GetInstalled: Boolean;
function GetEdition: TDelphiEdition;
function GetRootDir: String;
function GetExeName: String;
function GetLanguage: String;
procedure SetLanguage(Value: String);
function GetTargetPlatforms: TDelphiTargetPlatforms;
function GetBrowsingPaths(TargetPlatform: TDelphiTargetPlatform): TStrings;
procedure SetBrowsingPaths(TargetPlatform: TDelphiTargetPlatform; Value: TStrings);
function GetSearchPaths(TargetPlatform: TDelphiTargetPlatform): TStrings;
procedure SetSearchPaths(TargetPlatform: TDelphiTargetPlatform; Value: TStrings);
function GetEnvironmentVariables: TStrings;
function GetEnvironmentVariable(Variable: String): String;
protected
{ Protected-Deklarationen }
function RegistryPath: String;
function TargetPlatformKey(TargetPlatform: TDelphiTargetPlatform): String;
public
{ Public-Deklarationen }
constructor Create(AVersion: TDelphiVersion);
destructor Destroy; override;
property Version: TDelphiVersion read FVersion;
property Installed: Boolean read GetInstalled;
property Edition: TDelphiEdition read GetEdition;
property RootDir: String read GetRootDir;
property ExeName: String read GetExeName;
property Language: String read GetLanguage;
property TargetPlatforms: TDelphiTargetPlatforms read GetTargetPlatforms;
property BrowsingPaths[TargetPlatform: TDelphiTargetPlatform]: TStrings read GetBrowsingPaths write SetBrowsingPaths;
property SearchPaths[TargetPlatform: TDelphiTargetPlatform]: TStrings read GetSearchPaths write SetBrowsingPaths;
property EnvironmentVariables: TStrings read GetEnvironmentVariables;
property EnvironmentVariable[Variable: String]: String read GetEnvironmentVariable;
procedure Launch;
end;
{$IFNDEF NO_MULTIPLATFORM}
[ComponentPlatformsAttribute(pidWin32 or pidWin64)]
{$ENDIF}
TDelphiManager = class(TComponent)
private
{ Private-Deklarationen }
FAbout: TComponentAbout;
FInfo: TDelphiManagerInfo;
function GetInstalledVersions: TDelphiVersions;
function GetVersions(Version: TDelphiVersion): TDelphiManagerVersion;
public
{ Public-Deklarationen }
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
property Info: TDelphiManagerInfo read FInfo;
property InstalledVersions: TDelphiVersions read GetInstalledVersions;
property Versions[Version: TDelphiVersion]: TDelphiManagerVersion read GetVersions;
published
{ Published-Deklarationen }
property About: TComponentAbout read FAbout;
@@ -331,7 +372,7 @@ const
VersionNames: array [TDelphiVersion] of String = (
'7','2005','2006','2007','2009','2010',
'XE','XE2','XE3','XE4','XE5','XE6','XE7','XE8',
'10'
'10','10.1','10.2'
);
begin
Result := TDelphiVersion(ArrayPos(Name,VersionNames));
@@ -342,7 +383,7 @@ const
VersionFullNames: array [TDelphiVersion] of String = (
'Delphi 7','Delphi 2005','Delphi 2006','Delphi 2007','Delphi 2009','Delphi 2010',
'Delphi XE','Delphi XE2','Delphi XE3','Delphi XE4','Delphi XE5','Delphi XE6','Delphi XE7','Delphi XE8',
'Delphi 10'
'Delphi 10','Delphi 10.1','Delphi 10.2'
);
begin
Result := TDelphiVersion(ArrayPos(FullName,VersionFullNames));
@@ -353,7 +394,7 @@ const
VersionCodeNames: array [TDelphiVersion] of String = (
'Aurora','DiamondBack','DeXter','Spacely','Tibur�n','Weaver',
'Fulcrum','Pulsar','Waterdragon','Quintessence','Zephyr','Proteus','Carpathia','Elbrus',
'Seattle'
'Seattle','Berlin','Tokyo'
);
begin
Result := TDelphiVersion(ArrayPos(CodeName,VersionCodeNames));
@@ -364,7 +405,7 @@ const
VersionNames: array [TDelphiVersion] of String = (
'7','2005','2006','2007','2009','2010',
'XE','XE2','XE3','XE4','XE5','XE6','XE7','XE8',
'10'
'10','10.1','10.2'
);
begin
Result := VersionNames[DelphiVersion];
@@ -375,7 +416,7 @@ const
VersionFullNames: array [TDelphiVersion] of String = (
'Delphi 7','Delphi 2005','Delphi 2006','Delphi 2007','Delphi 2009','Delphi 2010',
'Delphi XE','Delphi XE2','Delphi XE3','Delphi XE4','Delphi XE5','Delphi XE6','Delphi XE7','Delphi XE8',
'Delphi 10'
'Delphi 10','Delphi 10.1','Delphi 10.2'
);
begin
Result := VersionFullNames[DelphiVersion];
@@ -386,7 +427,7 @@ const
VersionCodeNames: array [TDelphiVersion] of String = (
'Aurora','DiamondBack','DeXter','Spacely','Tibur�n','Weaver',
'Fulcrum','Pulsar','Waterdragon','Quintessence','Zephyr','Proteus','Carpathia','Elbrus',
'Seattle'
'Seattle','Berlin','Tokyo'
);
begin
Result := VersionCodeNames[DelphiVersion];
@@ -460,6 +501,7 @@ begin
cmXor: Result := ((StrIsInt(Key) = True) and (StrToInt(Key) in [0..31]));
cmCaesar: Result := ((Length(Key) = 1) and (Key[1] in Letters));
cmVigenere: Result := ConsistsOf(Key,Letters);
cmCustom: Result := True;
end;
end;
end;
@@ -481,6 +523,7 @@ begin
Inc(Current);
end;
end;
cmCustom: Result := '';
end;
end;
@@ -1069,22 +1112,22 @@ begin
end;
{ ----------------------------------------------------------------------------
TDelphiManager
TDelphiManagerCurrentVersion
---------------------------------------------------------------------------- }
constructor TDelphiManager.Create(AOwner: TComponent);
constructor TDelphiManagerInfo.Create(ADelphiManager: TDelphiManager);
begin
inherited;
FAbout := TComponentAbout.Create(TDelphiManager);
inherited Create;
FDelphiManager := ADelphiManager;
end;
destructor TDelphiManager.Destroy;
destructor TDelphiManagerInfo.Destroy;
begin
FAbout.Free;
//...
inherited;
end;
function TDelphiManager.GetVersion: TDelphiVersion;
function TDelphiManagerInfo.GetVersion: TDelphiVersion;
begin
{$IFDEF VER150}
Result := dv7;
@@ -1132,7 +1175,15 @@ begin
{$IFDEF VER300}
Result := dv10;
{$ELSE}
raise EDelphiVersion.Create('Delphi version could not be determined');
{$IFDEF VER310}
Result := dv101;
{$ELSE}
{$IFDEF VER320}
Result := dv102;
{$ELSE}
raise EDelphiVersion.Create('Delphi version could not be determined');
{$ENDIF}
{$ENDIF}
{$ENDIF}
{$ENDIF}
{$ENDIF}
@@ -1149,88 +1200,60 @@ begin
{$ENDIF}
end;
function TDelphiManager.GetVersionName: String;
function TDelphiManagerInfo.GetVersionName: String;
begin
Result := DelphiVersionToName(Version);
end;
function TDelphiManager.GetVersionFullName: String;
function TDelphiManagerInfo.GetVersionFullName: String;
begin
Result := DelphiVersionToFullName(Version);
end;
function TDelphiManager.GetVersionCodeName: String;
function TDelphiManagerInfo.GetVersionCodeName: String;
begin
Result := DelphiVersionToCodeName(Version);
end;
function TDelphiManager.GetInstalled: TDelphiVersions;
var
Reg: TRegistry;
Index: TDelphiVersion;
begin
Result := [];
Reg := TRegistry.Create;
try
Reg.RootKey := HKEY_LOCAL_MACHINE;
try
for Index := Low(TDelphiVersion) to High(TDelphiVersion) do
begin
if Reg.KeyExists(RegistryPath(Version)) then
begin
if FileExists(ExeName(Index)) = True then
begin
Result := Result + [Index];
end;
end;
end;
finally
Reg.CloseKey;
end;
finally
Reg.Free;
end;
end;
function TDelphiManager.GetCompilerVersion: Extended;
function TDelphiManagerInfo.GetCompilerVersion: Extended;
begin
Result := System.CompilerVersion;
end;
function TDelphiManager.GetRuntimeVersion: Extended;
function TDelphiManagerInfo.GetRuntimeVersion: Extended;
begin
Result := RTLVersion;
end;
function TDelphiManager.GetLinaVersion: Extended;
function TDelphiManagerInfo.GetLinaVersion: Extended;
begin
Result := uBase.LinaVersion;
end;
function TDelphiManager.GetProductVersion: Integer;
function TDelphiManagerInfo.GetProductVersion: Integer;
begin
Result := DelphiVersionToProductVersion(Version);
end;
function TDelphiManager.GetPackageVersion: Integer;
function TDelphiManagerInfo.GetPackageVersion: Integer;
begin
Result := DelphiVersionToPackageVersion(Version);
end;
function TDelphiManager.GetCompilerOptions: TDelphiCompilerOptions;
function TDelphiManagerInfo.GetCompilerOptions: TDelphiCompilerOptions;
begin
Result := []
{$IFDEF DEBUG} + [dcmDebug] {$ENDIF}
{$IFOPT M+} + [dcmTypeInfo] {$ENDIF}
{$IFDEF CONSOLE} + [dcmConsole] {$ENDIF}
{$IFDEF UNICODE} + [dcmUnicode] {$ENDIF}
{$IFOPT X+} + [dcmExtSyntax] {$ENDIF}
{$IFDEF ASSEMBLER} + [dcmAssembler] {$ENDIF}
{$IFDEF CONDITIONALEXPRESSIONS} + [dcmCondExpr] {$ENDIF}
{$IFDEF DEBUG} + [dcmDebug] {$ENDIF}
{$IFOPT M+} + [dcmTypeInfo] {$ENDIF}
{$IFDEF CONSOLE} + [dcmConsole] {$ENDIF}
{$IFDEF UNICODE} + [dcmUnicode] {$ENDIF}
{$IFOPT X+} + [dcmExtSyntax] {$ENDIF}
{$IFDEF ASSEMBLER} + [dcmAssembler] {$ENDIF}
{$IFDEF CONDITIONALEXPRESSIONS} + [dcmCondExpr] {$ENDIF}
;
end;
function TDelphiManager.GetLocalPlatform: TDelphiLocalPlatform;
function TDelphiManagerInfo.GetLocalPlatform: TDelphiLocalPlatform;
begin
{$IFDEF WIN32}
Result := dpWin32;
@@ -1240,71 +1263,41 @@ begin
{$ENDIF}
end;
function TDelphiManager.GetLocalPlatformName: String;
function TDelphiManagerInfo.GetLocalPlatformName: String;
begin
Result := TargetPlatformToName(LocalPlatform);
end;
function TDelphiManager.GetLocalPlatformFullName: String;
function TDelphiManagerInfo.GetLocalPlatformFullName: String;
begin
Result := TargetPlatformToFullName(LocalPlatform);
end;
function TDelphiManager.RegistryPath(const Version: TDelphiVersion): String;
const
RegistryPaths: array [TDelphiVersion] of String = (
'Software\Borland\Delphi\7.0',
'Software\Borland\BDS\3.0',
'Software\Borland\BDS\4.0',
'Software\Borland\BDS\5.0',
'Software\CodeGear\BDS\6.0',
'Software\CodeGear\BDS\7.0',
'Software\Embarcadero\BDS\8.0',
'Software\Embarcadero\BDS\9.0',
'Software\Embarcadero\BDS\10.0',
'Software\Embarcadero\BDS\11.0',
'Software\Embarcadero\BDS\12.0',
'Software\Embarcadero\BDS\14.0',
'Software\Embarcadero\BDS\15.0',
'Software\Embarcadero\BDS\16.0',
'Software\Embarcadero\BDS\17.0'
);
{ ----------------------------------------------------------------------------
TDelphiManagerVersion
---------------------------------------------------------------------------- }
constructor TDelphiManagerVersion.Create(AVersion: TDelphiVersion);
begin
Result := RegistryPaths[Version];
inherited Create;
FVersion := AVersion;
end;
function TDelphiManager.TargetPlatformKey(const TargetPlatform: TDelphiTargetPlatform): String;
const
TargetPlatforms: array [TDelphiTargetPlatform] of String = (
'Win32',
'Win64',
'OSX32',
'Android32',
'iOSDevice',
'iOSSimulator',
'iOSDevice32',
'iOSDevice64'
);
destructor TDelphiManagerVersion.Destroy;
begin
Result := TargetPlatforms[TargetPlatform];
//...
inherited;
end;
function TDelphiManager.RootDir(const Version: TDelphiVersion): String;
const
RegEntry = 'RootDir';
function TDelphiManagerVersion.GetInstalled: Boolean;
var
Reg: TRegistry;
begin
Reg := TRegistry.Create;
try
Reg.RootKey := HKEY_CURRENT_USER;
if (Reg.KeyExists(RegistryPath(Version)) = False) then
begin
Reg.RootKey := HKEY_LOCAL_MACHINE;
end;
Reg.RootKey := HKEY_LOCAL_MACHINE;
try
Reg.OpenKeyReadOnly(RegistryPath(Version));
Result := Reg.ReadString(RegEntry);
Result := Reg.KeyExists(RegistryPath) and FileExists(ExeName);
finally
Reg.CloseKey;
end;
@@ -1313,31 +1306,7 @@ begin
end;
end;
function TDelphiManager.ExeName(const Version: TDelphiVersion): String;
const
RegEntry = 'App';
var
Reg: TRegistry;
begin
Reg := TRegistry.Create;
try
Reg.RootKey := HKEY_CURRENT_USER;
if (Reg.KeyExists(RegistryPath(Version)) = False) then
begin
Reg.RootKey := HKEY_LOCAL_MACHINE;
end;
try
Reg.OpenKeyReadOnly(RegistryPath(Version));
Result := Reg.ReadString(RegEntry)
finally
Reg.CloseKey;
end;
finally
Reg.Free;
end;
end;
function TDelphiManager.Edition(const Version: TDelphiVersion): TDelphiEdition;
function TDelphiManagerVersion.GetEdition: TDelphiEdition;
const
RegEntry = 'Edition';
Editions: array [TDelphiEdition] of String = (
@@ -1353,12 +1322,12 @@ begin
Reg := TRegistry.Create;
try
Reg.RootKey := HKEY_CURRENT_USER;
if (Reg.KeyExists(RegistryPath(Version)) = False) then
if (not Reg.KeyExists(RegistryPath)) then
begin
Reg.RootKey := HKEY_LOCAL_MACHINE;
end;
try
Reg.OpenKeyReadOnly(RegistryPath(Version));
Reg.OpenKeyReadOnly(RegistryPath);
Result := TDelphiEdition(ArrayPos(Reg.ReadString(RegEntry),Editions));
finally
Reg.CloseKey;
@@ -1368,21 +1337,21 @@ begin
end;
end;
function TDelphiManager.Language(const Version: TDelphiVersion): String;
function TDelphiManagerVersion.GetRootDir: String;
const
RegEntry = 'InstallLanguage';
RegEntry = 'RootDir';
var
Reg: TRegistry;
begin
Reg := TRegistry.Create;
try
Reg.RootKey := HKEY_CURRENT_USER;
if (Reg.KeyExists(RegistryPath(Version)) = False) then
if (not Reg.KeyExists(RegistryPath)) then
begin
Reg.RootKey := HKEY_LOCAL_MACHINE;
end;
try
Reg.OpenKeyReadOnly(RegistryPath(Version));
Reg.OpenKeyReadOnly(RegistryPath);
Result := Reg.ReadString(RegEntry);
finally
Reg.CloseKey;
@@ -1392,7 +1361,79 @@ begin
end;
end;
function TDelphiManager.TargetPlatforms(const Version: TDelphiVersion): TDelphiTargetPlatforms;
function TDelphiManagerVersion.GetExeName: String;
const
RegEntry = 'App';
var
Reg: TRegistry;
begin
Reg := TRegistry.Create;
try
Reg.RootKey := HKEY_CURRENT_USER;
if (not Reg.KeyExists(RegistryPath)) then
begin
Reg.RootKey := HKEY_LOCAL_MACHINE;
end;
try
Reg.OpenKeyReadOnly(RegistryPath);
Result := Reg.ReadString(RegEntry)
finally
Reg.CloseKey;
end;
finally
Reg.Free;
end;
end;
function TDelphiManagerVersion.GetLanguage: String;
const
RegEntry = 'InstallLanguage';
var
Reg: TRegistry;
begin
Reg := TRegistry.Create;
try
Reg.RootKey := HKEY_CURRENT_USER;
if (not Reg.KeyExists(RegistryPath)) then
begin
Reg.RootKey := HKEY_LOCAL_MACHINE;
end;
try
Reg.OpenKeyReadOnly(RegistryPath);
Result := Reg.ReadString(RegEntry);
finally
Reg.CloseKey;
end;
finally
Reg.Free;
end;
end;
procedure TDelphiManagerVersion.SetLanguage(Value: String);
const
RegEntry = 'InstallLanguage';
var
Reg: TRegistry;
begin
Reg := TRegistry.Create;
try
Reg.RootKey := HKEY_CURRENT_USER;
if (not Reg.KeyExists(RegistryPath)) then
begin
Reg.RootKey := HKEY_LOCAL_MACHINE;
end;
try
Reg.OpenKey(RegistryPath,True);
Reg.WriteString(RegEntry,Value);
finally
Reg.CloseKey;
end;
finally
Reg.Free;
end;
end;
function TDelphiManagerVersion.GetTargetPlatforms: TDelphiTargetPlatforms;
begin
Result := [dpWin32];
if Version >= dvXE2 then
@@ -1416,7 +1457,115 @@ begin
end;
end;
function TDelphiManager.VariablePath(const Version: TDelphiVersion; const Variable: String): String;
function TDelphiManagerVersion.GetBrowsingPaths(TargetPlatform: TDelphiTargetPlatform): TStrings;
const
RegSubKey = 'Library';
RegEntry = 'Browsing Path';
var
Reg: TRegistry;
begin
Reg := TRegistry.Create;
try
Reg.RootKey := HKEY_CURRENT_USER;
if (not Reg.KeyExists(RegistryPath + PathDelim + RegSubKey + PathDelim + TargetPlatformKey(TargetPlatform))) then
begin
Reg.RootKey := HKEY_LOCAL_MACHINE;
end;
try
Reg.OpenKeyReadOnly(RegistryPath + PathDelim + RegSubKey + PathDelim + TargetPlatformKey(TargetPlatform));
Result.StrictDelimiter := True;
Result.Delimiter := ';';
Result.DelimitedText := Reg.ReadString(RegEntry);
finally
Reg.CloseKey;
end;
finally
Reg.Free;
end;
end;
procedure TDelphiManagerVersion.SetBrowsingPaths(TargetPlatform: TDelphiTargetPlatform; Value: TStrings);
const
RegSubKey = 'Library';
RegEntry = 'Browsing Path';
var
Reg: TRegistry;
begin
Reg := TRegistry.Create;
try
Reg.RootKey := HKEY_CURRENT_USER;
if (not Reg.KeyExists(RegistryPath + PathDelim + RegSubKey + PathDelim + TargetPlatformKey(TargetPlatform))) then
begin
Reg.RootKey := HKEY_LOCAL_MACHINE;
end;
try
Reg.OpenKey(RegistryPath + PathDelim + RegSubKey + PathDelim + TargetPlatformKey(TargetPlatform),True);
Value.StrictDelimiter := True;
Value.Delimiter := ';';
Reg.WriteString(RegEntry,Value.DelimitedText);
finally
Reg.CloseKey;
end;
finally
Reg.Free;
end;
end;
function TDelphiManagerVersion.GetSearchPaths(TargetPlatform: TDelphiTargetPlatform): TStrings;
const
RegSubKey = 'Library';
RegEntry = 'Search Path';
var
Reg: TRegistry;
begin
Reg := TRegistry.Create;
try
Reg.RootKey := HKEY_CURRENT_USER;
if (not Reg.KeyExists(RegistryPath + PathDelim + RegSubKey + PathDelim + TargetPlatformKey(TargetPlatform))) then
begin
Reg.RootKey := HKEY_LOCAL_MACHINE;
end;
try
Reg.OpenKeyReadOnly(RegistryPath + PathDelim + RegSubKey + PathDelim + TargetPlatformKey(TargetPlatform));
Result.StrictDelimiter := True;
Result.Delimiter := ';';
Result.DelimitedText := Reg.ReadString(RegEntry);
finally
Reg.CloseKey;
end;
finally
Reg.Free;
end;
end;
procedure TDelphiManagerVersion.SetSearchPaths(TargetPlatform: TDelphiTargetPlatform; Value: TStrings);
const
RegSubKey = 'Library';
RegEntry = 'Search Path';
var
Reg: TRegistry;
begin
Reg := TRegistry.Create;
try
Reg.RootKey := HKEY_CURRENT_USER;
if (not Reg.KeyExists(RegistryPath + PathDelim + RegSubKey + PathDelim + TargetPlatformKey(TargetPlatform))) then
begin
Reg.RootKey := HKEY_LOCAL_MACHINE;
end;
try
Reg.OpenKey(RegistryPath + PathDelim + RegSubKey + PathDelim + TargetPlatformKey(TargetPlatform),True);
Value.StrictDelimiter := True;
Value.Delimiter := ';';
Reg.WriteString(RegEntry,Value.DelimitedText);
finally
Reg.CloseKey;
end;
finally
Reg.Free;
end;
end;
function TDelphiManagerVersion.GetEnvironmentVariables: TStrings;
const
RegSubKey = 'Environment Variables';
var
@@ -1425,12 +1574,36 @@ begin
Reg := TRegistry.Create;
try
Reg.RootKey := HKEY_CURRENT_USER;
if (Reg.KeyExists(RegistryPath(Version) + PathDelim + RegSubKey) = False) then
if (not Reg.KeyExists(RegistryPath + PathDelim + RegSubKey)) then
begin
Reg.RootKey := HKEY_LOCAL_MACHINE;
end;
try
Reg.OpenKeyReadOnly(RegistryPath(Version) + PathDelim + RegSubKey);
Reg.OpenKeyReadOnly(RegistryPath + PathDelim + RegSubKey);
Reg.GetValueNames(Result);
finally
Reg.CloseKey;
end;
finally
Reg.Free;
end;
end;
function TDelphiManagerVersion.GetEnvironmentVariable(Variable: String): String;
const
RegSubKey = 'Environment Variables';
var
Reg: TRegistry;
begin
Reg := TRegistry.Create;
try
Reg.RootKey := HKEY_CURRENT_USER;
if (not Reg.KeyExists(RegistryPath + PathDelim + RegSubKey)) then
begin
Reg.RootKey := HKEY_LOCAL_MACHINE;
end;
try
Reg.OpenKeyReadOnly(RegistryPath + PathDelim + RegSubKey);
if Reg.ValueExists(Variable) = True then
begin
Result := Reg.ReadString(Variable);
@@ -1446,87 +1619,87 @@ begin
end;
end;
procedure TDelphiManager.BrowsingPaths(const Version: TDelphiVersion; const TargetPlatform: TDelphiTargetPlatform; var Target: TStrings);
function TDelphiManagerVersion.RegistryPath: String;
const
RegSubKey = 'Library';
RegEntry = 'Browsing Path';
var
Reg: TRegistry;
RegistryPaths: array [TDelphiVersion] of String = (
'Software\Borland\Delphi\7.0',
'Software\Borland\BDS\3.0',
'Software\Borland\BDS\4.0',
'Software\Borland\BDS\5.0',
'Software\CodeGear\BDS\6.0',
'Software\CodeGear\BDS\7.0',
'Software\Embarcadero\BDS\8.0',
'Software\Embarcadero\BDS\9.0',
'Software\Embarcadero\BDS\10.0',
'Software\Embarcadero\BDS\11.0',
'Software\Embarcadero\BDS\12.0',
'Software\Embarcadero\BDS\14.0',
'Software\Embarcadero\BDS\15.0',
'Software\Embarcadero\BDS\16.0',
'Software\Embarcadero\BDS\17.0',
'Software\Embarcadero\BDS\18.0',
'Software\Embarcadero\BDS\19.0'
);
begin
Reg := TRegistry.Create;
try
Reg.RootKey := HKEY_CURRENT_USER;
if (Reg.KeyExists(RegistryPath(Version) + PathDelim + RegSubKey + PathDelim + TargetPlatformKey(TargetPlatform)) = False) then
Result := RegistryPaths[Version];
end;
function TDelphiManagerVersion.TargetPlatformKey(TargetPlatform: TDelphiTargetPlatform): String;
const
TargetPlatforms: array [TDelphiTargetPlatform] of String = (
'Win32',
'Win64',
'OSX32',
'Android32',
'iOSDevice',
'iOSSimulator',
'iOSDevice32',
'iOSDevice64'
);
begin
Result := TargetPlatforms[TargetPlatform];
end;
procedure TDelphiManagerVersion.Launch;
begin
ExecuteFile(ExeName);
end;
{ ----------------------------------------------------------------------------
TDelphiManager
---------------------------------------------------------------------------- }
constructor TDelphiManager.Create(AOwner: TComponent);
begin
inherited;
FAbout := TComponentAbout.Create(TDelphiManager);
FInfo := TDelphiManagerInfo.Create(Self);
end;
destructor TDelphiManager.Destroy;
begin
FAbout.Free;
FInfo.Free;
inherited;
end;
function TDelphiManager.GetInstalledVersions: TDelphiVersions;
var
Index: TDelphiVersion;
begin
Result := [];
for Index := Low(TDelphiVersion) to High(TDelphiVersion) do
begin
if Versions[Index].Installed then
begin
Reg.RootKey := HKEY_LOCAL_MACHINE;
Result := Result + [Index];
end;
try
Reg.OpenKeyReadOnly(RegistryPath(Version) + PathDelim + RegSubKey + PathDelim + TargetPlatformKey(TargetPlatform));
Target.StrictDelimiter := True;
Target.Delimiter := ';';
Target.DelimitedText := Reg.ReadString(RegEntry);
finally
Reg.CloseKey;
end;
finally
Reg.Free;
end;
end;
procedure TDelphiManager.SearchPaths(const Version: TDelphiVersion; const TargetPlatform: TDelphiTargetPlatform; var Target: TStrings);
const
RegSubKey = 'Library';
RegEntry = 'Search Path';
var
Reg: TRegistry;
function TDelphiManager.GetVersions(Version: TDelphiVersion): TDelphiManagerVersion;
begin
Reg := TRegistry.Create;
try
Reg.RootKey := HKEY_CURRENT_USER;
if (Reg.KeyExists(RegistryPath(Version) + PathDelim + RegSubKey + PathDelim + TargetPlatformKey(TargetPlatform)) = False) then
begin
Reg.RootKey := HKEY_LOCAL_MACHINE;
end;
try
Reg.OpenKeyReadOnly(RegistryPath(Version) + PathDelim + RegSubKey + PathDelim + TargetPlatformKey(TargetPlatform));
Target.StrictDelimiter := True;
Target.Delimiter := ';';
Target.DelimitedText := Reg.ReadString(RegEntry);
finally
Reg.CloseKey;
end;
finally
Reg.Free;
end;
end;
procedure TDelphiManager.EnvironmentVariables(const Version: TDelphiVersion; Target: TStrings);
const
RegSubKey = 'Environment Variables';
var
Reg: TRegistry;
begin
Reg := TRegistry.Create;
try
Reg.RootKey := HKEY_CURRENT_USER;
if (Reg.KeyExists(RegistryPath(Version) + PathDelim + RegSubKey) = False) then
begin
Reg.RootKey := HKEY_LOCAL_MACHINE;
end;
try
Reg.OpenKeyReadOnly(RegistryPath(Version) + PathDelim + RegSubKey);
Reg.GetValueNames(Target);
finally
Reg.CloseKey;
end;
finally
Reg.Free;
end;
end;
procedure TDelphiManager.Launch(const Version: TDelphiVersion);
begin
ExecuteFile(ExeName(Version));
Result := TDelphiManagerVersion.Create(Version);
end;
{ ----------------------------------------------------------------------------