mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-01-27 01:13:13 +08:00
Fixing windows prefab debug build
This commit is contained in:
parent
94dce555c8
commit
3c8cea09cb
@ -263,7 +263,7 @@ def _sync_windows_extras(cfg: Config) -> None:
|
||||
'SDL2.dll'
|
||||
]
|
||||
elif cfg.win_type == 'winserver':
|
||||
toplevelfiles += ['python.exe']
|
||||
toplevelfiles += [f'python{dbgsfx}.exe']
|
||||
|
||||
# Include debug dlls so folks without msvc can run them.
|
||||
if cfg.debug:
|
||||
|
||||
@ -57,14 +57,19 @@ def stage_server_file() -> None:
|
||||
# Run Python in opt mode for release builds.
|
||||
with open(infilename) as infile:
|
||||
lines = infile.read().splitlines()
|
||||
if mode == 'release':
|
||||
lines[1] = replace_one(
|
||||
lines[1], ':: Python interpreter.',
|
||||
':: Python interpreter.'
|
||||
' (in opt mode so we use bundled .opt-1.pyc files)')
|
||||
lines[2] = replace_one(
|
||||
lines[2], 'dist\\\\python.exe ballisticacore_server.py',
|
||||
'dist\\\\python.exe -O ballisticacore_server.py')
|
||||
if mode == 'release':
|
||||
lines[1] = replace_one(
|
||||
lines[1], ':: Python interpreter.', ':: Python interpreter.'
|
||||
' (in opt mode so we use bundled .opt-1.pyc files)')
|
||||
lines[2] = replace_one(
|
||||
lines[2], 'dist\\\\python.exe ballisticacore_server.py',
|
||||
'dist\\\\python.exe -O ballisticacore_server.py')
|
||||
else:
|
||||
# In debug mode we use the bundled debug interpreter.
|
||||
lines[2] = replace_one(
|
||||
lines[2], 'dist\\\\python.exe ballisticacore_server.py',
|
||||
'dist\\\\python_d.exe ballisticacore_server.py')
|
||||
|
||||
with open(outfilename, 'w') as outfile:
|
||||
outfile.write('\n'.join(lines) + '\n')
|
||||
else:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user