From ee151fca17e12d31fb2baf75c6441b1e5e219f8d Mon Sep 17 00:00:00 2001 From: Eitan Isaacson Date: Mon, 3 May 2010 23:12:51 -0700 Subject: Added automake --- bin/Makefile.am | 6 +++++ bin/caribou.in | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 bin/Makefile.am create mode 100644 bin/caribou.in (limited to 'bin') 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 +# Copyright (C) 2009 Eitan Isaacson +# Copyright (C) 2009 Sun Microsystems, Inc. +# * Contributor: Willie Walker +# Copyright (C) 2009 Flavio Percoco +# * Contributor: Flavio Percoco +# +# 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() -- cgit v1.2.1