them big_tasks.md (roadmap G0-G4, danh dau G1.1-G1.5 hoan thanh) + debug scripts/probes cua phien lam viec G0.1-G1.5 (test_g13/test_g12/test_g15_stress, patch_g1x, deploy/build bridge, probe_g0x)
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import io
|
||||
p = r'C:\Users\locpham\SonicForgeStudio\native_bridge\src\gui_probe.cpp'
|
||||
s = io.open(p, encoding='utf-8', newline='').read()
|
||||
def crlf(x): return x.replace('\n', '\r\n')
|
||||
|
||||
old = crlf('''#ifdef _WIN32
|
||||
OleInitialize(nullptr);
|
||||
#endif''')
|
||||
new = crlf('''#ifdef _WIN32
|
||||
CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);
|
||||
#endif''')
|
||||
n = s.count(old)
|
||||
print('OleInitialize count:', n)
|
||||
s = s.replace(old, new)
|
||||
|
||||
old2 = crlf('''#ifdef _WIN32
|
||||
OleUninitialize();
|
||||
#endif''')
|
||||
new2 = crlf('''#ifdef _WIN32
|
||||
CoUninitialize();
|
||||
#endif''')
|
||||
n2 = s.count(old2)
|
||||
print('OleUninitialize count:', n2)
|
||||
s = s.replace(old2, new2)
|
||||
|
||||
io.open(p, 'w', encoding='utf-8', newline='').write(s)
|
||||
print('written')
|
||||
Reference in New Issue
Block a user