Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 25th January 2005, 15:50   #1
charlies
Junior Member
 
Join Date: Jan 2005
Posts: 7
setoverwrite by version

In the past, I have used InstallShield and it had a way to specify file overwrite by (VERSION | DATE) where a file would be overwritten if the new file had a greater version than the old file, independent of the date/time stamp. I assumed, wrongly I believe, that the 'SetOverwrite ifnewer' would take file version (if avaible) into account. Is there a simple way to ensure that a file is overwritten if the source file has a newer version than the destination?

- Charlie
charlies is offline   Reply With Quote
Old 25th January 2005, 19:46   #2
Dkom
Junior Member
 
Join Date: Nov 2004
Location: Russia Kursk-city
Posts: 47
> Is there a simple way to ensure that a file is overwritten

You can set "SetOverwrite on" - and it will be always overwritten. If file is blocked (by system, or currently is running) - installer will notify you.
Dkom is offline   Reply With Quote
Old 25th January 2005, 21:51   #3
charlies
Junior Member
 
Join Date: Jan 2005
Posts: 7
I realize that, but I only want to override if the file is newer. I would like the definition of 'newer' to be 1) first version 2) then date if necessary. If this does capability not exist, it seems like a nice feature that shouldn't be too dificult to implement. I am hoping, though, that I missed a simple mode/setting to accomplish my goal
charlies is offline   Reply With Quote
Old 27th January 2005, 13:34   #4
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,337
You can use GetDLLVersion and GetDLLVersionLocal to do the version comparsion. You can use the Library or the older UpgradeDLL macro to do this comparison for you.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 27th January 2005, 15:35   #5
charlies
Junior Member
 
Join Date: Jan 2005
Posts: 7
Yes, I have used those functions/macros primarily for updating system DLLs. I was just hoping that I missed some capability in the File command that would allow more control over overwriting files. It seems that I did not miss anything and will need to use something other than the File command to update my files.
charlies 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