1
0

updates for the old android GUI

This commit is contained in:
ThomasV
2015-02-24 18:41:29 +01:00
parent 18d16ba82c
commit 80284d5516
5 changed files with 74 additions and 58 deletions

View File

@@ -27,12 +27,13 @@ import sys
import time
import traceback
script_dir = os.path.dirname(os.path.realpath(__file__))
is_bundle = getattr(sys, 'frozen', False)
is_local = not is_bundle and os.path.dirname(os.path.realpath(__file__)) == os.getcwd()
is_local = not is_bundle and script_dir == os.getcwd()
is_android = 'ANDROID_DATA' in os.environ
if is_local:
sys.path.insert(0, 'packages')
if is_local or is_android:
sys.path.insert(0, os.path.join(script_dir, 'packages'))
elif is_bundle and sys.platform=='darwin':
sys.path.insert(0, os.getcwd() + "/lib/python2.7/packages")