mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-02 18:40:24 +02:00
Opkman:Implemented the uninstall feature.
git-svn-id: trunk@54933 -
This commit is contained in:
parent
be04a6d474
commit
6bf8e034b5
@ -148,7 +148,7 @@ type
|
|||||||
procedure DoOnJSONDownloadCompleted(Sender: TObject; AJSON: TJSONStringType; AErrTyp: TErrorType; const AErrMsg: String = '');
|
procedure DoOnJSONDownloadCompleted(Sender: TObject; AJSON: TJSONStringType; AErrTyp: TErrorType; const AErrMsg: String = '');
|
||||||
procedure DoOnProcessJSON(Sender: TObject);
|
procedure DoOnProcessJSON(Sender: TObject);
|
||||||
procedure DoOnUpdate(Sender: TObject);
|
procedure DoOnUpdate(Sender: TObject);
|
||||||
function IsSomethingChecked(const AIsUpdate: Boolean = False): Boolean;
|
function IsSomethingChecked(const AResolveDependencies: Boolean = True): Boolean;
|
||||||
function Download(const ADstDir: String; var ADoExtract: Boolean): TModalResult;
|
function Download(const ADstDir: String; var ADoExtract: Boolean): TModalResult;
|
||||||
function Extract(const ASrcDir, ADstDir: String; var ADoOpen: Boolean; const AIsUpdate: Boolean = False): TModalResult;
|
function Extract(const ASrcDir, ADstDir: String; var ADoOpen: Boolean; const AIsUpdate: Boolean = False): TModalResult;
|
||||||
function Install(var AInstallStatus: TInstallStatus; var ANeedToRebuild: Boolean): TModalResult;
|
function Install(var AInstallStatus: TInstallStatus; var ANeedToRebuild: Boolean): TModalResult;
|
||||||
@ -253,12 +253,12 @@ begin
|
|||||||
PackageDownloader.DownloadJSON(10000);
|
PackageDownloader.DownloadJSON(10000);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TMainFrm.IsSomethingChecked(const AIsUpdate: Boolean = False): Boolean;
|
function TMainFrm.IsSomethingChecked(const AResolveDependencies: Boolean = True): Boolean;
|
||||||
begin
|
begin
|
||||||
Result := VisualTree.VST.CheckedCount > 0;
|
Result := VisualTree.VST.CheckedCount > 0;
|
||||||
if Result then
|
if Result then
|
||||||
begin
|
begin
|
||||||
if not AIsUpdate then
|
if AResolveDependencies then
|
||||||
if VisualTree.ResolveDependencies = mrCancel then
|
if VisualTree.ResolveDependencies = mrCancel then
|
||||||
Exit;
|
Exit;
|
||||||
VisualTree.GetPackageList;
|
VisualTree.GetPackageList;
|
||||||
@ -627,7 +627,7 @@ var
|
|||||||
DoExtract: Boolean;
|
DoExtract: Boolean;
|
||||||
DoOpen: Boolean;
|
DoOpen: Boolean;
|
||||||
begin
|
begin
|
||||||
if not IsSomethingChecked then
|
if not IsSomethingChecked(False) then
|
||||||
Exit;
|
Exit;
|
||||||
|
|
||||||
SDD.InitialDir := Options.LastDownloadDir;
|
SDD.InitialDir := Options.LastDownloadDir;
|
||||||
@ -686,7 +686,7 @@ var
|
|||||||
InstallStatus: TInstallStatus;
|
InstallStatus: TInstallStatus;
|
||||||
NeedToRebuild: Boolean;
|
NeedToRebuild: Boolean;
|
||||||
begin
|
begin
|
||||||
if not IsSomethingChecked(True) then
|
if not IsSomethingChecked(False) then
|
||||||
Exit;
|
Exit;
|
||||||
CanGo := True;
|
CanGo := True;
|
||||||
NeedToRebuild := False;
|
NeedToRebuild := False;
|
||||||
@ -803,7 +803,7 @@ var
|
|||||||
FileName: String;
|
FileName: String;
|
||||||
NeedToRebuild: Boolean;
|
NeedToRebuild: Boolean;
|
||||||
begin
|
begin
|
||||||
if not IsSomethingChecked then
|
if not IsSomethingChecked(False) then
|
||||||
Exit;
|
Exit;
|
||||||
|
|
||||||
if IsAtLeastOnePackageInstalled then
|
if IsAtLeastOnePackageInstalled then
|
||||||
|
Loading…
Reference in New Issue
Block a user