LunaHook-mirror/scripts/edit_target.py
恍兮惚兮 533e0c8809 xp target
1
2024-02-11 20:57:07 +08:00

13 lines
616 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import os
#妈的不知道为什么我重装系统后装了vs2017 cmake也识别不到只能手动改了。
for f in ['../build/x86_zh_xp','../build/x86_xp']:
for dirname,_,fs in os.walk(f):
for ff in fs:
if ff.endswith('.vcxproj')==False:continue
if ff.endswith('QtLoader.vcxproj'):continue
path=os.path.join(dirname,ff)
with open(path,'r',encoding='utf-8-sig') as pf:
file=pf.read()
file=file.replace('>v143<','>v141_xp<')
with open(path,'w',encoding='utf-8-sig') as pf:
pf.write(file)