mirror of
https://github.com/derrod/legendary.git
synced 2025-04-01 10:36:53 +00:00
Merge adb6cc979d
into 3963382b3f
This commit is contained in:
commit
69c4fad556
|
@ -4,7 +4,7 @@ import os
|
|||
import subprocess
|
||||
|
||||
_logger = logging.getLogger('CXHelpers')
|
||||
|
||||
bottles_dir = os.environ["CX_BOTTLE_PATH"] if "CX_BOTTLE_PATH" in os.environ else '~/Library/Application Support/CrossOver/Bottles'
|
||||
|
||||
def mac_get_crossover_version(app_path):
|
||||
try:
|
||||
|
@ -37,19 +37,19 @@ def mac_find_crossover_apps():
|
|||
|
||||
|
||||
def mac_get_crossover_bottles():
|
||||
bottles_path = os.path.expanduser('~/Library/Application Support/CrossOver/Bottles')
|
||||
bottles_path = os.path.expanduser(bottles_dir)
|
||||
if not os.path.exists(bottles_path):
|
||||
return []
|
||||
return sorted(p for p in os.listdir(bottles_path) if mac_is_valid_bottle(p))
|
||||
|
||||
|
||||
def mac_is_valid_bottle(bottle_name):
|
||||
bottles_path = os.path.expanduser('~/Library/Application Support/CrossOver/Bottles')
|
||||
bottles_path = os.path.expanduser(bottles_dir)
|
||||
return os.path.exists(os.path.join(bottles_path, bottle_name, 'cxbottle.conf'))
|
||||
|
||||
|
||||
def mac_get_bottle_path(bottle_name):
|
||||
bottles_path = os.path.expanduser('~/Library/Application Support/CrossOver/Bottles')
|
||||
bottles_path = os.path.expanduser(bottles_dir)
|
||||
return os.path.join(bottles_path, bottle_name)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue