summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xprojects/determineversion.vbs7
-rw-r--r--projects/version_vs80.vcproj4
-rw-r--r--projects/version_vs90.vcproj4
3 files changed, 14 insertions, 1 deletions
diff --git a/projects/determineversion.vbs b/projects/determineversion.vbs
index 88bc647ca..c2a87d3db 100755
--- a/projects/determineversion.vbs
+++ b/projects/determineversion.vbs
@@ -272,8 +272,13 @@ Function IsCachedVersion(ByVal version)
End If
End Function
+Function CheckFile(filename)
+ CheckFile = FSO.FileExists(filename) And (FSO.GetFile(filename).DateLastModified >= FSO.GetFile(filename & ".in").DateLastModified)
+End Function
+
Dim version
version = DetermineSVNVersion
-If Not (IsCachedVersion(version) And FSO.FileExists("../src/rev.cpp") And FSO.FileExists("../src/ottdres.rc")) Then
+If Not (IsCachedVersion(version) And CheckFile("../src/rev.cpp") And CheckFile("../src/ottdres.rc")) Then
+ wscript.echo "update"
UpdateFiles version
End If
diff --git a/projects/version_vs80.vcproj b/projects/version_vs80.vcproj
index 8d689425e..4990fdeb9 100644
--- a/projects/version_vs80.vcproj
+++ b/projects/version_vs80.vcproj
@@ -35,6 +35,10 @@
</References>
<Files>
<File
+ RelativePath="..\src\ottdres.rc.in"
+ >
+ </File>
+ <File
RelativePath="..\src\rev.cpp.in"
>
</File>
diff --git a/projects/version_vs90.vcproj b/projects/version_vs90.vcproj
index 061bf9285..3ae13c83c 100644
--- a/projects/version_vs90.vcproj
+++ b/projects/version_vs90.vcproj
@@ -36,6 +36,10 @@
</References>
<Files>
<File
+ RelativePath="..\src\ottdres.rc.in"
+ >
+ </File>
+ <File
RelativePath="..\src\rev.cpp.in"
>
</File>