Skip to content
⌘ NSIS Forum Archive

comparing 2 versions

4 posts

rapigator#

comparing 2 versions

Hi! im trying to compare 2 versions of my software with 2 different INI files. one ini file(the one in $INSTDIR) is set up like this :
[Rapigator]
Version=3.3
and the one in the $temp folder like this:
[Rapigator]
Version=3.4
heres the section of the installer :
ReadINIStr $0 $INSTDIR\rapigator.ini Rapigator Version
ReadINIStr $1 $TEMP\rapigator.ini Rapigator Version
MessageBox MB_OK|MB_ICONEXCLAMATION "$0 $1"
IntCmp $0 $1 0 update 0
goto done
update:
MessageBox MB_OK|MB_ICONEXCLAMATION "Updating..."
done:
im trying to make it goto "update" when the $instdir version is less. i put the MessageBox after the ReadINIStr to see if it is reading the files and it is. it just goes to "done". what am i doing wrong?
Guest#
IntCmp cannot compare dotted (3.3 / 3.4) numbers (only integers). It only sees the first 3 of both numbers and these are of course equal, so "0" will be executed. Check this out to do dotted-number-comparisons.

-Hendri.