Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 15th December 2013, 13:22   #1
helpmepl0x43
Junior Member
 
Join Date: Jan 2013
Posts: 2
SetOverwrite installation time

I was thinking of using SetOverwrite to have the installer skip installing files which already exist in the destination directory... this is to save the user some time because I have a few fairly large files, so I don't want it unnecessarily overwriting large files that already exist.

But there's this problem with SetOverwrite.

If I'm installing a bunch of files with SetOverwrite ifdiff (overwrite only if older/newer), eg:
code:

SetOverwrite ifdiff
File X
File Y



Let's say File X is 500mb, File Y is 1kb.
The destination folder already has an identical File X, but a different File Y.

Thus File X would get skipped, but File Y would be overwritten.

But here's what happens:
File X gets skipped - now that's about 15-20 seconds saved.
But when it comes to overwriting File Y, it then spends that saved 15-20s of install time to overwrite this measly 1kb file!!

This makes no sense to me! Am I missing something here?


I'm still relatively inexperienced at NSIS, so could someone suggest an alternative for overwriting files if they are found to be older/newer than the ones being installed?

Thanks
----------------
Edit:

I find that placing the SetOverwrite and large file at the very end of the script works fine (it installs Y quickly, and skips X as intended):
code:

File Y
SetOverwrite ifdiff
File X



But this doesn't help when you have multiple large files.

Last edited by helpmepl0x43; 15th December 2013 at 14:50.
helpmepl0x43 is offline   Reply With Quote
Old 16th December 2013, 00:39   #2
JasonFriday13
Senior Member
 
JasonFriday13's Avatar
 
Join Date: May 2005
Location: Taranaki, New Zealand
Posts: 434
Perhaps the installer is having to seek past the big file in the datablock and that's what is taking so long, so I would suggest ordering your 'File' commands a little so that the biggest files are last in the datablock (files are added to the datablock in the same order as in your script, which is why putting those commands at the end of your script works better).

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
Wiki Profile
JasonFriday13 is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump