I have the app showing its designated background image while app loads. It then crashes running this code at startup:
// unzip own resources like images, data files ettc.
FAppDataDirPath := GetHomePath + PathDelim + Application.Title + '.app' + PathDelim;
P := FAppDataDirPath + 'assets.zip';
if FileExists(P) then
begin
Z := TZipFile.Create;
try
Z.Open(P, zmRead);
Z.ExtractAll(FAppDataDirPath + 'Library');
finally
Z.Free;
end;
end
;
This is the error I get:

The problem is that you're using the wrong method to get the locations.
Switch to using System.IOUtils.TPath, using TPath.GetHomePath to get the home folder, TPath.GetDocumentsPath for the Documents folder, and TPath.GetLibraryPath to get the Library folder location.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With