Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar-emulator
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2006-10-17 08:25:47 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2006-10-17 08:25:47 (GMT)
commitec3094e08b84f98228dd981e19042470815e30ef (patch)
tree2f8d552b616d83919ee2bb5f3f56328a15441302 /sugar-emulator
parent9ca5c6c0bf8e5679235373620ed455edebb338f4 (diff)
Move the running from source dir hacks in the emulator.
Diffstat (limited to 'sugar-emulator')
-rwxr-xr-xsugar-emulator22
1 files changed, 21 insertions, 1 deletions
diff --git a/sugar-emulator b/sugar-emulator
index b59d258..dafc275 100755
--- a/sugar-emulator
+++ b/sugar-emulator
@@ -25,10 +25,30 @@ if os.path.isfile(os.path.join(sourcedir, 'sugar/__uninstalled__.py')):
sys.path.insert(0, sourcedir)
else:
print 'Running the installed sugar...'
+ sourcedir = None
from sugar import env
+from sugar import setup
-env.setup_system()
+if sourcedir:
+ bin_path = sourcedir
+ bin_path += ';' + os.path.join(sourcedir, 'shell')
+ bin_path += ';' + os.path.join(sourcedir, 'services/presence')
+
+ if os.environ.has_key('PATH'):
+ old_path = os.environ['PATH']
+ os.environ['PATH'] = bin_path + ':' + old_path
+ else:
+ os.environ['PATH'] = bin_path
+
+ source = os.path.join(sourcedir, 'activities')
+ runner = os.path.join(sourcedir, 'shell/sugar-activity-factory')
+ setup.setup_activities(source, env.get_activity_info_dir(), runner)
+
+ bin = os.path.join(sourcedir,
+ 'services/presence/sugar-presence-service')
+ setup.write_service('org.laptop.Presence', bin,
+ env.get_activity_info_dir())
from sugar.emulator import Emulator