Add $bundlepath/bin to the PATH when launching an

activity.
This commit is contained in:
Marco Pesenti Gritti 2007-10-09 12:08:03 +02:00
parent f82e79e27c
commit 177ee7220a

View File

@ -156,8 +156,11 @@ class ActivityCreationHandler(gobject.GObject):
activity_registry = registry.get_registry() activity_registry = registry.get_registry()
activity = activity_registry.get_activity(self._service_name) activity = activity_registry.get_activity(self._service_name)
if activity: if activity:
bin_path = os.path.join(activity.path, 'bin')
env = os.environ.copy() env = os.environ.copy()
env['SUGAR_BUNDLE_PATH'] = activity.path env['SUGAR_BUNDLE_PATH'] = activity.path
env['PATH'] = bin_path + ':' + env['PATH']
command = activity.command command = activity.command
if self._handle.activity_id is not None: if self._handle.activity_id is not None: