unit Loader;

interface
uses
  Mform, SysUtils, ZipMstr, Forms;

function UnZ(FN : string) : boolean;

implementation

function UnZ(FN : string) : boolean;

begin
  FN:=ExtractFilePath(Application.ExeName)+'\'+FN;
  if FileExists(FN) then
  with QForm.Zip do
    begin
      ZipFileName:=FN;
      FSpecArgs.Add('*.*');
      ExtrBaseDir:=ExtractFilePath(Application.ExeName)+'Data\temp\';
      ExtrOptions:=ExtrOptions+[ExtrOverwrite];
      Extract;
      result:=true;
    end
  else
  result:=false;
end;

end.
