Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar-jhbuild
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2007-01-21 11:36:15 (GMT)
committer Marco Pesenti Gritti <mpg@redhat.com>2007-01-21 11:36:15 (GMT)
commiteb200d2facbe5617e2ee5ebdf7cab111ee549f26 (patch)
tree0617b20f0e34d851e59699320a667788f6860e3b /sugar-jhbuild
parentcf7fe419fd76c8d38171959bc8b9106142e4cd11 (diff)
Start rewriting the main script. Split configuration out to a jhbuild.config.Config subclass.
Diffstat (limited to 'sugar-jhbuild')
-rwxr-xr-xsugar-jhbuild72
1 files changed, 6 insertions, 66 deletions
diff --git a/sugar-jhbuild b/sugar-jhbuild
index cd659ab..aecca99 100755
--- a/sugar-jhbuild
+++ b/sugar-jhbuild
@@ -3,27 +3,14 @@
import os
import sys
-import dependency
-from dependency import LibDependency
-
-def update_jhbuild():
- print 'Updating jhbuild...'
- sys.path.append(os.path.join(base_dir))
-
- os.chdir(build_scripts_dir)
-
- cmd = ['svn', 'co', 'svn://svn.gnome.org/svn/jhbuild/trunk', 'jhbuild']
- os.spawnvp(os.P_WAIT, 'svn', cmd)
+base_dir = os.path.abspath(os.path.dirname(__file__))
+sys.path.append(os.path.join(base_dir, 'build-scripts', 'jhbuild'))
- os.chdir(exec_dir)
+import jhbuild.commands
-def configure():
- config_file = os.path.join(build_scripts_dir, 'olpc.jhbuildrc')
- return jhbuild.config.Config(config_file)
+from config import Config
-exec_dir = os.getcwd()
-base_dir = os.path.abspath(os.path.dirname(__file__))
-build_scripts_dir = os.path.join(base_dir, 'build-scripts')
+config = Config(base_dir)
if len(sys.argv) > 1:
command = sys.argv[1]
@@ -32,51 +19,4 @@ else:
command = 'build'
args = sys.argv[1:]
-if command == 'build':
- update_jhbuild()
-
-# System dependencies
-
-skip_modules = [
- 'libglade',
- 'libXrender',
- 'libxml2',
- 'shared-mime-info',
- 'fontconfig',
- 'gtk-doc',
- 'startup-notification',
- 'libXft'
-]
-
-if LibDependency('xulrunner', 'xulrunner-gtkmozembed').check():
- skip_modules.append('mozilla')
-
-sys.path.append(os.path.join(build_scripts_dir, 'jhbuild'))
-
-import jhbuild.config
-import jhbuild.commands
-
-import bundlemodule
-
-config = configure()
-
-for module in skip_modules:
- config.skip.append(module)
-
-jhbuild.config.addpath('XDG_DATA_DIRS', '/usr/share')
-
-path = 'lib/python2.4/site-packages'
-jhbuild.config.addpath('PYTHONPATH', os.path.join(config.prefix, path))
-
-path = 'lib/gtk-2.0/'
-jhbuild.config.addpath('GTK_PATH', os.path.join(config.prefix, path))
-
-path = 'etc/gtk-2.0/gtkrc'
-jhbuild.config.addpath('GTK2_RC_FILES', os.path.join(config.prefix, path))
-
-jhbuild.config.addpath('SUGAR_PREFIX', config.prefix)
-
-if command == 'run' and len(args) == 0:
- jhbuild.commands.run(command, config, ['sugar-emulator'])
-else:
- jhbuild.commands.run(command, config, args)
+jhbuild.commands.run(command, config, args)