Archive: Spanning on multiple CDs


Spanning on multiple CDs
I searched for this topic and found a thread about spanning archives over 1.44mb floppy disks, but that's useless - though I think the same principle applies.

I have a distribution which is over 3 gigs and I want to compress it and distribute it on CD-ROM. How would I do this with NSIS? I don't want to zip it using Winzip and make it a self-extracting archive that runs the setup file after, that just seems cheesy and unprofessional. Is there a way to do this fully within NSIS?

Come to think of it, I've never seen any mention of features such as this in any of the NSIS documentation that I've read. Is the concept behind NSIS just for small installers that can be transferred over the internet? Because if not, the most common sense application would be to install programs from CDs.


See the NSIS Archive for decompression plug-ins that can be called from the installer.


I'll check those out. Thanks!


A lor of people have asked this and everytime I always think to myself for a couple minutes about how this could be done.

Maybe if you made a bunch of installers (1 for every CD) that use COPYFILES instead of compiling them into an installer. Then you make an installer that includes those 'installers'. You tell the main installer to extract all the installers for the CDs to a TEMP directory. Then it will run the first one. They can install it and move on. Then you can make a custom page that asks you to insert the next CD and it will call that CDs installer. Repeat for every installer for every CD you need to make. If that was unclear (which it probably was) ask me and I'll take more time to explain.


Wow yeah... That does seem kind of complicated hehe... I checked out some of the plugins that do extraction but the one I grabbed didn't have the program to archive and compress, only to extract. I'll try the other plugin tomorrow (it apparently comes with the archiver).

If I do this however, would I just have the installer extract everything to a temp directory and then install from there?

And does this plugin support spanned archives? I didn't see any mention of it.


Alternatively, you could just make several silent installers, and call them individually.

[first post]


I'm doing this now for a large installation (60+ GB uncompressed... compressed and split into volumes it spans 6 DVDs).

I'm using some python scripts (it's actually an SCons build), to collect a list of all the source files into chunks of 1-20 files that are passed through tar/gzip to create a .tgz file for each chunk.

Once everything is compressed the build process splits the .tgz files across multiple volumes. The build script creates a 'vol<volume#>' file in the directory of what will become the root directory of each DVD.

As it splits the files across the volumes, the build script is also generating NSIS include scripts with entries for each .tgz file.

The generated NSIS script checks that the correct volume is inserted in the drive (checking for the vol<volume#> file). Then copies the .tgz file from the DVD to $INSTDIR, untar/ungzips the files from the .tgz, then deletes the local copy of the .tgz file.

On the first volume, setup.exe bootstraps the install by copying the real install script to $TEMP and then running the real install with a command-line parameter that gives it the $EXEDIR that setup.exe ran from. setup.exe also detects if it is being run from the network rather than DVD, if so it gives the install another cmdline parameter that tells it to go up the directory structure for the secondary volumes rather than prompting the user to insert the new volumes.


I read somewhere that using the .CAB format was an easy way of doing this. If I remember correctly you cab the files and place your installer on the final disk, then when you launch your installer you get the install location and component info and only uncab the required files to the location you want them in......by referencing the cab on the same disc as the installer it will ask you to insert the appropriate disc.


I would have thought the installer would be on the first disc...


I have an idea!

You make two installers, one to extract the other one to TEMP directory and one to install.

The first installer should include:

SilentInstall "silent"
Section ""
SetOutPath "$TEMP"
File "%Installer Name%.exe"
ExecShell OPEN "$TEMP\%Installer Name%.exe" SW_SHOWNORMAL
WriteRegStr "HKLM" "Software\%Software Name%" "CD Dir" "$EXEDIR"
SectionEnd


The second installer that actually 'installs' should include:

InstallDirRegKey "HKLM\Software\%Software Name%\CD Dir"
CheckCD:
IfFileExists "$INSTDIR\CD1.id" CD1
MB_OK "Please insert CD 1 to start installation."
Goto CheckCD

CD1:
Section "%Section Name%"
CopyFile "$INSTDIR\File1.exe"
CopyFile "$INSTDIR\File2.dll"
Etc, etc, etc, etc.
IfFileExists "$INSTDIR\CD2.id" CD2
MB_OK "Please insert CD 2 to continue installation."
Goto CheckCD
SectionEnd

CD2:
Section "%Section Name%"
CopyFile "$INSTDIR\File1.exe"
CopyFile "$INSTDIR\File2.dll"
Etc, etc, etc, etc.
IfFileExists "$INSTDIR\CD3.id" CD3
MB_OK "Please insert CD 3 to continue installation."
Goto CheckCD
SectionEnd

CD3:
Continue on with this for however many CDs you have

Let me know if it works or not...