fppkg: Added ability to uninstall packages

git-svn-id: trunk@55355 -
This commit is contained in:
joost 2017-06-15 21:29:21 +00:00
parent 5dfbda640a
commit 5db6394191
6 changed files with 66 additions and 13 deletions

View File

@ -43,6 +43,10 @@ msgstr "l'initialisation de \"fppkg\""
msgid "install package(s)"
msgstr "l'installation de paquets"
#: fppkg_mainfrm.sactuninstpackages
msgid "uninstall package(s)"
msgstr ""
#: fppkg_mainfrm.sactupdate
msgid "update repository"
msgstr "la mise à jour du dépôt"
@ -205,6 +209,10 @@ msgstr "Filtrer les paquets au niveau supérieur"
msgid "ToolBar"
msgstr "Barre d'outils"
#: tfppkgform.uninstallbutton.caption
msgid "Uninstall"
msgstr ""
#: tfppkgform.updatebutton.caption
msgid "Update"
msgstr "Mettre à jour"

View File

@ -33,6 +33,10 @@ msgstr ""
msgid "install package(s)"
msgstr ""
#: fppkg_mainfrm.sactuninstpackages
msgid "uninstall package(s)"
msgstr ""
#: fppkg_mainfrm.sactupdate
msgid "update repository"
msgstr ""
@ -192,6 +196,10 @@ msgstr ""
msgid "ToolBar"
msgstr ""
#: tfppkgform.uninstallbutton.caption
msgid "Uninstall"
msgstr ""
#: tfppkgform.updatebutton.caption
msgid "Update"
msgstr ""

View File

@ -43,6 +43,10 @@ msgstr "инициализация fppkg"
msgid "install package(s)"
msgstr "установка пакетов"
#: fppkg_mainfrm.sactuninstpackages
msgid "uninstall package(s)"
msgstr ""
#: fppkg_mainfrm.sactupdate
msgid "update repository"
msgstr "обновление репозитория"
@ -205,6 +209,10 @@ msgstr "Фильтровать пакеты по уровню поддержки
msgid "ToolBar"
msgstr "Инструментальная панель"
#: tfppkgform.uninstallbutton.caption
msgid "Uninstall"
msgstr ""
#: tfppkgform.updatebutton.caption
msgid "Update"
msgstr "Обновить"

View File

@ -1,12 +1,11 @@
object FppkgForm: TFppkgForm
Left = 744
Left = 2344
Height = 674
Top = 270
Width = 800
Caption = 'FppkgForm'
ClientHeight = 646
ClientWidth = 800
DesignTimePPI = 139
Menu = MainMenu
OnCreate = FormCreate
OnDestroy = FormDestroy
@ -91,7 +90,7 @@ object FppkgForm: TFppkgForm
OnClick = FixBrokenButtonClick
end
object SearchPanel: TPanel
Left = 447
Left = 511
Height = 50
Top = 2
Width = 170
@ -177,22 +176,29 @@ object FppkgForm: TFppkgForm
ParentFont = False
end
end
object UninstallButton: TToolButton
Left = 447
Top = 2
Caption = 'Uninstall'
ImageIndex = 5
OnClick = UninstallButtonClick
end
end
object Panel: TPanel
Left = 0
Height = 590
Height = 618
Top = 56
Width = 800
Align = alClient
BevelOuter = bvNone
ClientHeight = 590
ClientHeight = 618
ClientWidth = 800
ParentFont = False
TabOrder = 1
OnClick = PanelClick
object PackageListView: TListView
Left = 175
Height = 473
Height = 501
Top = 0
Width = 625
Align = alClient
@ -234,12 +240,12 @@ object FppkgForm: TFppkgForm
end
object FilterPanel: TPanel
Left = 0
Height = 473
Height = 501
Top = 0
Width = 170
Align = alLeft
BevelOuter = bvNone
ClientHeight = 473
ClientHeight = 501
ClientWidth = 170
ParentFont = False
TabOrder = 1
@ -293,7 +299,7 @@ object FppkgForm: TFppkgForm
end
object CategoryCheckListBox: TCheckListBox
Left = 6
Height = 324
Height = 352
Top = 143
Width = 158
Align = alClient
@ -307,14 +313,14 @@ object FppkgForm: TFppkgForm
end
object VertSplitter: TSplitter
Left = 170
Height = 473
Height = 501
Top = 0
Width = 5
end
object StatusBar1: TStatusBar
Left = 0
Height = 22
Top = 568
Top = 596
Width = 800
Panels = <>
ParentFont = False
@ -323,7 +329,7 @@ object FppkgForm: TFppkgForm
Cursor = crVSplit
Left = 0
Height = 5
Top = 473
Top = 501
Width = 800
Align = alBottom
ResizeAnchor = akBottom
@ -331,7 +337,7 @@ object FppkgForm: TFppkgForm
object OutputMemo: TMemo
Left = 0
Height = 90
Top = 478
Top = 506
Width = 800
Align = alBottom
ParentFont = False

View File

@ -18,6 +18,7 @@
{"hash":110989598,"name":"tfppkgform.fixbrokenbutton.caption","sourcebytes":[70,105,120,32,98,114,111,107,101,110],"value":"Fix broken"},
{"hash":94079128,"name":"tfppkgform.searchlabel.caption","sourcebytes":[83,101,97,114,99,104],"value":"Search"},
{"hash":75806803,"name":"tfppkgform.searchbutton.hint","sourcebytes":[83,101,97,114,99,104,32,102,111,114,32,107,101,121,119,111,114,100,115],"value":"Search for keywords"},
{"hash":5962876,"name":"tfppkgform.uninstallbutton.caption","sourcebytes":[85,110,105,110,115,116,97,108,108],"value":"Uninstall"},
{"hash":346165,"name":"tfppkgform.packagelistview.columns[0].caption","sourcebytes":[78,97,109,101],"value":"Name"},
{"hash":5941413,"name":"tfppkgform.packagelistview.columns[1].caption","sourcebytes":[83,116,97,116,101],"value":"State"},
{"hash":178815716,"name":"tfppkgform.packagelistview.columns[2].caption","sourcebytes":[73,110,115,116,97,108,108,101,100],"value":"Installed"},

View File

@ -100,6 +100,7 @@ type
CleanButton: TToolButton;
ArchiveButton: TToolButton;
DownloadButton: TToolButton;
UninstallButton: TToolButton;
VertSplitter: TSplitter;
procedure ArchiveButtonClick(Sender: TObject);
procedure BuildButtonClick(Sender: TObject);
@ -124,6 +125,7 @@ type
procedure SearchButtonClick(Sender: TObject);
procedure SearchEditKeyUp(Sender: TObject; var Key: word; Shift: TShiftState);
procedure SupportCheckGroupItemClick(Sender: TObject; Index: integer);
procedure UninstallButtonClick(Sender: TObject);
procedure UpdateButtonClick(Sender: TObject);
procedure HandleLog(var Msg: TLMessage); message WM_LogMessageWaiting;
procedure HandleWorkerThreadDone(var Msg: TLMessage); message WM_WorkerThreadDone;
@ -186,6 +188,7 @@ resourcestring
SActArchivePackages = 'create archive(s) for package(s)';
SActBuildPackages = 'build package(s)';
SActInstallPackages = 'install package(s)';
SActUnInstPackages = 'uninstall package(s)';
SActUpdate = 'update repository';
SActInitializeFppkg = 'initialize fppkg';
@ -573,6 +576,25 @@ begin
UpdatePackageListView;
end;
procedure TFppkgForm.UninstallButtonClick(Sender: TObject);
var
s: TStrings;
begin
s := TStringList.Create;
GetSelectedPackages(s);
if s.Count = 0 then
ShowError(SActUnInstPackages, SErrNoPackageSpecified)
else
begin
DoRun(FppkgCfg, 'uninstall', s, SActUnInstPackages);
ListPackages;
UpdatePackageListView;
end;
s.Free;
end;
procedure TFppkgForm.UpdateButtonClick(Sender: TObject);
var
s: TStrings;