From 6dd2f7109c2e955ef5649eddf60fefb6bc1f63bd Mon Sep 17 00:00:00 2001 From: Bert Freudenberg Date: Thu, 17 May 2007 11:18:56 +0000 Subject: Find executable in bundle (approved by marcopg, fix for #1362) --- diff --git a/sugar/activity/bundle.py b/sugar/activity/bundle.py index 98b9e9a..d3c490f 100644 --- a/sugar/activity/bundle.py +++ b/sugar/activity/bundle.py @@ -78,10 +78,14 @@ class Bundle: if cp.has_option(section, 'class'): self._class = cp.get(section, 'class') self._exec = '%s --bundle-path="%s"' % ( - env.get_bin_path(_PYTHON_FACTORY), self.get_path()) + env.get_bin_path(_PYTHON_FACTORY), self._path) elif cp.has_option(section, 'exec'): self._class = None - self._exec = cp.get(section, 'exec') + cmdline = cp.get(section, 'exec') + cmdline = os.path.join(self._path, cmdline) + cmdline = cmdline.replace('$SUGAR_BUNDLE_PATH', self._path) + cmdline = os.path.expandvars(cmdline) + self._exec = cmdline else: self._exec = None self._valid = False -- cgit v0.9.1