mirror of
https://github.com/reactos/reactos.git
synced 2024-11-24 03:53:31 +08:00
[APISETS] Teach update.py how to generate a manifest
This commit is contained in:
parent
6121df7321
commit
a95afd562e
@ -458,23 +458,35 @@ def run(wineroot):
|
||||
print 'found', total[0], '/', total[1], 'forwarders'
|
||||
|
||||
with open(os.path.join(SCRIPT_DIR, 'CMakeLists.txt.in'), 'rb') as template:
|
||||
data = template.read()
|
||||
data = data.replace('%WINE_GIT_VERSION%', version)
|
||||
cmake_template = template.read()
|
||||
cmake_template = cmake_template.replace('%WINE_GIT_VERSION%', version)
|
||||
# Detect the checkout newline settings
|
||||
if '\r\n' in data:
|
||||
if '\r\n' in cmake_template:
|
||||
NL_CHAR = '\r\n'
|
||||
|
||||
manifest_files = []
|
||||
print 'Writing apisets'
|
||||
spec_header = [line.replace('\n', NL_CHAR) for line in SPEC_HEADER]
|
||||
for apiset in wine_apisets:
|
||||
with open(os.path.join(SCRIPT_DIR, apiset.name + '.spec'), 'wb') as out_spec:
|
||||
out_spec.writelines(spec_header)
|
||||
apiset.write(out_spec)
|
||||
manifest_files.append(' <file name="{}.dll"/>'.format(apiset.name))
|
||||
|
||||
print 'Generating manifest'
|
||||
manifest_name = 'x86_reactos.apisets_6595b64144ccf1df_1.0.0.0_none_deadbeef.manifest'
|
||||
with open(os.path.join(SCRIPT_DIR, manifest_name + '.in'), 'rb') as template:
|
||||
manifest_template = template.read()
|
||||
manifest_template = manifest_template.replace('%WINE_GIT_VERSION%', version)
|
||||
file_list = '\r\n'.join(manifest_files)
|
||||
manifest_template = manifest_template.replace('%MANIFEST_FILE_LIST%', file_list)
|
||||
with open(os.path.join(SCRIPT_DIR, manifest_name), 'wb') as manifest:
|
||||
manifest.write(manifest_template)
|
||||
|
||||
print 'Writing CMakeLists.txt'
|
||||
baseaddress = 0x60000000
|
||||
with open(os.path.join(SCRIPT_DIR, 'CMakeLists.txt'), 'wb') as cmakelists:
|
||||
cmakelists.write(data)
|
||||
cmakelists.write(cmake_template)
|
||||
for apiset in wine_apisets:
|
||||
baseaddress += apiset.write_cmake(cmakelists, baseaddress)
|
||||
baseaddress += (0x10000 - baseaddress) % 0x10000
|
||||
|
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<!-- Generated from %WINE_GIT_VERSION% -->
|
||||
<assemblyIdentity type="win32" name="ReactOS.Apisets" version="1.0.0.0" publicKeyToken="6595b64144ccf1df"/>
|
||||
%MANIFEST_FILE_LIST%
|
||||
</assembly>
|
Loading…
Reference in New Issue
Block a user