Update cef_api_hash.h at build time if necessary (fixes issue #2922)

The cef_api_hash.h file was previously only updated when the translator tool
was run manually. Forgetting to run the translator tool after changing
include/internal/cef_types*.h files would result in cef_parser.py
incorrectly computing the CEF minor version number for future builds. By
updating this file automatically at build time the number of errors should be
reduced.
This commit is contained in:
Marshall Greenblatt
2020-04-30 15:59:23 -04:00
parent 7c6e53ddfb
commit d65483ae16
15 changed files with 232 additions and 199 deletions

View File

@ -119,16 +119,7 @@ def MakeFile(output, input):
guard = 'CEF_INCLUDE_' + filename.replace('.', '_').upper() + '_'
result = result.replace('$GUARD$', guard)
if path_exists(output):
old_contents = read_file(output)
else:
old_contents = ''
if (result != old_contents):
write_file(output, result)
sys.stdout.write('File ' + output + ' updated.\n')
else:
sys.stdout.write('File ' + output + ' is already up to date.\n')
write_file_if_changed(output, result)
def main(argv):