diff options
author | SupSuper | 2019-10-12 22:55:15 +0100 |
---|---|---|
committer | SupSuper | 2019-10-12 22:57:46 +0100 |
commit | d0a7029131ee1b9ed2ea1d3ca1d0545cff13d2e4 (patch) | |
tree | 3aa2d6044b3b81c087e0ddd06cfa2db671317471 /devtools | |
parent | df5c0c3552b58dc7c8044609323ee2879742affb (diff) | |
download | scummvm-rg350-d0a7029131ee1b9ed2ea1d3ca1d0545cff13d2e4.tar.gz scummvm-rg350-d0a7029131ee1b9ed2ea1d3ca1d0545cff13d2e4.tar.bz2 scummvm-rg350-d0a7029131ee1b9ed2ea1d3ca1d0545cff13d2e4.zip |
MSVC: Fix missing internal_revision.h on clean builds
Can't compare with a file that doesn't exist
Diffstat (limited to 'devtools')
-rw-r--r-- | devtools/create_project/scripts/revision.vbs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/devtools/create_project/scripts/revision.vbs b/devtools/create_project/scripts/revision.vbs index 47eff423b2..7f0655dae1 100644 --- a/devtools/create_project/scripts/revision.vbs +++ b/devtools/create_project/scripts/revision.vbs @@ -489,12 +489,16 @@ Sub CompareFileAndReplace(src_filename, dst_filename) Set file = FSO.OpenTextFile(src_filename, 1, 0, 0) src_data = file.ReadAll file.Close - Set file = FSO.OpenTextFile(dst_filename, 1, 0, 0) - dst_data = file.ReadAll - file.Close - If StrComp(src_data, dst_data, vbBinaryCompare) <> 0 Then - ' Files are different, overwrite the destination + If Not FSO.FileExists(dst_filename) Then FSO.CopyFile src_filename, dst_filename, True + Else + Set file = FSO.OpenTextFile(dst_filename, 1, 0, 0) + dst_data = file.ReadAll + file.Close + If StrComp(src_data, dst_data, vbBinaryCompare) <> 0 Then + ' Files are different, overwrite the destination + FSO.CopyFile src_filename, dst_filename, True + End If End If ' Remove temporary source FSO.DeleteFile src_filename |