2
# Copyright and license see bottom of this file
4
GTK_2_DEMO_APP=gtk-demo
5
GTK_3_DEMO_APP=gtk3-demo
6
GTK_QUERY_IMMODULES_2=gtk-query-immodules-2.0
7
GTK_QUERY_IMMODULES_3=gtk-query-immodules-3.0
9
export HIME_OUTPUT_FILTER=$PWD/filter/nobopomofo
10
UTF8_LOCALE=`locale -a | grep utf8 | tail -n 1`
12
XIM_NAME=`date +%N | tr -d 0`
13
GTK_2_TEMP_FILE=$PWD/gtk2
14
GTK_3_TEMP_FILE=$PWD/gtk3
16
[ ! -e distro/debian ] && exec echo Please run this script under hime directory, thanks.
18
export PATH=$PWD/src:$PATH
19
export HIME_TABLE_DIR=$PWD/data
20
export HIME_MODULE_DIR=$PWD/src/modules
21
export XMODIFIERS=@im=$XIM_NAME
23
export LC_CTYPE=$UTF8_LOCALE
25
$GTK_QUERY_IMMODULES_2 | grep -v hime > $GTK_2_TEMP_FILE
26
$GTK_QUERY_IMMODULES_3 | grep -v hime > $GTK_3_TEMP_FILE
27
LD_LIBRARY_PATH=$PWD/src/im-client/ $GTK_QUERY_IMMODULES_2 $PWD/src/gtk-im/im-hime.so >> $GTK_2_TEMP_FILE
28
LD_LIBRARY_PATH=$PWD/src/im-client/ $GTK_QUERY_IMMODULES_3 $PWD/src/gtk3-im/im-hime.so >> $GTK_3_TEMP_FILE
30
export LD_PRELOAD=$PWD/src/im-client/libhime-im-client.so
31
export GTK_IM_MODULE=hime
33
if [ ! -x "$HIME_OUTPUT_FILTER" ]; then
34
echo [1m[31mWarning![0m Your filter is not executable. Filter has been turned off automatically.
35
unset HIME_OUTPUT_FILTER
38
sh scripts/hime-user-setup $PWD/data $PWD/src
39
HIME_TABLE_DIR=data LD_LIBRARY_PATH=$PWD/src/im-client/:$PWD/src XMODIFIERS=@im=$XIM_NAME src/hime &
42
[ "$GTK_2_DEMO_APP" != "" ] && GTK_IM_MODULE_FILE=$GTK_2_TEMP_FILE $GTK_2_DEMO_APP
43
[ "$GTK_3_DEMO_APP" != "" ] && GTK_IM_MODULE_FILE=$GTK_3_TEMP_FILE $GTK_3_DEMO_APP
45
[ $(id -u $USER) != "0" ] && kill -HUP $HIME_PID
47
rm $GTK_2_TEMP_FILE $GTK_3_TEMP_FILE /tmp/hime-$USER/socket-*-$XIM_NAME
49
# Copyright (C) 2007-2011 Wen-Yen Chuang <caleb AT calno DOT com>
51
# This library is free software; you can redistribute it and/or
52
# modify it under the terms of the GNU Lesser General Public
53
# License as published by the Free Software Foundation; either
54
# version 2.1 of the License, or (at your option) any later version.
56
# This library is distributed in the hope that it will be useful,
57
# but WITHOUT ANY WARRANTY; without even the implied warranty of
58
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
59
# Lesser General Public License for more details.
61
# You should have received a copy of the GNU Lesser General Public
62
# License along with this library; if not, write to the Free Software
63
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA