Archive: Version comparing


Version comparing
I am doing the following to compare versions


Var t1
Var t2

Function compare
strcpy $t1 '1.2.0.0' ;just for the example
strcpy $t2 '1.3.0.0' ;just for the example
${StrReplace} '$t1' '.' '' '$t1'
${StrReplace} '$t2' '.' '' '$t2'
${If} $t1 < $t2
messagebox MB_OK "$t1 is smaller"
${EndIf}


is this the correct way to do it ?

Did you see the included version compare function?

http://nsis.sourceforge.net/Docs/AppendixE.html#E.3.16


Thanks