summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-11-30 12:02:19 +0000
committerrubidium <rubidium@openttd.org>2010-11-30 12:02:19 +0000
commit44937dfa5e9b7942ba46c7b2a0f4414b3dc9f0a9 (patch)
tree3a4fb74d1e69436bb1a16a873f1d40d8323759e2
parentc45d88ea6c27ef1d0bcbb6d9f4b0c46568d1c19f (diff)
downloadopenttd-44937dfa5e9b7942ba46c7b2a0f4414b3dc9f0a9.tar.xz
(svn r21356) -Fix (r21351): sometimes versions wouldn't be correctly set for Windows builds
-rwxr-xr-xprojects/determineversion.vbs10
1 files changed, 5 insertions, 5 deletions
diff --git a/projects/determineversion.vbs b/projects/determineversion.vbs
index 1670882fb..3b5b63d66 100755
--- a/projects/determineversion.vbs
+++ b/projects/determineversion.vbs
@@ -86,7 +86,7 @@ Function ReadRegistryKey(shive, subkey, valuename, architecture)
End Function
Function DetermineSVNVersion()
- Dim WshShell, version, branch, modified, revision, url, oExec, line, hash
+ Dim WshShell, version, branch, modified, revision, clean_rev, url, oExec, line, hash
Set WshShell = CreateObject("WScript.Shell")
On Error Resume Next
@@ -261,10 +261,11 @@ Function DetermineSVNVersion()
End If ' version = "norev000"
End If ' version <> "norev000"
- Dim rev_file
- Set rev_file = FSO.OpenTextFile("../.ottdrev", 1, True, 0)
- If Not rev_file.atEndOfStream Then
+ If version = "norev000" And FSO.FileExists("../.ottdrev") Then
+ Dim rev_file
+ Set rev_file = FSO.OpenTextFile("../.ottdrev", 1, True, 0)
DetermineSVNVersion = rev_file.ReadLine()
+ rev_file.Close()
Else
If modified = 2 Then
version = version & "M"
@@ -281,7 +282,6 @@ Function DetermineSVNVersion()
DetermineSVNVersion = version
End If
End If
- rev_file.close
End Function
Function IsCachedVersion(ByVal version)