mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-24 23:39:18 +02:00
Opkman: If available load the json from local source. Useful if the internet connection is slow. Feature requested by a forum user.
git-svn-id: trunk@62678 -
This commit is contained in:
parent
9875a0b309
commit
8f44d34808
@ -265,6 +265,8 @@ resourcestring
|
|||||||
rsOptions_tsFolders_Caption = 'Folders';
|
rsOptions_tsFolders_Caption = 'Folders';
|
||||||
rsOptions_tsProfiles_Caption = 'Profiles';
|
rsOptions_tsProfiles_Caption = 'Profiles';
|
||||||
rsOptions_lbRemoteRepository_Caption = 'Remote repository';
|
rsOptions_lbRemoteRepository_Caption = 'Remote repository';
|
||||||
|
rsOptions_cbLoadJsonLocally_Caption = 'If available, parse the json from local source';
|
||||||
|
rsOptions_cbLoadJsonLocally_Hint = 'If this option is checked the json is parsed from a local source, useful if the internet connection is slow. After 25 local parse, OPM will attempt a live update';
|
||||||
rsOptions_cbForceDownloadExtract_Caption = 'Always force download and extract';
|
rsOptions_cbForceDownloadExtract_Caption = 'Always force download and extract';
|
||||||
rsOptions_cbForceDownloadExtract_Hint = 'If this option is checked the packages are always re-downloaded/extracted before install';
|
rsOptions_cbForceDownloadExtract_Hint = 'If this option is checked the packages are always re-downloaded/extracted before install';
|
||||||
rsOptions_lbConTimeOut_Caption = 'Connection timeout (seconds):';
|
rsOptions_lbConTimeOut_Caption = 'Connection timeout (seconds):';
|
||||||
|
@ -31,7 +31,7 @@ unit opkman_downloader;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, fpjson, LazIDEIntf,
|
Classes, SysUtils, fpjson, LazIDEIntf, md5,
|
||||||
// OpkMan
|
// OpkMan
|
||||||
opkman_common, opkman_serializablepackages, opkman_const, opkman_options,
|
opkman_common, opkman_serializablepackages, opkman_const, opkman_options,
|
||||||
{$IFDEF FPC311}fphttpclient{$ELSE}opkman_httpclient{$ENDIF};
|
{$IFDEF FPC311}fphttpclient{$ELSE}opkman_httpclient{$ENDIF};
|
||||||
@ -256,6 +256,7 @@ end;
|
|||||||
procedure TThreadDownload.DoOnJSONDownloadCompleted;
|
procedure TThreadDownload.DoOnJSONDownloadCompleted;
|
||||||
var
|
var
|
||||||
JSON: TJSONStringType;
|
JSON: TJSONStringType;
|
||||||
|
JSONFile: String;
|
||||||
begin
|
begin
|
||||||
if Assigned(FOnJSONComplete) then
|
if Assigned(FOnJSONComplete) then
|
||||||
begin
|
begin
|
||||||
@ -263,6 +264,9 @@ begin
|
|||||||
begin
|
begin
|
||||||
SetLength(JSON, FMS.Size);
|
SetLength(JSON, FMS.Size);
|
||||||
FMS.Read(Pointer(JSON)^, Length(JSON));
|
FMS.Read(Pointer(JSON)^, Length(JSON));
|
||||||
|
JSONFile := ExtractFilePath(LocalRepositoryConfigFile) + 'packagelist' + '_' + MD5Print(MD5String(Options.RemoteRepository[Options.ActiveRepositoryIndex])) + '.json';
|
||||||
|
FMS.Position := 0;
|
||||||
|
FMS.SaveToFile(JSONFile);
|
||||||
SerializablePackages.JSONToPackages(JSON);
|
SerializablePackages.JSONToPackages(JSON);
|
||||||
FOnJSONComplete(Self, JSON, FErrTyp, '');
|
FOnJSONComplete(Self, JSON, FErrTyp, '');
|
||||||
end
|
end
|
||||||
|
@ -29,7 +29,7 @@ unit opkman_mainfrm;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, fpjson, Graphics, laz.VirtualTrees,
|
Classes, SysUtils, fpjson, Graphics, laz.VirtualTrees, md5,
|
||||||
// LCL
|
// LCL
|
||||||
Forms, Controls, Dialogs, StdCtrls, ExtCtrls, Buttons, Menus, ComCtrls, Clipbrd,
|
Forms, Controls, Dialogs, StdCtrls, ExtCtrls, Buttons, Menus, ComCtrls, Clipbrd,
|
||||||
InterfaceBase, LCLIntf, LCLVersion, LCLProc, LCLPlatformDef,
|
InterfaceBase, LCLIntf, LCLVersion, LCLProc, LCLPlatformDef,
|
||||||
@ -257,6 +257,11 @@ end;
|
|||||||
|
|
||||||
|
|
||||||
procedure TMainFrm.GetPackageList(const ARepositoryHasChanged: Boolean = False);
|
procedure TMainFrm.GetPackageList(const ARepositoryHasChanged: Boolean = False);
|
||||||
|
var
|
||||||
|
JSONFile: String;
|
||||||
|
JSON: TJSONStringType;
|
||||||
|
MS: TMemoryStream;
|
||||||
|
SuccessfullyLoaded: Boolean;
|
||||||
begin
|
begin
|
||||||
cbFilterBy.ItemIndex := 0;
|
cbFilterBy.ItemIndex := 0;
|
||||||
cbFilterByChange(cbFilterBy);
|
cbFilterByChange(cbFilterBy);
|
||||||
@ -269,8 +274,41 @@ begin
|
|||||||
SetupMessage(rsMainFrm_rsMessageChangingRepository);
|
SetupMessage(rsMainFrm_rsMessageChangingRepository);
|
||||||
Sleep(1500);
|
Sleep(1500);
|
||||||
end;
|
end;
|
||||||
SetupMessage(rsMainFrm_rsMessageDownload);
|
|
||||||
PackageDownloader.DownloadJSON(Options.ConTimeOut*1000);
|
SuccessfullyLoaded := False;
|
||||||
|
JSONFile := ExtractFilePath(LocalRepositoryConfigFile) + 'packagelist' + '_' + MD5Print(MD5String(Options.RemoteRepository[Options.ActiveRepositoryIndex])) + '.json';
|
||||||
|
if Options.LoadJsonLocally and (Options.LoadJsonLocallyCnt < 25) and FileExists(JSONFile) and (FileSizeUtf8(JSONFile) > 0) then
|
||||||
|
begin
|
||||||
|
MS := TMemoryStream.Create;
|
||||||
|
try
|
||||||
|
MS.LoadFromFile(JSONFile);
|
||||||
|
MS.Position := 0;
|
||||||
|
SetLength(JSON, MS.Size);
|
||||||
|
MS.Read(Pointer(JSON)^, Length(JSON));
|
||||||
|
SuccessfullyLoaded := SerializablePackages.JSONToPackages(JSON);
|
||||||
|
if SuccessfullyLoaded then
|
||||||
|
begin
|
||||||
|
DoOnJSONDownloadCompleted(Self, JSON, etNone);
|
||||||
|
Options.LoadJsonLocallyCnt := Options.LoadJsonLocallyCnt + 1;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
Options.LoadJsonLocallyCnt := 25;
|
||||||
|
Options.Changed := True;
|
||||||
|
finally
|
||||||
|
MS.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if not SuccessfullyLoaded then
|
||||||
|
begin
|
||||||
|
if Options.LoadJsonLocally then
|
||||||
|
begin
|
||||||
|
Options.LoadJsonLocallyCnt := 0;
|
||||||
|
Options.Changed := True;
|
||||||
|
end;
|
||||||
|
SetupMessage(rsMainFrm_rsMessageDownload);
|
||||||
|
PackageDownloader.DownloadJSON(Options.ConTimeOut*1000);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TMainFrm.IsSomethingChecked(const AResolveDependencies: Boolean = True): Boolean;
|
function TMainFrm.IsSomethingChecked(const AResolveDependencies: Boolean = True): Boolean;
|
||||||
|
@ -57,6 +57,8 @@ type
|
|||||||
FRemoteRepository: TStringList;
|
FRemoteRepository: TStringList;
|
||||||
FRemoteRepositoryTmp: TStringList;
|
FRemoteRepositoryTmp: TStringList;
|
||||||
FActiveRepositoryIndex: Integer;
|
FActiveRepositoryIndex: Integer;
|
||||||
|
FLoadJsonLocally: Boolean;
|
||||||
|
FLoadJsonLocallyCnt: Integer;
|
||||||
FForceDownloadAndExtract: Boolean;
|
FForceDownloadAndExtract: Boolean;
|
||||||
FDeleteZipAfterInstall: Boolean;
|
FDeleteZipAfterInstall: Boolean;
|
||||||
FIncompatiblePackages: Boolean;
|
FIncompatiblePackages: Boolean;
|
||||||
@ -105,6 +107,8 @@ type
|
|||||||
property RemoteRepository: TStringList read FRemoteRepository write FRemoteRepository;
|
property RemoteRepository: TStringList read FRemoteRepository write FRemoteRepository;
|
||||||
property RemoteRepositoryTmp: TStringList read FRemoteRepositoryTmp write FRemoteRepositoryTmp;
|
property RemoteRepositoryTmp: TStringList read FRemoteRepositoryTmp write FRemoteRepositoryTmp;
|
||||||
property ActiveRepositoryIndex: Integer read FActiveRepositoryIndex write FActiveRepositoryIndex;
|
property ActiveRepositoryIndex: Integer read FActiveRepositoryIndex write FActiveRepositoryIndex;
|
||||||
|
property LoadJsonLocally: Boolean read FLoadJsonLocally write FLoadJsonLocally;
|
||||||
|
property LoadJsonLocallyCnt: Integer read FLoadJsonLocallyCnt write FLoadJsonLocallyCnt;
|
||||||
property ForceDownloadAndExtract: Boolean read FForceDownloadAndExtract write FForceDownloadAndExtract;
|
property ForceDownloadAndExtract: Boolean read FForceDownloadAndExtract write FForceDownloadAndExtract;
|
||||||
property DeleteZipAfterInstall: Boolean read FDeleteZipAfterInstall write FDeleteZipAfterInstall;
|
property DeleteZipAfterInstall: Boolean read FDeleteZipAfterInstall write FDeleteZipAfterInstall;
|
||||||
property IncompatiblePackages: Boolean read FIncompatiblePackages write FIncompatiblePackages;
|
property IncompatiblePackages: Boolean read FIncompatiblePackages write FIncompatiblePackages;
|
||||||
@ -196,6 +200,8 @@ begin
|
|||||||
if Trim(FRemoteRepository.Text) = '' then
|
if Trim(FRemoteRepository.Text) = '' then
|
||||||
FRemoteRepository.Add(cRemoteRepository);
|
FRemoteRepository.Add(cRemoteRepository);
|
||||||
FActiveRepositoryIndex := FXML.GetValue('General/ActiveRepositoryIndex/Value', 0);
|
FActiveRepositoryIndex := FXML.GetValue('General/ActiveRepositoryIndex/Value', 0);
|
||||||
|
FLoadJsonLocally := FXML.GetValue('General/LoadJsonLocally/Value', False);
|
||||||
|
FLoadJsonLocallyCnt := FXML.GetValue('General/LoadJsonLocallyCnt/Value', 0);
|
||||||
FForceDownloadAndExtract := FXML.GetValue('General/ForceDownloadAndExtract/Value', True);
|
FForceDownloadAndExtract := FXML.GetValue('General/ForceDownloadAndExtract/Value', True);
|
||||||
FDeleteZipAfterInstall := FXML.GetValue('General/DeleteZipAfterInstall/Value', True);
|
FDeleteZipAfterInstall := FXML.GetValue('General/DeleteZipAfterInstall/Value', True);
|
||||||
FIncompatiblePackages := FXML.GetValue('General/IncompatiblePackages/Value', True);
|
FIncompatiblePackages := FXML.GetValue('General/IncompatiblePackages/Value', True);
|
||||||
@ -235,6 +241,8 @@ begin
|
|||||||
FXML.SetDeleteValue('Version/Value', OpkVersion, 0);
|
FXML.SetDeleteValue('Version/Value', OpkVersion, 0);
|
||||||
FXML.SetDeleteValue('General/RemoteRepository/Value', FRemoteRepository.Text, '');
|
FXML.SetDeleteValue('General/RemoteRepository/Value', FRemoteRepository.Text, '');
|
||||||
FXML.SetDeleteValue('General/ActiveRepositoryIndex/Value', FActiveRepositoryIndex, 0);
|
FXML.SetDeleteValue('General/ActiveRepositoryIndex/Value', FActiveRepositoryIndex, 0);
|
||||||
|
FXML.SetDeleteValue('General/LoadJsonLocally/Value', FLoadJsonLocally, False);
|
||||||
|
FXML.SetDeleteValue('General/LoadJsonLocallyCnt/Value', FLoadJsonLocallyCnt, 0);
|
||||||
FXML.SetDeleteValue('General/ForceDownloadAndExtract/Value', FForceDownloadAndExtract, True);
|
FXML.SetDeleteValue('General/ForceDownloadAndExtract/Value', FForceDownloadAndExtract, True);
|
||||||
FXML.SetDeleteValue('General/DeleteZipAfterInstall/Value', FDeleteZipAfterInstall, True);
|
FXML.SetDeleteValue('General/DeleteZipAfterInstall/Value', FDeleteZipAfterInstall, True);
|
||||||
FXML.SetDeleteValue('General/IncompatiblePackages/Value', FIncompatiblePackages, True);
|
FXML.SetDeleteValue('General/IncompatiblePackages/Value', FIncompatiblePackages, True);
|
||||||
@ -281,6 +289,8 @@ begin
|
|||||||
FHintFormOptionColors.Clear;
|
FHintFormOptionColors.Clear;
|
||||||
CheckColors;
|
CheckColors;
|
||||||
FActiveRepositoryIndex := 0;
|
FActiveRepositoryIndex := 0;
|
||||||
|
FLoadJsonLocally := False;
|
||||||
|
FLoadJsonLocallyCnt := 0;
|
||||||
FForceDownloadAndExtract := True;
|
FForceDownloadAndExtract := True;
|
||||||
FDeleteZipAfterInstall := True;
|
FDeleteZipAfterInstall := True;
|
||||||
FIncompatiblePackages := True;
|
FIncompatiblePackages := True;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
object OptionsFrm: TOptionsFrm
|
object OptionsFrm: TOptionsFrm
|
||||||
Left = 338
|
Left = 399
|
||||||
Height = 597
|
Height = 597
|
||||||
Top = 131
|
Top = 156
|
||||||
Width = 644
|
Width = 644
|
||||||
BorderIcons = [biSystemMenu]
|
BorderIcons = [biSystemMenu]
|
||||||
Caption = 'Options'
|
Caption = 'Options'
|
||||||
@ -84,17 +84,17 @@ object OptionsFrm: TOptionsFrm
|
|||||||
end
|
end
|
||||||
object cbForceDownloadExtract: TCheckBox
|
object cbForceDownloadExtract: TCheckBox
|
||||||
AnchorSideLeft.Control = lbRemoteRepository
|
AnchorSideLeft.Control = lbRemoteRepository
|
||||||
AnchorSideTop.Control = pnRepositories
|
AnchorSideTop.Control = cbLoadJsonLocally
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 19
|
Height = 19
|
||||||
Top = 56
|
Top = 77
|
||||||
Width = 235
|
Width = 236
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 2
|
||||||
Caption = ' Force download and extract of packages'
|
Caption = ' Force download and extract of packages'
|
||||||
ParentShowHint = False
|
ParentShowHint = False
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
TabOrder = 1
|
TabOrder = 2
|
||||||
end
|
end
|
||||||
object cbDeleteZipAfterInstall: TCheckBox
|
object cbDeleteZipAfterInstall: TCheckBox
|
||||||
AnchorSideLeft.Control = lbRemoteRepository
|
AnchorSideLeft.Control = lbRemoteRepository
|
||||||
@ -102,20 +102,20 @@ object OptionsFrm: TOptionsFrm
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 19
|
Height = 19
|
||||||
Top = 77
|
Top = 98
|
||||||
Width = 294
|
Width = 294
|
||||||
BorderSpacing.Top = 2
|
BorderSpacing.Top = 2
|
||||||
Caption = 'Delete downloaded zip files after installation/update'
|
Caption = 'Delete downloaded zip files after installation/update'
|
||||||
ParentShowHint = False
|
ParentShowHint = False
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
TabOrder = 2
|
TabOrder = 3
|
||||||
end
|
end
|
||||||
object lbUpdates: TLabel
|
object lbUpdates: TLabel
|
||||||
AnchorSideLeft.Control = lbRemoteRepository
|
AnchorSideLeft.Control = lbRemoteRepository
|
||||||
AnchorSideTop.Control = Bevel1
|
AnchorSideTop.Control = Bevel1
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 15
|
Height = 15
|
||||||
Top = 199
|
Top = 220
|
||||||
Width = 146
|
Width = 146
|
||||||
BorderSpacing.Top = 5
|
BorderSpacing.Top = 5
|
||||||
Caption = 'Check for package updates:'
|
Caption = 'Check for package updates:'
|
||||||
@ -127,7 +127,7 @@ object OptionsFrm: TOptionsFrm
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 220
|
Top = 241
|
||||||
Width = 209
|
Width = 209
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
ItemHeight = 15
|
ItemHeight = 15
|
||||||
@ -141,7 +141,7 @@ object OptionsFrm: TOptionsFrm
|
|||||||
'Never'
|
'Never'
|
||||||
)
|
)
|
||||||
Style = csDropDownList
|
Style = csDropDownList
|
||||||
TabOrder = 4
|
TabOrder = 7
|
||||||
Text = 'Every few minutes'
|
Text = 'Every few minutes'
|
||||||
end
|
end
|
||||||
object lbLastUpdate: TLabel
|
object lbLastUpdate: TLabel
|
||||||
@ -151,7 +151,7 @@ object OptionsFrm: TOptionsFrm
|
|||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 230
|
Left = 230
|
||||||
Height = 15
|
Height = 15
|
||||||
Top = 224
|
Top = 245
|
||||||
Width = 64
|
Width = 64
|
||||||
BorderSpacing.Left = 15
|
BorderSpacing.Left = 15
|
||||||
Caption = 'Last update:'
|
Caption = 'Last update:'
|
||||||
@ -213,7 +213,7 @@ object OptionsFrm: TOptionsFrm
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 15
|
Height = 15
|
||||||
Top = 258
|
Top = 279
|
||||||
Width = 204
|
Width = 204
|
||||||
BorderSpacing.Top = 15
|
BorderSpacing.Top = 15
|
||||||
Caption = 'Show newly added packages for(days):'
|
Caption = 'Show newly added packages for(days):'
|
||||||
@ -226,11 +226,11 @@ object OptionsFrm: TOptionsFrm
|
|||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 216
|
Left = 216
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 254
|
Top = 275
|
||||||
Width = 76
|
Width = 76
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
MaxValue = 365
|
MaxValue = 365
|
||||||
TabOrder = 5
|
TabOrder = 8
|
||||||
Value = 31
|
Value = 31
|
||||||
end
|
end
|
||||||
object cbRegularIcons: TCheckBox
|
object cbRegularIcons: TCheckBox
|
||||||
@ -239,11 +239,11 @@ object OptionsFrm: TOptionsFrm
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 19
|
Height = 19
|
||||||
Top = 283
|
Top = 304
|
||||||
Width = 232
|
Width = 232
|
||||||
BorderSpacing.Top = 10
|
BorderSpacing.Top = 10
|
||||||
Caption = 'Show regular icon for installed packages'
|
Caption = 'Show regular icon for installed packages'
|
||||||
TabOrder = 6
|
TabOrder = 9
|
||||||
end
|
end
|
||||||
object cbUseDefaultTheme: TCheckBox
|
object cbUseDefaultTheme: TCheckBox
|
||||||
AnchorSideLeft.Control = lbDaysToShowNewPackages
|
AnchorSideLeft.Control = lbDaysToShowNewPackages
|
||||||
@ -251,18 +251,18 @@ object OptionsFrm: TOptionsFrm
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 19
|
Height = 19
|
||||||
Top = 441
|
Top = 462
|
||||||
Width = 116
|
Width = 116
|
||||||
BorderSpacing.Top = 7
|
BorderSpacing.Top = 7
|
||||||
Caption = 'Use default theme'
|
Caption = 'Use default theme'
|
||||||
TabOrder = 8
|
TabOrder = 11
|
||||||
end
|
end
|
||||||
object Bevel1: TBevel
|
object Bevel1: TBevel
|
||||||
AnchorSideTop.Control = lbConTimeOut
|
AnchorSideTop.Control = lbConTimeOut
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 2
|
Height = 2
|
||||||
Top = 194
|
Top = 215
|
||||||
Width = 620
|
Width = 620
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Top = 25
|
BorderSpacing.Top = 25
|
||||||
@ -272,7 +272,7 @@ object OptionsFrm: TOptionsFrm
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 4
|
Left = 4
|
||||||
Height = 2
|
Height = 2
|
||||||
Top = 327
|
Top = 348
|
||||||
Width = 620
|
Width = 620
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Top = 25
|
BorderSpacing.Top = 25
|
||||||
@ -283,7 +283,7 @@ object OptionsFrm: TOptionsFrm
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 15
|
Height = 15
|
||||||
Top = 154
|
Top = 175
|
||||||
Width = 164
|
Width = 164
|
||||||
BorderSpacing.Top = 16
|
BorderSpacing.Top = 16
|
||||||
Caption = 'Connection timeout(seconds): '
|
Caption = 'Connection timeout(seconds): '
|
||||||
@ -298,11 +298,11 @@ object OptionsFrm: TOptionsFrm
|
|||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 176
|
Left = 176
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 150
|
Top = 171
|
||||||
Width = 55
|
Width = 55
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
MinValue = 1
|
MinValue = 1
|
||||||
TabOrder = 3
|
TabOrder = 6
|
||||||
Value = 10
|
Value = 10
|
||||||
end
|
end
|
||||||
object Bevel3: TBevel
|
object Bevel3: TBevel
|
||||||
@ -310,7 +310,7 @@ object OptionsFrm: TOptionsFrm
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 4
|
Left = 4
|
||||||
Height = 2
|
Height = 2
|
||||||
Top = 432
|
Top = 453
|
||||||
Width = 620
|
Width = 620
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Top = 10
|
BorderSpacing.Top = 10
|
||||||
@ -322,7 +322,7 @@ object OptionsFrm: TOptionsFrm
|
|||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 88
|
Height = 88
|
||||||
Top = 334
|
Top = 355
|
||||||
Width = 608
|
Width = 608
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
AutoFill = True
|
AutoFill = True
|
||||||
@ -344,7 +344,7 @@ object OptionsFrm: TOptionsFrm
|
|||||||
'It''s triggered by SHIFT, moves with the mouse'
|
'It''s triggered by SHIFT, moves with the mouse'
|
||||||
'Off'
|
'Off'
|
||||||
)
|
)
|
||||||
TabOrder = 7
|
TabOrder = 10
|
||||||
object bColors: TButton
|
object bColors: TButton
|
||||||
AnchorSideTop.Control = rbHintFormOptions
|
AnchorSideTop.Control = rbHintFormOptions
|
||||||
AnchorSideRight.Control = rbHintFormOptions
|
AnchorSideRight.Control = rbHintFormOptions
|
||||||
@ -370,13 +370,13 @@ object OptionsFrm: TOptionsFrm
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 19
|
Height = 19
|
||||||
Top = 98
|
Top = 119
|
||||||
Width = 227
|
Width = 227
|
||||||
BorderSpacing.Top = 2
|
BorderSpacing.Top = 2
|
||||||
Caption = 'Warn me about incompatible packages'
|
Caption = 'Warn me about incompatible packages'
|
||||||
ParentShowHint = False
|
ParentShowHint = False
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
TabOrder = 9
|
TabOrder = 4
|
||||||
end
|
end
|
||||||
object cbAlreadyInstalledPackages: TCheckBox
|
object cbAlreadyInstalledPackages: TCheckBox
|
||||||
AnchorSideLeft.Control = lbRemoteRepository
|
AnchorSideLeft.Control = lbRemoteRepository
|
||||||
@ -384,13 +384,27 @@ object OptionsFrm: TOptionsFrm
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 19
|
Height = 19
|
||||||
Top = 119
|
Top = 140
|
||||||
Width = 242
|
Width = 242
|
||||||
BorderSpacing.Top = 2
|
BorderSpacing.Top = 2
|
||||||
Caption = 'Warn me about already installed packages'
|
Caption = 'Warn me about already installed packages'
|
||||||
ParentShowHint = False
|
ParentShowHint = False
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
TabOrder = 10
|
TabOrder = 5
|
||||||
|
end
|
||||||
|
object cbLoadJsonLocally: TCheckBox
|
||||||
|
AnchorSideLeft.Control = lbRemoteRepository
|
||||||
|
AnchorSideTop.Control = pnRepositories
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 6
|
||||||
|
Height = 19
|
||||||
|
Top = 56
|
||||||
|
Width = 230
|
||||||
|
BorderSpacing.Top = 6
|
||||||
|
Caption = 'If available, parse json from local source'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -60,6 +60,7 @@ type
|
|||||||
bColors: TButton;
|
bColors: TButton;
|
||||||
cbIncompatiblePackages: TCheckBox;
|
cbIncompatiblePackages: TCheckBox;
|
||||||
cbAlreadyInstalledPackages: TCheckBox;
|
cbAlreadyInstalledPackages: TCheckBox;
|
||||||
|
cbLoadJsonLocally: TCheckBox;
|
||||||
cbProxy: TCheckBox;
|
cbProxy: TCheckBox;
|
||||||
cbForceDownloadExtract: TCheckBox;
|
cbForceDownloadExtract: TCheckBox;
|
||||||
cbDeleteZipAfterInstall: TCheckBox;
|
cbDeleteZipAfterInstall: TCheckBox;
|
||||||
@ -420,6 +421,7 @@ begin
|
|||||||
if Options.RemoteRepositoryTmp.Count > 0 then
|
if Options.RemoteRepositoryTmp.Count > 0 then
|
||||||
Options.RemoteRepository.Text := Options.RemoteRepositoryTmp.Text;
|
Options.RemoteRepository.Text := Options.RemoteRepositoryTmp.Text;
|
||||||
Options.ActiveRepositoryIndex := cbRemoteRepository.ItemIndex;
|
Options.ActiveRepositoryIndex := cbRemoteRepository.ItemIndex;
|
||||||
|
Options.LoadJsonLocally := cbLoadJsonLocally.Checked;
|
||||||
Options.ForceDownloadAndExtract := cbForceDownloadExtract.Checked;
|
Options.ForceDownloadAndExtract := cbForceDownloadExtract.Checked;
|
||||||
Options.ConTimeOut := spConTimeOut.Value;
|
Options.ConTimeOut := spConTimeOut.Value;
|
||||||
Options.DeleteZipAfterInstall := cbDeleteZipAfterInstall.Checked;
|
Options.DeleteZipAfterInstall := cbDeleteZipAfterInstall.Checked;
|
||||||
@ -488,10 +490,13 @@ begin
|
|||||||
for I := 0 to Options.RemoteRepository.Count - 1 do
|
for I := 0 to Options.RemoteRepository.Count - 1 do
|
||||||
cbRemoteRepository.Items.Add(Options.RemoteRepository.Strings[I]);
|
cbRemoteRepository.Items.Add(Options.RemoteRepository.Strings[I]);
|
||||||
cbRemoteRepository.ItemIndex := Options.ActiveRepositoryIndex;
|
cbRemoteRepository.ItemIndex := Options.ActiveRepositoryIndex;
|
||||||
|
cbLoadJsonLocally.Checked := Options.LoadJsonLocally;
|
||||||
cbForceDownloadExtract.Checked := Options.ForceDownloadAndExtract;
|
cbForceDownloadExtract.Checked := Options.ForceDownloadAndExtract;
|
||||||
cbDeleteZipAfterInstall.Checked := Options.DeleteZipAfterInstall;
|
cbDeleteZipAfterInstall.Checked := Options.DeleteZipAfterInstall;
|
||||||
cbIncompatiblePackages.Checked := Options.IncompatiblePackages;
|
cbIncompatiblePackages.Checked := Options.IncompatiblePackages;
|
||||||
cbAlreadyInstalledPackages.Checked := Options.AlreadyInstalledPackages;
|
cbAlreadyInstalledPackages.Checked := Options.AlreadyInstalledPackages;
|
||||||
|
cbLoadJsonLocally.Caption := rsOptions_cbLoadJsonLocally_Caption;
|
||||||
|
cbLoadJsonLocally.Hint := rsOptions_cbLoadJsonLocally_Hint;
|
||||||
cbForceDownloadExtract.Caption := rsOptions_cbForceDownloadExtract_Caption;
|
cbForceDownloadExtract.Caption := rsOptions_cbForceDownloadExtract_Caption;
|
||||||
cbForceDownloadExtract.Hint := rsOptions_cbForceDownloadExtract_Hint;
|
cbForceDownloadExtract.Hint := rsOptions_cbForceDownloadExtract_Hint;
|
||||||
lbConTimeOut.Caption := rsOptions_lbConTimeOut_Caption;
|
lbConTimeOut.Caption := rsOptions_lbConTimeOut_Caption;
|
||||||
|
Loading…
Reference in New Issue
Block a user