flatface
8th September 2006 10:55 UTC
variable size on install page
Hi, This website is a godsend and I have searched on this topic and found many useful links and ideas but I need a little help tying it all together.
I need to install:
1. .net 2 if not present (240MB required by .net installer)
2. files to $APPDATA (10MB)
3. files to $INSTDIR (350MB) installing from zips
So if a user needs .net installed when they hit the install page I can use SetSectionSize to set the size to 240+10+350.
but if the user then chooses another drive for the install I would need 350 on that drive and 250 free on the C:
I could after do a disk check for the available 250 on C: and give a warning but is there a cleaner way to do it?
many thanks in advance...
kichik
8th September 2006 17:26 UTC
You could have the .NET test done before the directory page shows, e.g. in .onInit.
flatface
9th September 2006 09:01 UTC
I have that been checked in the .onInit but if .NET is needed the example still applies - how do I indicate on the install page that space is needed on the C: drive regardless of what drive they choose as the install location?
kichik
9th September 2006 10:08 UTC
You said it yourself, you use SetSectionSize to set the correct section size. The directory page will use that section size to determine how much space is needed for the installation.
flatface
9th September 2006 12:33 UTC
sorry if I am not being clear, thank you for trying to help kichik.
I can indeed setSectionSize to be 240+10+350 on the install page but if they have no space on their C: drive and choose say their D: to install to - they will not have enough space on the C: to install .NET.
I would like an install page like:
space required - 600MB
and then if they choose a different location (D:)
space required - C: 250MB
D: 350MB
so that it still lets them know they have insuficient space for the install.
kichik
9th September 2006 14:22 UTC
In that case, you'll have to implement a custom test. You can use CheckSpaceFree for that. I'd put the test on the leave function of the directory page along with a little text change in that page to note about the additional required space.
flatface
9th September 2006 16:33 UTC
The ideal place to put it would be after the browse button returns the location of the install - then you could update the install sizes. I dont know if that is possible.
kichik
9th September 2006 16:34 UTC
It's possible. Use .onVerifyInstDir, it's called whenever the installation directory changes, including changes by the browse button.
flatface
10th September 2006 11:20 UTC
brilliant! exactly what i was looking for. cheers