Old 5th July 2008, 17:55   #1
/usr/bin/Tux
Senior Member
 
Join Date: Feb 2008
Posts: 120
Version check before installation

Hi, folks... I hope, you can help...

I'm a developer of an NSIS-powered software, and I want to perform a check if the current installer is the newest version...

An example:
My user wants to install v3.00, but there's a newer v3.10 available online.

There is a .html file on the internet with these contents:

code:
start 0
version 3.10
build 080504
info_ger 0
info_ger_link 0
info_eng 0
info_eng_link 0
...
end 0



My installer already knows its version:
code:
!define reg_ver "3.00"


Now:
How can I make NSIS check the "version" entry online and compare it with its own reg_ver variable?

Thanks in advance...



Winamp user since v1.something.
/usr/bin/Tux is offline   Reply With Quote
Old 6th July 2008, 09:24   #2
pospec
Senior Member
 
pospec's Avatar
 
Join Date: Jun 2007
Location: Otrokovice, Czech Republic
Posts: 308
Use http://nsis.sourceforge.net/Inetc_plug-in and download the file.

Read version string using FileOpen/FileRead instructions.

Compare versions using http://nsis.sourceforge.net/VersionCompare
pospec is offline   Reply With Quote
Old 6th July 2008, 10:48   #3
/usr/bin/Tux
Senior Member
 
Join Date: Feb 2008
Posts: 120
OK thanks... I hope I'll manage it...



Winamp user since v1.something.
/usr/bin/Tux is offline   Reply With Quote
Old 6th July 2008, 12:31   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
You can use ConfigRead to get the value by using an entry value of "version " (notice the space).

Stu
Afrow UK 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