Add a script to start sugar. Move the gtkrc to avoid conflicts when

installing on a complete system.
This commit is contained in:
Marco Pesenti Gritti 2007-03-22 20:34:07 +01:00
parent 01056ee823
commit 9af06c0b26
12 changed files with 30 additions and 27 deletions

1
.gitignore vendored
View File

@ -55,3 +55,4 @@ lib/src/stamp-sugar-marshal.c
lib/src/stamp-sugar-marshal.h lib/src/stamp-sugar-marshal.h
services/clipboard/org.laptop.Clipboard.service services/clipboard/org.laptop.Clipboard.service
services/console/org.laptop.sugar.Console.service services/console/org.laptop.sugar.Console.service
bin/sugar

View File

@ -1,4 +1,4 @@
SUBDIRS = lib po shell sugar services tools SUBDIRS = bin data lib po shell sugar services
ACLOCAL_AMFLAGS = -I m4 ACLOCAL_AMFLAGS = -I m4

7
bin/Makefile.am Normal file
View File

@ -0,0 +1,7 @@
bin_SCRIPTS = \
sugar \
sugar-install-bundle
EXTRA_DIST = \
$(bin_SCRIPTS) \
sugar.in

2
bin/sugar.in Normal file
View File

@ -0,0 +1,2 @@
export GTK2_RC_FILES=@prefix@/gtkrc
dbus-launch --exit-with-session sugar-shell

View File

@ -112,8 +112,12 @@ AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext package]) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext package])
AM_GLIB_GNU_GETTEXT AM_GLIB_GNU_GETTEXT
AC_CONFIG_FILES([bin/sugar], [chmod +x sugar])
AC_OUTPUT([ AC_OUTPUT([
Makefile Makefile
bin/Makefile
data/Makefile
lib/Makefile lib/Makefile
lib/data/Makefile lib/data/Makefile
lib/src/Makefile lib/src/Makefile
@ -158,6 +162,4 @@ sugar/p2p/Makefile
sugar/presence/Makefile sugar/presence/Makefile
sugar/datastore/Makefile sugar/datastore/Makefile
po/Makefile.in po/Makefile.in
tools/Makefile
tools/sugar-setup-activity
]) ])

4
data/Makefile.am Normal file
View File

@ -0,0 +1,4 @@
sugardir = $(pkgdatadir)
sugar_DATA = gtkrc
EXTRA_DIST = $(sugar_DATA)

6
data/gtkrc Normal file
View File

@ -0,0 +1,6 @@
gtk-theme-name = "olpc"
gtk-icon-theme-name = "olpc"
gtk-font-name = "Bitstream Vera Sans 7"
gtk-icon-sizes = "gtk-menu=32,32:gtk-button=32,32"
gtk-cursor-theme-name = "olpc"
gtk-cursor-theme-size = 48

View File

@ -90,4 +90,6 @@ else:
_start_xephyr(width, height, min(_sugar.get_screen_dpi(), 96)) _start_xephyr(width, height, min(_sugar.get_screen_dpi(), 96))
os.environ['GTK2_RC_FILES'] = env.get_data_path('gtkrc')
os.execlp('dbus-launch', 'dbus-launch', '--exit-with-session', program) os.execlp('dbus-launch', 'dbus-launch', '--exit-with-session', program)

View File

@ -63,3 +63,6 @@ def get_service_path(name):
def get_shell_path(path=None): def get_shell_path(path=None):
return _get_prefix_path('share/sugar/shell', path) return _get_prefix_path('share/sugar/shell', path)
def get_data_path(path=None):
return _get_prefix_path('share/sugar', path)

View File

@ -1,4 +0,0 @@
bin_SCRIPTS = sugar-install-bundle \
sugar-setup-activity
EXTRA_DIST = $(bin_SCRIPTS)

View File

@ -1,20 +0,0 @@
#!/usr/bin/env python
import sys
from sugar import setup
if len(sys.argv) > 2:
prefix = sys.argv[2]
else:
prefix = '@prefix@'
if len(sys.argv) > 3:
root = sys.argv[3]
else:
root = ''
setup.setup_activity(sys.argv[1],
'%s%s/share/sugar/activities' % (root, prefix),
'%s/bin/sugar-activity-factory' % prefix)
print '%s installed.' % sys.argv[1]