https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a95afd562ed5c671eedf3…
commit a95afd562ed5c671eedf3b0d1e1cea38647264f8
Author: Mark Jansen <mark.jansen(a)reactos.org>
AuthorDate: Tue Nov 20 22:34:05 2018 +0100
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sun Nov 25 19:06:29 2018 +0100
[APISETS] Teach update.py how to generate a manifest
---
dll/apisets/update.py | 20 ++++++++++++++++----
...595b64144ccf1df_1.0.0.0_none_deadbeef.manifest.in | 6 ++++++
2 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/dll/apisets/update.py b/dll/apisets/update.py
index adad66c77d..73fee10977 100644
--- a/dll/apisets/update.py
+++ b/dll/apisets/update.py
@@ -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
diff --git
a/dll/apisets/x86_reactos.apisets_6595b64144ccf1df_1.0.0.0_none_deadbeef.manifest.in
b/dll/apisets/x86_reactos.apisets_6595b64144ccf1df_1.0.0.0_none_deadbeef.manifest.in
new file mode 100644
index 0000000000..8044a2ed96
--- /dev/null
+++ b/dll/apisets/x86_reactos.apisets_6595b64144ccf1df_1.0.0.0_none_deadbeef.manifest.in
@@ -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>