mirror of
https://github.com/derrod/legendary.git
synced 2024-06-02 10:44:54 +12:00
Merge branch 'derrod:master' into master
This commit is contained in:
commit
b52a3e4c0c
|
@ -647,7 +647,7 @@ class LegendaryCLI:
|
|||
full_env = os.environ.copy()
|
||||
full_env.update(params.environment)
|
||||
|
||||
if 'CX_BOTTLE' in full_env:
|
||||
if 'CX_BOTTLE' in full_env and any('SharedSupport/CrossOver' in p for p in params.launch_command):
|
||||
# if using crossover, unset WINEPREFIX
|
||||
full_env.pop('WINEPREFIX', None)
|
||||
# check that bottle is valid, show error otherwise
|
||||
|
@ -659,6 +659,8 @@ class LegendaryCLI:
|
|||
else:
|
||||
logger.error(f'Specified CrossOver bottle {bottle_name} does not exist, cannot launch.')
|
||||
exit(1)
|
||||
else:
|
||||
logger.info(f'Using CrossOver Bottle "{bottle_name}"')
|
||||
|
||||
if args.dry_run:
|
||||
logger.info(f'Not Launching {app_name} (dry run)')
|
||||
|
@ -744,7 +746,7 @@ class LegendaryCLI:
|
|||
full_env = os.environ.copy()
|
||||
full_env.update(env)
|
||||
|
||||
if 'CX_BOTTLE' in full_env:
|
||||
if 'CX_BOTTLE' in full_env and any('SharedSupport/CrossOver' in p for p in command):
|
||||
# if using crossover, unset WINEPREFIX
|
||||
full_env.pop('WINEPREFIX', None)
|
||||
# check that bottle is valid, show error otherwise
|
||||
|
@ -756,6 +758,8 @@ class LegendaryCLI:
|
|||
else:
|
||||
logger.error(f'Specified CrossOver bottle {bottle_name} does not exist, cannot launch.')
|
||||
exit(1)
|
||||
else:
|
||||
logger.info(f'Using CrossOver Bottle "{bottle_name}"')
|
||||
|
||||
if not command:
|
||||
logger.error(f'In order to launch Origin correctly you must specify a prefix and wine binary or '
|
||||
|
|
|
@ -597,7 +597,9 @@ class LegendaryCore:
|
|||
env['CX_BOTTLE'] = cx_bottle
|
||||
else:
|
||||
cx_bottle = os.environ['CX_BOTTLE']
|
||||
self.log.info(f'Using CrossOver Bottle "{cx_bottle}"')
|
||||
|
||||
if cx_bottle:
|
||||
self.log.debug(f'Using CrossOver Bottle "{cx_bottle}"')
|
||||
|
||||
if wine_pfx:
|
||||
env['WINEPREFIX'] = wine_pfx
|
||||
|
@ -1333,11 +1335,13 @@ class LegendaryCore:
|
|||
if platform == 'Mac':
|
||||
# if we're on mac and the path to the binary does not start with <something>.app,
|
||||
# treat it as if it were a Windows game instead and install it to the default folder.
|
||||
if '.app' not in new_manifest.meta.launch_exe.partition('/')[0].lower():
|
||||
base_path = self.get_default_install_dir(platform='Windows')
|
||||
else:
|
||||
|
||||
if all('.app' in fm.filename.partition('/')[0].lower()
|
||||
for fm in new_manifest.file_manifest_list.elements):
|
||||
# If it is a .app omit the game folder
|
||||
game_folder = ''
|
||||
else:
|
||||
base_path = self.get_default_install_dir(platform='Windows')
|
||||
|
||||
# make sure base directory actually exists (but do not create game dir)
|
||||
if not os.path.exists(base_path):
|
||||
|
|
|
@ -127,7 +127,7 @@ def do_webview_login(callback_sid=None, callback_code=None):
|
|||
window = webview.create_window(f'Legendary {__version__} - Epic Games Account Login',
|
||||
url=login_url, width=768, height=1024, js_api=api)
|
||||
api.window = window
|
||||
window.loaded += api.on_loaded
|
||||
window.events.loaded += api.on_loaded
|
||||
|
||||
try:
|
||||
webview.start()
|
||||
|
|
Loading…
Reference in a new issue