zink: Always include renderdoc_app.h
Removes the dependency on a system wide installation ot the renderdoc header. Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28892>
This commit is contained in:

committed by
Marge Bot

parent
e8fb4b82e9
commit
3233d19f87
31
bin/renderdoc-update.py
Executable file
31
bin/renderdoc-update.py
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import base64
|
||||
import pathlib
|
||||
import requests
|
||||
import subprocess
|
||||
|
||||
def error(msg: str) -> None:
|
||||
print('\033[31m' + msg + '\033[0m')
|
||||
|
||||
if __name__ == '__main__':
|
||||
git_toplevel = subprocess.check_output(['git', 'rev-parse', '--show-toplevel'],
|
||||
stderr=subprocess.DEVNULL).decode("ascii").strip()
|
||||
if not pathlib.Path(git_toplevel).resolve() == pathlib.Path('.').resolve():
|
||||
error('Please run this script from the root folder ({})'.format(git_toplevel))
|
||||
exit(1)
|
||||
|
||||
file = 'include/renderdoc_app.h'
|
||||
url = 'https://raw.githubusercontent.com/baldurk/renderdoc/v1.1/renderdoc/api/app/renderdoc_app.h'
|
||||
|
||||
print('Syncing {}...'.format(file), end=' ', flush=True)
|
||||
req = requests.get(url)
|
||||
|
||||
if not req.ok:
|
||||
error('Failed to retrieve file: {} {}'.format(req.status_code, req.reason))
|
||||
exit(1)
|
||||
|
||||
with open(file, 'wb') as f:
|
||||
f.write(req.content)
|
||||
|
||||
print('Done')
|
Reference in New Issue
Block a user