summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorEitan Isaacson <eitan@monotonous.org>2010-05-03 23:12:51 -0700
committerEitan Isaacson <eitan@monotonous.org>2010-05-03 23:19:35 -0700
commitee151fca17e12d31fb2baf75c6441b1e5e219f8d (patch)
tree7e07258ff7fa24559f6959f13e68027cee47cf22 /bin
parentfc4d61a700141eefdbd5e0401806bfa371a0a4a8 (diff)
downloadcaribou-ee151fca17e12d31fb2baf75c6441b1e5e219f8d.tar.gz
Added automake
Diffstat (limited to 'bin')
-rw-r--r--bin/Makefile.am6
-rw-r--r--bin/caribou.in69
2 files changed, 75 insertions, 0 deletions
diff --git a/bin/Makefile.am b/bin/Makefile.am
new file mode 100644
index 0000000..cae01c9
--- /dev/null
+++ b/bin/Makefile.am
@@ -0,0 +1,6 @@
+bin_SCRIPTS = caribou
+
+CLEANFILES = $(bin_SCRIPTS)
+
+all: $(bin_SCRIPTS)
+ @chmod +x $(bin_SCRIPTS)
diff --git a/bin/caribou.in b/bin/caribou.in
new file mode 100644
index 0000000..89f9d4b
--- /dev/null
+++ b/bin/caribou.in
@@ -0,0 +1,69 @@
+#!/usr/bin/python
+#
+# Caribou - text entry and UI navigation application
+#
+# Copyright (C) 2009 Adaptive Technology Resource Centre
+# * Contributor: Ben Konrath <ben@bagu.org>
+# Copyright (C) 2009 Eitan Isaacson <eitan@monotonous.org>
+# Copyright (C) 2009 Sun Microsystems, Inc.
+# * Contributor: Willie Walker <william.walker@sun.com>
+# Copyright (C) 2009 Flavio Percoco <flaper87@flaper87.org>
+# * Contributor: Flavio Percoco <flaper87@flaper87.org>
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by the
+# Free Software Foundation; either version 2.1 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+# for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+from optparse import OptionParser
+import gettext
+import sys
+import gtk
+import os
+
+# We can't rely on prefix if we're installed by relocated RPM. Instead, we
+# use __file__ and for now hope that lib is relative to bin.
+sys.prefix = os.path.normpath(os.path.join(os.path.dirname(__file__), '..'))
+libs = os.path.join(sys.prefix, 'lib',
+ 'python@PYTHON_VERSION@', 'site-packages')
+# point to the proper site-packages path
+sys.path.insert(1, libs)
+
+# This might be run from the build dir.
+_dirname = os.path.dirname(__file__)
+if os.path.dirname(__file__) != "@prefix@/bin":
+ srcdir = os.path.normpath(os.path.join(_dirname, '..'))
+ sys.path.insert(1, srcdir)
+ import caribou
+else:
+ import caribou
+
+import caribou.window as window
+import caribou.keyboard as keyboard
+import caribou.main as main
+
+_ = gettext.gettext
+
+if __name__ == "__main__":
+ parser = OptionParser(usage="usage: %prog [options]",
+ version="%prog @VERSION@")
+ parser.add_option("-d", "--debug",
+ action="store_true", dest="debug", default=False,
+ help="print debug messages on stdout")
+ (options, args) = parser.parse_args()
+
+ main.debug = options.debug
+
+ caribou = main.Caribou()
+ caribou.window.hide_all()
+
+ gtk.main()