Let the presence service set his own path
This commit is contained in:
parent
f74614a02b
commit
dc0de1d35d
@ -1,10 +1,16 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import logging
|
||||
from presence import PresenceService
|
||||
import sugar.logger
|
||||
import sys
|
||||
import os
|
||||
|
||||
sugar.logger.start('presenceservice')
|
||||
from sugar import logger
|
||||
from sugar import env
|
||||
|
||||
sys.path.insert(0, env.get_services_dir())
|
||||
|
||||
from presence import PresenceService
|
||||
|
||||
logger.start('presenceservice')
|
||||
|
||||
logging.info('Starting presence service')
|
||||
|
||||
|
@ -4,6 +4,6 @@ sugar_activities_dir = '@prefix@/share/sugar/activities'
|
||||
sugar_services_dir = '@prefix@/share/sugar/services'
|
||||
sugar_dbus_config = '@prefix@/share/sugar/dbus-installed.conf'
|
||||
|
||||
sugar_python_path = ['@prefix@/share/sugar/activities',
|
||||
'@prefix@/share/sugar/services']
|
||||
sugar_python_path = ['@prefix@/share/sugar/activities']
|
||||
|
||||
sugar_bin_path = []
|
||||
|
@ -3,17 +3,16 @@ import tempfile
|
||||
|
||||
sugar_source_dir = os.path.dirname(os.path.dirname(__file__))
|
||||
sugar_data_dir = os.path.join(sugar_source_dir, 'shell/data')
|
||||
sugar_services_dir = os.path.join(sugar_source_dir, 'services')
|
||||
|
||||
__tmpdir = os.path.join(tempfile.gettempdir(), 'sugar')
|
||||
sugar_activities_dir = __tmpdir
|
||||
sugar_service_dir = __tmpdir
|
||||
|
||||
sugar_dbus_config = os.path.join(sugar_source_dir, 'dbus-uninstalled.conf')
|
||||
|
||||
sugar_python_path = []
|
||||
sugar_python_path.append(sugar_source_dir)
|
||||
sugar_python_path.append(os.path.join(sugar_source_dir, 'activities'))
|
||||
sugar_python_path.append(os.path.join(sugar_source_dir, 'services'))
|
||||
|
||||
sugar_bin_path = []
|
||||
sugar_bin_path.append(os.path.join(sugar_source_dir))
|
||||
|
@ -75,5 +75,8 @@ def get_data_dir():
|
||||
def get_activities_dir():
|
||||
return sugar_activities_dir
|
||||
|
||||
def get_services_dir():
|
||||
return sugar_services_dir
|
||||
|
||||
def get_dbus_config():
|
||||
return sugar_dbus_config
|
||||
|
Loading…
Reference in New Issue
Block a user