Something went wrong. Try again.
Native control, inspection, UI automation and evidence capture for a running Witcher 3 process.
Something went wrong. Try again.
123456789101112131415161718192021"""Build the Linux x86_64 presentation-call observer; Vulkan-Headers v1.3.290."""import hashlib,json,subprocess,sysfrom pathlib import PathROOT=Path(__file__).resolve().parentimport syssys.path.insert(0,str(ROOT.parent))from witcher_devkit.game_paths import tool_pathHEADERS=tool_path('repos/Vulkan-Headers-1.3.290/include')def build(): sys.path.insert(0,str(ROOT.parent)) from witcher_devkit import support support.manage.ensure_game_closed() if not (HEADERS/'vulkan/vk_layer.h').exists():raise RuntimeError('Missing Vulkan-Headers v1.3.290; see guide performance') out=ROOT/'build';out.mkdir(exist_ok=True) subprocess.run(['g++','-std=c++17','-shared','-fPIC','-O2','-Wall','-Wextra','-Werror','-Wl,-Bsymbolic','-pthread','-I'+str(HEADERS),str(ROOT/'layer.cpp'),'-o',str(out/'libPathPresent.so')],check=True) manifest={'file_format_version':'1.2.0','layer':{'name':'VK_LAYER_PATHDEVKIT_present','type':'GLOBAL','library_path':str(out/'libPathPresent.so'),'api_version':'1.3.0','implementation_version':'1','description':'Bounded host vkQueuePresentKHR timing'}} (out/'layer.json').write_text(json.dumps(manifest,indent=2)) receipt={'source_sha256':hashlib.sha256((ROOT/'layer.cpp').read_bytes()).hexdigest(),'library_sha256':hashlib.sha256((out/'libPathPresent.so').read_bytes()).hexdigest(),'compiler':subprocess.check_output(['g++','--version'],text=True).splitlines()[0],'headers':'v1.3.290','header_sha256':{str(p.relative_to(HEADERS)):hashlib.sha256(p.read_bytes()).hexdigest() for p in sorted(HEADERS.rglob('*.h'))}} (out/'receipt.json').write_text(json.dumps(receipt,indent=2)+'\n');print(json.dumps({'ok':True,'library':str(out/'libPathPresent.so')}))if __name__=='__main__':build()