Hope someone can shed somelight, i created a backup routine that zips the data in folder.
But as soon as save is called it gives error
Not found MacOS LibMpg123-32_MAC.dylib.
This a 64bit app for cocao, so odd y it mentions a 32bit library.
I thought TZipper did not require dependencies
i put various breakpoints andall the data is correct,
even tried writing a basic text file to the location and all is fine.
Works sweet under windows..
fpc 3.2.3
zipfilename:=BackupDialog.FileName;
zipprog:=0;
BackupFiles:= TStringList.Create;
if fileexists(zipfilename) then deletefile(pchar(zipfilename));
if DirectoryExists(MyDocFolder+Home_Folder) then
begin
FindAllFiles(BackupFiles,MyDocFolder+Home_Folder, '*.*', true); // RECURSE SUB FOLDERS
BackupFiles.Sort;
zip := TZipper.Create;
try
zip.UseLanguageEncoding := true; // Requires FPC 3.2+
zip.FileName :=zipfilename;
zip.OnProgress:=@backupzipprogress;
zip.OnStartFile:=@backupzipfilestart;
zip.OnPercent:=1;
for i:=0 to BackupFiles.Count-1 do
begin
AFilename:=BackupFiles.Strings[i];
AExt:=upcase(ExtractFileExt(AFilename));
ARelativeFilename := CreateRelativePath(AFilename, MyDocFolder+Home_Folder);
zipprog:=0;
ok:=True;
case AExt of
'.TMP':ok:=false;
'.ZIP':ok:=leftstr(ARelativeFilename,10)='Temp_Files';//ok:=false;
end;
if ((ok) and (Not Backup_Incl_Audio)) then
begin
case AExt of
'.MP3','.WAV','.OGG':ok:=false;
end;
if ok then zip.Entries.AddFileEntry(BackupFiles[i],ARelativeFilename);
end;
end;
shp_zipping_prog.Visible:=true;
Testers_lab.Visible:=False;
Backup_Running:=True;
Update_My_Application_Processes(true);
zip.SaveToFile(zipfilename); // <-- crashes out MPEG 32 dylib error, y is i being used and called on a 64 bit cocao
Finally
zip.Free;
BackupFiles.Free;
end;
end;