How to extract the embedded archive to disk during the installation process

I have a built-in 7Zip archive in my setup script.
Is there a โ€œnativeโ€ way to extract content to the destination folder?
If there is no hint of how this could be achieved?

Updated with my implementation. Thanks for the tip TLama

 [Files] Source: "Documentation.7zip"; DestDir: "{tmp}" Source: "7za.exe"; DestDir: "{tmp}" [Run] Filename: "{tmp}\7za.exe"; Parameters: "x -o""{app}"" ""{tmp}\Documentation.7zip"""; Flags: runhidden; Description: "{cm:InstallingDocumentation}"; StatusMsg: "{cm:InstallingDocumentationStatus}" [CustomMessages] en.InstallingDocumentation=Documentation Files en.InstallingDocumentationStatus=Installing Documentation Files. This may take several minutes... 
+4
source share
2 answers

No, there is no native way to extract 7zip files from the InnoSetup installer. However, you can get a copy of the 7zip library, which is redistributable and call it from the code section of the InnoSetup script.

+4
source

Inno has no built-in method for extracting files from anything other than its own archives (which usually compress better than 7Zip).

However, Inno Setup can use wildcards to include files for installation:

 [Files] Source: "Documentation\*.*"; DestDir: "{app}/Documentation/"; 

If you have many small files, using the solidcompression flag will improve performance and compression size.

+3
source

Source: https://habr.com/ru/post/1480421/


All Articles