jammusi
22nd December 2009 18:21 UTC
compare file version
I want to compare two files versions numbers - in order to know whether to replace a certain dll or leave the current one.
Using the macro GetFileVersion i receive the two versions' numbers from both files.
Now i need to actuallt compare the two numbers.
I am looking for another macro or something else that will be able to compare it correctly. I can not find. I always can parse the two numbers and compare it myself - but ...
does anyone know how to do that?
Tx
Jammusi
MSG
22nd December 2009 18:57 UTC
Use VersionCompare in NSIS\include\WordFunc.nsh.
jammusi
22nd December 2009 19:48 UTC
it doesn't really works OK
for instance:
Comparing 0.9.81.70 with 0.9.8.7
returns 0 - meaning equal.
Am i right?
MSG
22nd December 2009 20:18 UTC
If it's the same code as that of two years ago (which at first glance appears to be just the case), then yeah it doesn't do >9 sub-version numbers. Feel free to edit the macro and share. :-)
jammusi
22nd December 2009 20:40 UTC
Well - I'm new to NSIS so i wouldn't know what was two years ago ;-)
for the same reason I still don't know how to right a macro and how to publish it later.
I will try to do that
tx
jpderuiter
22nd December 2009 20:41 UTC
What version of NSIS are you using?
I just tested your version numbers and several others, and the result is as expected.
My version of the Word Functions Header is v3.3.
jammusi
22nd December 2009 20:56 UTC
that's weird. I'm using the same Word function header
My NSIS version is 2.4
How could that happen?
jammusi
29th December 2009 12:18 UTC
my mistake. it works.
tx