| Index: runtime/tools/gen_library_src_paths.py
|
| diff --git a/runtime/tools/gen_library_src_paths.py b/runtime/tools/gen_library_src_paths.py
|
| index 27512150115c32de51e946546b2de1e0dd0d44cb..749c9d1d9b97eb1da2e862c8bf9b4d5c0e76ede4 100644
|
| --- a/runtime/tools/gen_library_src_paths.py
|
| +++ b/runtime/tools/gen_library_src_paths.py
|
| @@ -13,6 +13,20 @@ from os.path import join
|
| from optparse import OptionParser
|
|
|
|
|
| +def makeString(input_file):
|
| + result = '"'
|
| + fileHandle = open(input_file, 'rb')
|
| + lineCounter = 0
|
| + for byte in fileHandle.read():
|
| + result += '\\x%02x' % ord(byte)
|
| + lineCounter += 1
|
| + if lineCounter == 19:
|
| + result += '"\n "'
|
| + lineCounter = 0
|
| + result += '"'
|
| + return result
|
| +
|
| +
|
| def makeFile(output_file, input_cc_file, include, var_name, lib_name, in_files):
|
| part_index = [ ]
|
| bootstrap_cc_text = open(input_cc_file).read()
|
| @@ -29,15 +43,17 @@ def makeFile(output_file, input_cc_file, include, var_name, lib_name, in_files):
|
| main_file_found = True
|
| bootstrap_cc_text = bootstrap_cc_text.replace(
|
| "{{LIBRARY_SOURCE_MAP}}",
|
| - ' "' + lib_name + '", "' +
|
| - os.path.abspath(string_file).replace('\\', '\\\\') + '", \n')
|
| + ' "' + lib_name + '",\n "' +
|
| + os.path.abspath(string_file).replace('\\', '\\\\') + '",\n' +
|
| + ' ' + makeString(string_file) + ',\n')
|
| inpt.close()
|
| if (main_file_found):
|
| continue
|
| part_index.append(' "' +
|
| - os.path.basename(string_file).replace('\\', '\\\\') + '", ')
|
| - part_index.append('"' +
|
| - os.path.abspath(string_file).replace('\\', '\\\\') + '", \n')
|
| + os.path.basename(string_file).replace('\\', '\\\\') + '",\n')
|
| + part_index.append(' "' +
|
| + os.path.abspath(string_file).replace('\\', '\\\\') + '",\n')
|
| + part_index.append(' ' + makeString(string_file) + ',\n\n')
|
| bootstrap_cc_text = bootstrap_cc_text.replace("{{LIBRARY_SOURCE_MAP}}", '')
|
| bootstrap_cc_text = bootstrap_cc_text.replace("{{PART_SOURCE_MAP}}",
|
| ''.join(part_index))
|
|
|