I'm working on an Inno Setup script that works in a Windows 10 VM but fails in Crossover with a Windows 10 bottle.
const
SHCONTCH_NOPROGRESSBOX = 4;
SHCONTCH_RESPONDYESTOALL = 16;
procedure UnZip(ZipPath, TargetPath: string);
var
Shell: Variant;
ZipFile: Variant;
TargetFolder: Variant;
begin
Shell := CreateOleObject('Shell.Application');
ZipFile := Shell.NameSpace(ZipPath);
if VarIsClear(ZipFile) then
Log(
Format('ZIP file "%s" does not exist or cannot be opened', [ZipPath]));
TargetFolder := Shell.NameSpace(TargetPath);
if VarIsClear(TargetFolder) then
Log(Format('Target path "%s" does not exist', [TargetPath]));
TargetFolder.CopyHere(
ZipFile.Items, SHCONTCH_NOPROGRESSBOX or SHCONTCH_RESPONDYESTOALL);
end;
procedure ExtractMe(src, target : AnsiString);
begin
Log(Format('Zipfile "%s" ', [ExpandConstant(src)]));
Log(Format('TargetPath "%s" ', [ExpandConstant(target)]));
UnZip(ExpandConstant(src), ExpandConstant(target));
end;
So I run this ExtractMe on a file, the Zipfile is correctly logged as being there with the correct path but in the UnZip procedure it fails miserably by not finding it "does not exist or cannot be opened".
So one of those things it does is not supported in Wine/Crossover, it seems :(