Old 16th April 2010, 14:00   #1
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
Quote:
Originally Posted by Animaether View Post
It's not impossible, but 'extremely simple' is not how I would choose to describe it in general
I was referring to the fact that it mostly requires just a bunch of ${If} statements, which are trivial to code if you're clearheaded enough. But sure, I stand corrected, it takes some effort to get it exactly right. :-)

(You could of course make two macros, one single and one recursive/wildcard...)
MSG is offline   Reply With Quote
Old 16th April 2010, 15:04   #2
Animaether
Major Dude
 
Join Date: Jun 2001
Posts: 1,173
Quote:
Originally Posted by MSG View Post
(You could of course make two macros, one single and one recursive/wildcard...)
Well that's something I addressed toward the end... now you want to support /x as well.
So now you need macros:
File
FileR
FileX
FileRX

Now add /a and /nonfatal Granted, those are a little more obscure, but you can see how things quickly tend to explode into a number of macros. Hence why instead one might have something like a context switch...
${NonFatal} true
${FileSomething} a x ...
${FileSomething} b x ...
${FileSomething} c x ...
${NonFatal} False

But you phrased it well when you said
Quote:
it takes some effort to get it exactly right. :-)
Animaether is offline   Reply With Quote
Old 27th April 2010, 14:40   #3
mgillespie
Member
 
mgillespie's Avatar
 
Join Date: Jul 2003
Posts: 83
And this was precisely the reason we decided on a change deep down at file writing level, as it works regardless of how the file is added to the installer :-)
mgillespie is offline   Reply With Quote
Old 27th April 2010, 15:46   #4
Animaether
Major Dude
 
Join Date: Jun 2001
Posts: 1,173
Quote:
Originally Posted by mgillespie View Post
And this was precisely the reason we decided on a change deep down at file writing level, as it works regardless of how the file is added to the installer :-)
Only to an extent, though, if I read your original post right:
Quote:
Originally Posted by mgillespie
We check to see if it already exists, if it does, we append the existing filename with the .previous extension and then write the new file.
So what if filename.previous already exists?

Quote:
Originally Posted by mgillespie
On uninstall, it's simply a process of recursively scanning the installation folder, if we find a .previous, delete the original file and restore the .previous version.
And what if 'the original' is not actually -your- original?

Doing it 'right' will never be easy - if even possible at all - but there's certainly room for improvement.
Animaether is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast 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