aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLittleboy2011-05-13 01:26:52 -0400
committerLittleboy2011-05-13 15:49:57 -0400
commita08158a004425afb89ca984379c6d27fa71e763b (patch)
tree6a49da23a7b8762234647a6d2c9d1232fbba26d3
parentaa64280b55609d11ab869d0b7cea9775a8e0d291 (diff)
downloadscummvm-rg350-a08158a004425afb89ca984379c6d27fa71e763b.tar.gz
scummvm-rg350-a08158a004425afb89ca984379c6d27fa71e763b.tar.bz2
scummvm-rg350-a08158a004425afb89ca984379c6d27fa71e763b.zip
CREATE_PROJECT: Generate a default revision header when no revision can be determined
-rw-r--r--devtools/create_project/scripts/revision.vbs10
1 files changed, 8 insertions, 2 deletions
diff --git a/devtools/create_project/scripts/revision.vbs b/devtools/create_project/scripts/revision.vbs
index 3e1212521c..e6fef57030 100644
--- a/devtools/create_project/scripts/revision.vbs
+++ b/devtools/create_project/scripts/revision.vbs
@@ -80,6 +80,7 @@ Sub DetermineRevision()
If Not DetermineGitVersion() Then
If Not DetermineHgVersion() Then
Wscript.StdErr.WriteLine "Could not determine the current revision, skipping..."
+ OutputRevisionHeader ""
Exit Sub
End If
End If
@@ -91,6 +92,7 @@ Sub DetermineRevision()
If Not DetermineTortoiseSVNVersion() Then
If Not DetermineSVNVersion() Then
Wscript.StdErr.WriteLine "Could not determine the current revision, skipping..."
+ OutputRevisionHeader ""
Exit Sub
End If
End If
@@ -121,9 +123,13 @@ Sub DetermineRevision()
Wscript.StdErr.WriteLine outputInfo & vbCrLf
- ' Output revision header file
+ OutputRevisionHeader revisionString
+End Sub
+
+' Output revision header file
+Sub OutputRevisionHeader(str)
FSO.CopyFile rootFolder & "\\base\\internal_revision.h.in", targetFolder & "\\internal_revision.h"
- FindReplaceInFile targetFolder & "\\internal_revision.h", "@REVISION@", revisionString
+ FindReplaceInFile targetFolder & "\\internal_revision.h", "@REVISION@", str
End Sub
Function DetermineTortoiseSVNVersion()