mirror of
https://github.com/derrod/legendary.git
synced 2024-06-17 10:04:59 +12:00
[cli] Add option to disable CX version check
This commit is contained in:
parent
976b7cebf0
commit
ba1e05af53
|
@ -551,7 +551,7 @@ class LegendaryCLI:
|
||||||
|
|
||||||
# Interactive CrossOver setup
|
# Interactive CrossOver setup
|
||||||
if args.crossover and sys_platform == 'darwin':
|
if args.crossover and sys_platform == 'darwin':
|
||||||
args.reset = args.download = False
|
args.reset = args.download = args.disable_version_check = False
|
||||||
self.crossover_setup(args)
|
self.crossover_setup(args)
|
||||||
|
|
||||||
if args.origin:
|
if args.origin:
|
||||||
|
@ -2219,7 +2219,11 @@ class LegendaryCLI:
|
||||||
|
|
||||||
logger.info('Checking available bottles...')
|
logger.info('Checking available bottles...')
|
||||||
available_bottles = self.core.get_available_bottles()
|
available_bottles = self.core.get_available_bottles()
|
||||||
usable_bottles = [b for b in available_bottles if cx_version in b['cx_versions']]
|
if args.disable_version_check:
|
||||||
|
logger.warning('All available bottles are shown, including possibly incompatible ones.')
|
||||||
|
usable_bottles = available_bottles
|
||||||
|
else:
|
||||||
|
usable_bottles = [b for b in available_bottles if cx_version in b['cx_versions']]
|
||||||
logger.info(f'Found {len(usable_bottles)} bottle(s) usable with the selected CrossOver version. '
|
logger.info(f'Found {len(usable_bottles)} bottle(s) usable with the selected CrossOver version. '
|
||||||
f'(Total: {len(available_bottles)})')
|
f'(Total: {len(available_bottles)})')
|
||||||
|
|
||||||
|
@ -2233,7 +2237,7 @@ class LegendaryCLI:
|
||||||
default_choice = None
|
default_choice = None
|
||||||
for i, bottle in enumerate(usable_bottles, start=1):
|
for i, bottle in enumerate(usable_bottles, start=1):
|
||||||
extra = []
|
extra = []
|
||||||
if bottle['is_default']:
|
if bottle['is_default'] and not default_choice and cx_version in bottle['cx_versions']:
|
||||||
default_choice = i
|
default_choice = i
|
||||||
extra.append('default')
|
extra.append('default')
|
||||||
if bottle['name'] in bottles:
|
if bottle['name'] in bottles:
|
||||||
|
@ -2697,8 +2701,9 @@ def main():
|
||||||
cx_parser.add_argument('--reset', dest='reset', action='store_true',
|
cx_parser.add_argument('--reset', dest='reset', action='store_true',
|
||||||
help='Reset default/app-specific crossover configuration')
|
help='Reset default/app-specific crossover configuration')
|
||||||
cx_parser.add_argument('--download', dest='download', action='store_true',
|
cx_parser.add_argument('--download', dest='download', action='store_true',
|
||||||
# help='Automatically download and set up a preconfigured bottle (experimental)')
|
help='Automatically download and set up a preconfigured bottle (experimental)')
|
||||||
help=argparse.SUPPRESS)
|
cx_parser.add_argument('--ignore-version', dest='disable_version_check', action='store_true',
|
||||||
|
help='Disable version check for available bottles when using --download')
|
||||||
cx_parser.add_argument('--crossover-app', dest='crossover_app', action='store', metavar='<path to .app>',
|
cx_parser.add_argument('--crossover-app', dest='crossover_app', action='store', metavar='<path to .app>',
|
||||||
help='Specify app to skip interactive selection')
|
help='Specify app to skip interactive selection')
|
||||||
cx_parser.add_argument('--crossover-bottle', dest='crossover_bottle', action='store', metavar='<bottle name>',
|
cx_parser.add_argument('--crossover-bottle', dest='crossover_bottle', action='store', metavar='<bottle name>',
|
||||||
|
|
Loading…
Reference in a new issue