View Single Post
  #3  
Old 09-05-2021, 10:50
Cesar82's Avatar
Cesar82 Cesar82 is offline
Registered User
 
Join Date: May 2011
Location: Brazil
Posts: 1,074
Thanks: 1,814
Thanked 2,304 Times in 787 Posts
Cesar82 is on a distinguished road
Quote:
Originally Posted by Masquerade View Post
Is there any way I can use ExtractTemporaryFile with the * wildcard?

Currently I have this:

Code:
[Files]
Source: Include\*; DestDir: {tmp}; Flags: dontcopy
However, how can I extract all of the files included above to {tmp} without manually specifiying everything (since I'm trying to desing the code so that anything in the Include folder will be extracted to {tmp})?
For not so old versions of Inno Setup you can use:
Code:
[Files]
Source: Include\*; DestDir: {tmp}; Flags: dontcopy

[ code]
function InitializeSetup(): Boolean;
begin
  ExtractTemporaryFiles('{tmp}\*.*');
  Result := True;
end;
If you use @files: in the path of any of the DLL functions they will be extracted automatically before the InitializeSetup function.
So I recommend you change to {tmp} in the DLL functions, or specify a destination other than {tmp} for them using the dontcopy flag.

Code:
function ISArcExtract(CurComponent: Cardinal; PctOfTotal:double; InName, OutPath, ExtractedPath: AnsiString; DeleteInFile: Boolean; Password, CfgFile, WorkPath: AnsiString; ExtractPCF: boolean ):boolean; external 'ISArcExtract@files:ISDone.dll stdcall delayload';

change to:

function ISArcExtract(CurComponent: Cardinal; PctOfTotal:double; InName, OutPath, ExtractedPath: AnsiString; DeleteInFile: Boolean; Password, CfgFile, WorkPath: AnsiString; ExtractPCF: boolean ):boolean; external 'ISArcExtract@{tmp}\ISDone.dll stdcall delayload';

Last edited by Cesar82; 09-05-2021 at 10:53.
Reply With Quote