Archive: Splitting install


Splitting install
I was wondering if there is a way to split the install file, so that the setup.exe will contain only the data for extracting the files and all the compressed data would be in one or more files. It's like most commercial setup programs are made.

thanks in advance


Yes. You can use ZipDLL or ExtractDLL or UnTGZ to extract files and you can use NSISdl or inetload to download files.


thanks again


You could use 7z (lzma compression) rather than Zip for the seperate files. They'd take up less space. You'd have to include the 7z.exe executable in your installer, extract it and then execute it using nsExec::Exec to decompress the 7z files.

You can grab 7z.exe at http://www.7-zip.org

-Stu


What script do I have to add for multiple cd setup, so that when it will unpak the first file it will ask for the second cd and it will actually search for the second file to check if the second cd is in. thank for the help but I'm doing my first setup ;)


Something like this, perhaps.

; commands that extract from the first CD

promptCD:
MessageBox MB_OK|MB_ICONEXCLAMATION "Please insert the second CD before continuing."

IfFileExists "D:\SomeFile.ext" secondCD promptCD

secondCD:
; commands that extract from the second CD

You'd need to use the System plugin with some API call (not sure which one though) to check which drive is the actual CD drive. It's never going to be the D: drive (my CD drives are G and H)

I think something like this came up before, so you might want to try searching the forums...

-Stu


:) I was in the middle of editing my post to mention the same thing.


I looked on the forums but I couldn't find nothing usefull, have anyone ever made an installer like this, so you could help me?

i found this. Maybe I could make a droplist so the user would select in which drive he put the cd and then it would check it?


There is an Archive page showing how to find CD drives:

http://nsis.sourceforge.net/archive/....php?pageid=82


You could use $EXEDIR to find the drive that the installer was executed from and write it into the registry. Then you could read it into a variable like ${CD_DRV} and then you'd have the correct drive.


Originally posted by Afrow UK
You could use 7z (lzma compression) rather than Zip for the seperate files. They'd take up less space. You'd have to include the 7z.exe executable in your installer, extract it and then execute it using nsExec::Exec to decompress the 7z files.

You can grab 7z.exe at http://www.7-zip.org

-Stu
How exactly to do this, I mean is there something already wrote about this, because I really can't figure it out how to do it.

File "C:\Program Files\7-Zip\7z.exe"
Exec '"7z.exe" e 1.7z -o$INSTDIR'

I already solved it thanks for all the help


one more thing, I used uharc which gave me better compression than 7z but now before the extracting finishes it pops up the message box for the next cd, why it doesn't wait?


Try nsExec::Exec.
It will run the executable hidden, and the installer will wait until it has finished.

ExecWait also waits for it to finish, but it doesn't hide the command window.
Exec just executes a program and doesn't wait.

-Stu


I came to this topic with the same problem -- i.e. how to split the installation into several files. I can understand the solution offered, but I feel it is a little bit underwhelming. If I pack all the files myself with an external packer then:

1. I will run into problem of filesize, because I want the first pack to be smaller, so that it would fit on the CD along with the setup.exe file;

2. I will have to manually set the size of my sections so that the installation displays it properly; and

3. I will have to write some messy interface between my setup and the unpacker (checking for disc in drive, reading the error levels, deleting partially unpacked files if setup is aborted, etc.)

I am a dissatisfied InstallShield user and I am sincerely trying to like NSIS, but if it cannot split the installation into several file "on its own", this seems like a big drawback to me. Or am I missing something?


I am afraid you are not missing anything.

NSIS is developed on a free-time basis where nobody is getting paid (to my knowledge anyway!)
Therefore, if you want something done, you must do it yourself (and ask questions on the way of course!)

Edit: Perhaps I could make some default NSIS installer header which sets this up, where one must simply identify each CD and file to install. However, like I said it'd be when I have some free time, which is not common at this time!

-Stu


Well here's a thought which I know a lot of companies have done for commercial software (i.e. Half-Life Generations and Quake III Gold).

You simply have a setup.exe on each CD with autorun on each CD!

-Stu


I appreciate all the effort that went into creating NSIS and I understand the concept of OpenSource project. My point was, that if I use a command line controlled external compressor, then I am using precious little of NSIS functionality.

I am afraid I don't understand your comments

Originally posted by Afrow UK
Edit: Perhaps I could make some default NSIS installer header which sets this up, where one must simply identify each CD and file to install. However, like I said it'd be when I have some free time, which is not common at this time!

-Stu
How could I identify CD and file to install? As far as I was able to say, NSIS simply creates one file (Setup.exe) and puts everything into it. How could I change this behaviour without changing the source code and recompiling?

NSIS can do much more than just create a 'setup.exe'
You can do a huge amount with NSIS.

Have a look at these for example programs / installers (made with NSIS):
http://dynamic5.gamespy.com/~ddc/sit...yupdater.shtml
http://dynamic5.gamespy.com/~ddc/afr...er/manual.html
http://nsis.sourceforge.net/archive/...php?pageid=493

-Stu


any news on spliting??? with new 7-zip lzma supporting split files, why nsis don't take the same way?? I wanted to see TODO list, but it didn't worked, so please anyone post it here.