summaryrefslogtreecommitdiff
path: root/projects
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-11-29 12:49:27 +0000
committerrubidium <rubidium@openttd.org>2010-11-29 12:49:27 +0000
commit4aa6a24d95219ceffd9efdc74e360633c65a9577 (patch)
treecb2a8555aff59114d073b7609acf75f25bc98703 /projects
parentc60a850fed077a5179d2e7095a509545d8782e53 (diff)
downloadopenttd-4aa6a24d95219ceffd9efdc74e360633c65a9577.tar.xz
(svn r21351) -Change: read some metadata from (official) source tarballs so you'll more likely get the right version/revision out-of-the-box
Diffstat (limited to 'projects')
-rwxr-xr-xprojects/determineversion.vbs31
1 files changed, 20 insertions, 11 deletions
diff --git a/projects/determineversion.vbs b/projects/determineversion.vbs
index 98e4e8322..1670882fb 100755
--- a/projects/determineversion.vbs
+++ b/projects/determineversion.vbs
@@ -35,8 +35,9 @@ Sub UpdateFiles(version)
If InStr(version, Chr(9)) Then
revision = Mid(version, InStr(version, Chr(9)) + 1)
+ modified = Mid(revision, InStr(revision, Chr(9)) + 1)
revision = Mid(revision, 1, InStr(revision, Chr(9)) - 1)
- modified = Mid(version, InStrRev(version, Chr(9)) + 1)
+ modified = Mid(modified, 1, InStr(modified, Chr(9)) - 1)
version = Mid(version, 1, InStr(version, Chr(9)) - 1)
Else
revision = 0
@@ -260,19 +261,27 @@ Function DetermineSVNVersion()
End If ' version = "norev000"
End If ' version <> "norev000"
- If modified = 2 Then
- version = version & "M"
- End If
+ Dim rev_file
+ Set rev_file = FSO.OpenTextFile("../.ottdrev", 1, True, 0)
+ If Not rev_file.atEndOfStream Then
+ DetermineSVNVersion = rev_file.ReadLine()
+ Else
+ If modified = 2 Then
+ version = version & "M"
+ End If
- If branch <> "" Then
- version = version & "-" & branch
- End If
+ clean_rev = version
+ If branch <> "" Then
+ version = version & "-" & branch
+ End If
- If version <> "norev000" Then
- DetermineSVNVersion = version & Chr(9) & revision & Chr(9) & modified
- Else
- DetermineSVNVersion = version
+ If version <> "norev000" Then
+ DetermineSVNVersion = version & Chr(9) & revision & Chr(9) & modified & Chr(9) & clean_rev
+ Else
+ DetermineSVNVersion = version
+ End If
End If
+ rev_file.close
End Function
Function IsCachedVersion(ByVal version)