mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-17 21:41:15 +00:00
make wine path function
This commit is contained in:
parent
562fee69b8
commit
ba97fdab3a
@ -88,6 +88,9 @@ class RecompiledInfo:
|
|||||||
def get_recompiled_address(filename, line):
|
def get_recompiled_address(filename, line):
|
||||||
global line_dump, sym_dump
|
global line_dump, sym_dump
|
||||||
|
|
||||||
|
def get_wine_path(fn):
|
||||||
|
return subprocess.check_output(['winepath', '-w', fn]).decode('utf-8').strip()
|
||||||
|
|
||||||
# Load source lines from PDB
|
# Load source lines from PDB
|
||||||
if not line_dump:
|
if not line_dump:
|
||||||
call = ['cvdump', '-l', '-s']
|
call = ['cvdump', '-l', '-s']
|
||||||
@ -95,7 +98,7 @@ def get_recompiled_address(filename, line):
|
|||||||
if os.name != 'nt':
|
if os.name != 'nt':
|
||||||
# Run cvdump through wine and convert path to Windows-friendly wine path
|
# Run cvdump through wine and convert path to Windows-friendly wine path
|
||||||
call.insert(0, 'wine')
|
call.insert(0, 'wine')
|
||||||
call.append(subprocess.check_output(['winepath', '-w', syms]).strip())
|
call.append(get_wine_path(syms))
|
||||||
else:
|
else:
|
||||||
call.append(syms)
|
call.append(syms)
|
||||||
|
|
||||||
@ -104,7 +107,7 @@ def get_recompiled_address(filename, line):
|
|||||||
# Find requested filename/line in PDB
|
# Find requested filename/line in PDB
|
||||||
if os.name != 'nt':
|
if os.name != 'nt':
|
||||||
# Convert filename to Wine path
|
# Convert filename to Wine path
|
||||||
filename = subprocess.check_output(['winepath', '-w', filename]).decode('utf-8').strip()
|
filename = get_wine_path(filename)
|
||||||
|
|
||||||
#print('Looking for ' + filename + ' line ' + str(line))
|
#print('Looking for ' + filename + ' line ' + str(line))
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user