mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-19 07:29:25 +02:00
Implemented update feature.
git-svn-id: trunk@53570 -
This commit is contained in:
parent
21d561cbd7
commit
f49912d641
@ -387,14 +387,14 @@ begin
|
||||
begin
|
||||
if FNeedToBreak then
|
||||
Break;
|
||||
if (SerializablePackages.Items[I].Checked) and (Trim(SerializablePackages.Items[I].DownloadURL) <> '') then
|
||||
if (SerializablePackages.Items[I].Checked) and (Trim(SerializablePackages.Items[I].DownloadZipURL) <> '') then
|
||||
begin
|
||||
Inc(FCnt);
|
||||
FUpackageName := SerializablePackages.Items[I].Name;
|
||||
FUPackageURL := SerializablePackages.Items[I].DownloadURL;
|
||||
FUPackageURL := SerializablePackages.Items[I].DownloadZipURL;
|
||||
FUTyp := 0;
|
||||
Synchronize(@DoOnPackageUpdateProgress);
|
||||
UpdateSize := GetUpdateSize(SerializablePackages.Items[I].DownloadURL, FUErrMsg);
|
||||
UpdateSize := GetUpdateSize(SerializablePackages.Items[I].DownloadZipURL, FUErrMsg);
|
||||
if UpdateSize > -1 then
|
||||
begin
|
||||
FUTyp := 1;
|
||||
@ -431,11 +431,11 @@ begin
|
||||
begin
|
||||
if NeedToBreak then
|
||||
Break;
|
||||
if (SerializablePackages.Items[I].Checked) and (Trim(SerializablePackages.Items[I].DownloadURL) <> '') and
|
||||
if (SerializablePackages.Items[I].Checked) and (Trim(SerializablePackages.Items[I].DownloadZipURL) <> '') and
|
||||
(SerializablePackages.Items[I].UpdateSize > -1) and (not (psError in SerializablePackages.Items[I].PackageStates)) then
|
||||
begin
|
||||
Inc(FCnt);
|
||||
FFrom := FixProtocol(SerializablePackages.Items[I].DownloadURL);
|
||||
FFrom := FixProtocol(SerializablePackages.Items[I].DownloadZipURL);
|
||||
FTo := FDownloadTo + SerializablePackages.Items[I].RepositoryFileName;
|
||||
FCurSize := SerializablePackages.Items[I].UpdateSize;
|
||||
DS := TDownloadStream.Create(TFileStream.Create(FTo, fmCreate));
|
||||
@ -589,7 +589,7 @@ begin
|
||||
FTotCnt := 0;
|
||||
FTotSize := 0;
|
||||
for I := 0 to SerializablePackages.Count - 1 do
|
||||
if (SerializablePackages.Items[I].Checked) and (Trim(SerializablePackages.Items[I].DownloadURL) <> '') then
|
||||
if (SerializablePackages.Items[I].Checked) and (Trim(SerializablePackages.Items[I].DownloadZipURL) <> '') then
|
||||
Inc(FTotCnt);
|
||||
FTimer := TThreadTimer.Create;
|
||||
FTimer.OnTimer := @DoOnTimer;
|
||||
|
@ -165,7 +165,7 @@ begin
|
||||
if (SerializablePackages.Items[I].Checked) then
|
||||
begin
|
||||
Inc(ChkCnt);
|
||||
if (Trim(SerializablePackages.Items[I].DownloadURL) = '') then
|
||||
if (Trim(SerializablePackages.Items[I].DownloadZipURL) = '') then
|
||||
begin
|
||||
Inc(InvCnt);
|
||||
Node := FVST.AddChild(nil);
|
||||
|
@ -217,11 +217,11 @@ begin
|
||||
begin
|
||||
Package.ForceUpdate := FXML.GetValue('Items/' + Path + '/ForceUpdate', False);
|
||||
Package.DownloadZipURL := FXML.GetValue('Items/' + Path + '/DownloadZipURL', '');
|
||||
PackageFileName := FXML.GetValue('Items/' + Path + '/PackageFileName', '');
|
||||
PackageFile := Package.FindPackageFile(PackageFileName);
|
||||
if PackageFile <> nil then
|
||||
PackageFile.UpdateVersion := FXML.GetValue('Items/' + Path + '/UpdateVersion', '');
|
||||
end;
|
||||
PackageFileName := FXML.GetValue('Items/' + Path + '/PackageFileName', '');
|
||||
PackageFile := Package.FindPackageFile(PackageFileName);
|
||||
if PackageFile <> nil then
|
||||
PackageFile.UpdateVersion := FXML.GetValue('Items/' + Path + '/UpdateVersion', '');
|
||||
end;
|
||||
Synchronize(@DoOnUpdate);
|
||||
end;
|
||||
|
@ -205,6 +205,7 @@ begin
|
||||
begin
|
||||
Position := 4;
|
||||
Width := 280;
|
||||
Options := Options - [coResizable];
|
||||
Text := rsMainFrm_VSTHeaderColumn_Data;
|
||||
end;
|
||||
with Header.Columns.Add do
|
||||
@ -408,6 +409,7 @@ begin
|
||||
FVST.OnCollapsed := @VSTCollapsed;
|
||||
FVST.OnExpanding := @VSTExpanding;
|
||||
end;
|
||||
HideButtons;
|
||||
end;
|
||||
|
||||
function TVisualTree.IsAllChecked(const AChecking: PVirtualNode): Boolean;
|
||||
|
Loading…
Reference in New Issue
Block a user