Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2006-04-27 19:01:42 (GMT)
committer Dan Williams <dcbw@redhat.com>2006-04-27 19:01:42 (GMT)
commit81f45f1447bc9fcc2f686668a44bd022d0de374e (patch)
tree4452e91102026aebb8bf25441a37bcd5e61eaaf1
parent38c5e5847bf22f0845cdd9ce3ba9ea2d588c7967 (diff)
merge to tip of tree
-rw-r--r--Makefile.am2
-rw-r--r--README26
-rwxr-xr-xbrowser/browser.py3
-rwxr-xr-xsetup-run-from-source.sh7
-rwxr-xr-xshell/src/shell.py3
-rwxr-xr-xsugar28
6 files changed, 26 insertions, 43 deletions
diff --git a/Makefile.am b/Makefile.am
index 64267ce..027fc63 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,5 @@
SUBDIRS = chat browser shell
-bin_SCRIPTS = sugar
-
sugardir = $(pythondir)/sugar
sugar_PYTHON = \
__init__.py \
diff --git a/README b/README
index aaeeea3..425eae3 100644
--- a/README
+++ b/README
@@ -11,28 +11,28 @@ Building
You will need gnome-common.
-./autogen.sh
+./autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var
make
-make install
+make install # make require root privileges
Running
=======
-sugar
+To run the python sources from your source tree run
+ $ ./setup-run-from-source.sh
-Debug
-=====
+in the top-level directory. Icons and other resources are still loaded
+from the installed location though.
-To run the shell:
+To run the shell
-sugar shell
+ $ cd shell/src
+ $ ./shell.py
-To run the chat activity:
+You can run activities like this
-sugar chat
-
-To run the web activity:
-
-sugar browser
+ $ cd browser
+ $ ./browser.py
+(Just remember to have the shell running)
diff --git a/browser/browser.py b/browser/browser.py
index 1027c99..91386f2 100755
--- a/browser/browser.py
+++ b/browser/browser.py
@@ -268,3 +268,6 @@ def main():
gtk.main()
except KeyboardInterrupt:
pass
+
+if __name__=="__main__":
+ main()
diff --git a/setup-run-from-source.sh b/setup-run-from-source.sh
new file mode 100755
index 0000000..69a6847
--- /dev/null
+++ b/setup-run-from-source.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# for activity.py
+export PYTHONPATH=`pwd`/shell/src/
+
+# for sugar_globals.py
+export PYTHONPATH=$PYTHONPATH:`pwd`/
diff --git a/shell/src/shell.py b/shell/src/shell.py
index 5ce526e..880c9c8 100755
--- a/shell/src/shell.py
+++ b/shell/src/shell.py
@@ -300,3 +300,6 @@ def main():
gtk.main()
except KeyboardInterrupt:
pass
+
+if __name__=="__main__":
+ main()
diff --git a/sugar b/sugar
deleted file mode 100755
index 2c4f105..0000000
--- a/sugar
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/python
-
-import sys
-import os
-
-if len(sys.argv) == 1:
- # FIXME Start a session
-
- # We are lucky and this
- # currently behave as we want.
- # The chat depends on the
- # web browser, so both activities
- # are spanned. But obviously we
- # need something better.
-
- import sugar.chat
- sugar.chat.main()
-elif sys.argv[1] == 'shell':
- import sugar.shell
- sugar.shell.main()
-elif sys.argv[1] == 'chat':
- import sugar.chat
- sugar.chat.main()
-elif sys.argv[1] == 'browser':
- import sugar.browser
- sugar.browser.main()
-else:
- print "Unkown activity"