You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.0 KiB
Plaintext

11 months ago
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, VCLUnZip, VCLZip;
type
TForm1 = class(TForm)
Button1: TButton;
VCLZip2: TVCLZip;
OpenDialog1: TOpenDialog;
Memo1: TMemo;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
numunzipped,i:integer;
begin
with VCLZip2 do
begin
for i:=0 to Memo1.Lines.Count-1 do
begin
FilesList.Add(Memo1.Lines[i]);
end;
zipname:='<27><>ʤ<EFBFBD><CAA4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>ϵͳ.zip';
DoAll :=false;
DestDir :=ExtractFilePath(Application.ExeName);
RecreateDirs :=false;
RetainAttributes:=true;
numunzipped:=Zip;
end;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
if OpenDialog1.Execute then
Memo1.Lines.Add(OpenDialog1.FileName)
end;
end.