Search code examples
installationcompressionnsis

NSIS: How to manually extract files during installation


I have a rather large project whose Installer is written using NSIS.
My problem is, that I cannot simply add all files to the installer file, because it will exceed the 2GB limit.
I also cannot leave my large files in a flat structure on the dvd and just copy them using the CopyFiles command, because the total size of the directory structure will exceed 4.7GB.

So what I want to do now is to have my big files in a flat but compressed structure on the dvd and manually extract them to the install directory during installation. The structure on the dvd would look like this:

/ 
+--+ data
|  +-- <compressed files>
+--setup.exe 

Are there any convenient ways of doing this?

Thanks a lot in advance for any ideas.


Solution

    • There are several NSIS plugins that can extract from external archives: ZipDLL, NsUnzip, ExtractDLLEx, ExtractDLL, CABSetup or UnTGZ
    • You could execute a external tool like UnRAR.exe or 7z.exe
    • You could create some mini NSIS installers that you execute (Run with /D to set $instdir for sub-installers, you probably want to use /S /D=$instdir)