mirror of
https://github.com/derrod/legendary.git
synced 2024-12-22 01:45:28 +00:00
[core] Only use override exe on Windows; ensure file exists
This commit is contained in:
parent
f902963b1a
commit
fc73c1d4bf
|
@ -1435,9 +1435,12 @@ class LegendaryCore:
|
||||||
|
|
||||||
# Override exe at an install level to avoid breaking existing config overrides
|
# Override exe at an install level to avoid breaking existing config overrides
|
||||||
executable = new_manifest.meta.launch_exe
|
executable = new_manifest.meta.launch_exe
|
||||||
if exe_override := get_exe_override(app_name=game.app_name):
|
if platform != 'Mac' and (exe_override := get_exe_override(app_name=game.app_name)):
|
||||||
self.log.info(f'Launch exe will be changed from "{executable}" to "{exe_override}" for compatibility')
|
exe_override_l = exe_override.lower()
|
||||||
executable = exe_override
|
# make sure that override exe even exists
|
||||||
|
if any(fm.filename.lower() == exe_override_l for fm in new_manifest.file_manifest_list.elements):
|
||||||
|
self.log.info(f'Launch exe will be changed from "{executable}" to "{exe_override}" for compatibility')
|
||||||
|
executable = exe_override
|
||||||
|
|
||||||
igame = InstalledGame(app_name=game.app_name, title=game.app_title,
|
igame = InstalledGame(app_name=game.app_name, title=game.app_title,
|
||||||
version=new_manifest.meta.build_version, prereq_info=prereq,
|
version=new_manifest.meta.build_version, prereq_info=prereq,
|
||||||
|
|
Loading…
Reference in a new issue