File: checkVersion.vbs

package info (click to toggle)
openni-sensor-pointclouds 5.1.0.41.9-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 4,648 kB
  • sloc: cpp: 34,881; ansic: 14,901; sh: 245; python: 155; makefile: 93; xml: 8
file content (24 lines) | stat: -rw-r--r-- 748 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Function CheckVersionNI()
	set WSHShell = CreateObject("WScript.Shell")
	arrMinVersion = Split("1.2.0.4", ".") 	  
	currOpenNiVer = Session.Property("OPENNIVERSION")
	
	if currOpenNiVer = "" Then
	    	WSHShell.PopUp("Please install OpenNI version 1.2.0.4 or higher!")
			CheckVersionNI = 3
			Exit Function
	End If
	arrCurrOpenNiVer = Split(currOpenNiVer, ".")

	For index = 0 to 4 
		if CInt(arrMinVersion(index)) > CInt(arrCurrOpenNiVer(index)) Then
			WSHShell.PopUp("Please install OpenNI version 1.2.0.4 and higher!")
			CheckVersionNI = 3
			Exit Function
		ElseIf CInt(arrMinVersion(index)) < CInt(arrCurrOpenNiVer(index)) Then
					CheckVersionNI = 0
					Exit Function
		End If
	Next
	CheckVerionNI = 0
End Function