def findMacInstalled(paths):
    """
    Ask the mac system profiler to list all installed apps.
    """
    query = 'kMDItemCFBundleIdentifier==com.riotgames.leagueoflegends'
    for line in subprocess.check_output(['mdfind', query]).splitlines():
        paths.append(line.decode())

    Ask the mac system profiler to list all installed apps.
    
leaguedirector/enable.py