fix check-dependencies.py

This commit is contained in:
Chrys 2020-03-03 21:56:44 +01:00
parent b4e6b50530
commit 3d93dcbd98

View File

@ -6,7 +6,7 @@ import os, sys
# speech: speech-dispatcher # speech: speech-dispatcher
# sound: sox # sound: sox
# braille: brltty: # braille: brltty:
defaultInstallation = ['FenrirCore','vcsaDriver','brlapiDriver','evdevDriver','genericDriver (speech)', 'genericDriver (sound)'] defaultInstallation = ['FenrirCore','vcsaDriver','dummyDriver (braille)','evdevDriver','genericDriver (speech)', 'genericDriver (sound)']
currentInstallation = [] currentInstallation = []
print('checking dependencys...') print('checking dependencys...')
@ -34,6 +34,10 @@ if available:
# SCREEN # SCREEN
print('--------------------') print('--------------------')
print('screen driver') print('screen driver')
# dummy and debug
print('dummyDriver (screen): OK')
currentInstallation.append('dummyDriver (screen)')
# VCSA (screen driver) # VCSA (screen driver)
print('vcsaDriver') print('vcsaDriver')
available = True available = True
@ -66,6 +70,11 @@ if available:
# BRAILLE # BRAILLE
print('--------------------') print('--------------------')
print('braille driver') print('braille driver')
# dummy and debug
print('dummyDriver (braille): OK')
currentInstallation.append('dummyDriver (braille)')
print('debugDriver (braille): OK')
currentInstallation.append('debugDriver (braille)')
# brltty (braille driver) # brltty (braille driver)
print('brlapiDriver') print('brlapiDriver')
available = True available = True
@ -81,6 +90,11 @@ if available:
# INPUT # INPUT
print('--------------------') print('--------------------')
print('input driver') print('input driver')
# dummy and debug
print('dummyDriver (input): OK')
currentInstallation.append('dummyDriver (input)')
print('debugDriver (input): OK')
currentInstallation.append('debugDriver (input)')
# evdev (input driver) # evdev (input driver)
print('evdevDriver') print('evdevDriver')
available = True available = True
@ -90,13 +104,13 @@ try:
print('python3-evdev: OK') print('python3-evdev: OK')
except: except:
print('python3-evdev: FAIL') print('python3-evdev: FAIL')
available = available and False available = available and False
try: try:
import pyudev import pyudev
print('python3-pyudev: OK') print('python3-pyudev: OK')
except: except:
print('python3-pyudev: FAIL') print('python3-pyudev: FAIL')
available = available and False available = available and False
if available: if available:
currentInstallation.append('evdevDriver') currentInstallation.append('evdevDriver')
# pty emulation (input driver) # pty emulation (input driver)
@ -108,19 +122,24 @@ try:
print('pyte: OK') print('pyte: OK')
except: except:
print('pyte: FAIL') print('pyte: FAIL')
available = available and False available = available and False
if available: if available:
currentInstallation.append('ptyDriver (Input)') currentInstallation.append('ptyDriver (Input)')
# SOUND # SOUND
print('--------------------') print('--------------------')
print('sound driver') print('sound driver')
# dummy and debug
print('dummyDriver (sound): OK')
currentInstallation.append('dummyDriver (sound)')
print('debugDriver (sound): OK')
currentInstallation.append('debugDriver (sound)')
print('genericDriver (uses sox by default)') print('genericDriver (uses sox by default)')
available = True available = True
if os.path.exists('/usr/bin/play') and os.path.exists('/usr/bin/sox'): if os.path.exists('/usr/bin/play') and os.path.exists('/usr/bin/sox'):
print('sox: OK') print('sox: OK')
else: else:
print('sox: FAIL') print('sox: FAIL')
available = available and False available = available and False
if available: if available:
currentInstallation.append('genericDriver (sound)') currentInstallation.append('genericDriver (sound)')
print('') print('')
@ -132,26 +151,31 @@ try:
print('gi: OK') print('gi: OK')
except: except:
print('gi: FAIL') print('gi: FAIL')
available = available and False available = available and False
try: try:
from gi.repository import GLib from gi.repository import GLib
print('gi GLib: OK') print('gi GLib: OK')
except: except:
print('gi GLib: FAIL') print('gi GLib: FAIL')
available = available and False available = available and False
try: try:
gi.require_version('Gst', '1.0') gi.require_version('Gst', '1.0')
from gi.repository import Gst from gi.repository import Gst
print('gi Gst: OK') print('gi Gst: OK')
except: except:
print('gi Gst: FAIL') print('gi Gst: FAIL')
available = available and False available = available and False
if available: if available:
currentInstallation.append('gstreamerDriver') currentInstallation.append('gstreamerDriver')
# SPEECH # SPEECH
print('--------------------') print('--------------------')
print('speech driver') print('speech driver')
# dummy and debug
print('dummyDriver (speech): OK')
currentInstallation.append('dummyDriver (speech)')
print('debugDriver (speech): OK')
currentInstallation.append('debugDriver (speech)')
# speechd (speech driver) # speechd (speech driver)
print('speechdDriver') print('speechdDriver')
available = True available = True
@ -160,7 +184,7 @@ try:
print('python3-speechd: OK') print('python3-speechd: OK')
except: except:
print('python3-speechd: FAIL') print('python3-speechd: FAIL')
available = available and False available = available and False
if available: if available:
currentInstallation.append('speechdDriver') currentInstallation.append('speechdDriver')
print('') print('')
@ -172,9 +196,9 @@ try:
print('python3-espeak: OK') print('python3-espeak: OK')
except: except:
print('python3-espeak: FAIL') print('python3-espeak: FAIL')
available = available and False available = available and False
if available: if available:
currentInstallation.append('espeakDriver') currentInstallation.append('espeakDriver')
print('genericDriver (uses espeak by default)') print('genericDriver (uses espeak by default)')
available = True available = True
if os.path.exists('/usr/bin/espeak') or os.path.exists('/bin/espeak'): if os.path.exists('/usr/bin/espeak') or os.path.exists('/bin/espeak'):
@ -183,7 +207,7 @@ else:
print('espeak: FAIL') print('espeak: FAIL')
available = available and False available = available and False
if available: if available:
currentInstallation.append('genericDriver (speech)') currentInstallation.append('genericDriver (speech)')
# SUMMERY # SUMMERY
print('====================') print('====================')