core, quick_frontends: android compatibility hacks:

a couple of hacks have been used so backend can be launched on android using kivy
    - config file (sat.conf) is been read on a specific dir, using a detection of Cagou domains in constants.py
    - fixed crash when using sys.stdout.isatty in log_config.py
    - Q&D fix for logging encoding issue on android
    - when android is detected, the path/pattern to load plugins is modified
    - SRV is not working at the moment on android. If the platform is detected, the host is used directly with default port. A hosts_dir configuration can be used in [android] section to map a specific ip to a host
    - getRepositoryData in tools/utils return constant string on android. Proper repository data need to be copied during package building.
    - [quick app] more robust failure handling on asyncConnect error
    - [quick chat] default to utf-8 when getlocale doesn't return the actual locale.
This commit is contained in:
Goffi 2016-12-04 18:16:48 +01:00
commit 2618d48e7b

View file

@ -25,6 +25,7 @@ from sat.core.log import getLogger
log = getLogger(__name__)
import datetime
import time
import sys
def clean_ustr(ustr):
@ -78,6 +79,9 @@ def getRepositoryData(module, as_string=True, is_path=False, save_dir_path=None)
- date: ISO 8601 format date
- tag: latest tag used in hierarchie
"""
if sys.platform == "android":
# FIXME: workaround to avoid trouble on android, need to be fixed properly
return u"Cagou android build"
from distutils.spawn import find_executable
import subprocess
KEYS=("node", "node_short", "branch", "date", "tag")