-
-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathREADME
273 lines (192 loc) · 7.62 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
Nimf is a lightweight, fast and extensible input method framework.
Because this document contains upstream content, there may be errors in the build.
If you have any questions, please visit the address below.
https://github.com/hamonikr/nimf/wiki
https://github.com/hamonikr/nimf/issues
Nimf provides:
* Input Method Server:
* nimf
* Language Engines:
* System keyboard
* Chinese (based on librime)
* Japanese (based on anthy)
* Korean (based on libhangul)
* Various languages (based on m17n)
* Service Modules:
* Indicator (based on appindicator)
* Wayland
* NIM (Nimf Input Method)
* XIM (based on IMdkit)
* Preedit window
* Candidate
* Client Modules:
* GTK+2, GTK+3, Qt5
* Settings tool to configure the Nimf:
* nimf-settings
* Development files:
* C library, headers and documents
Project Homepage:
* https://github.com/hamonikr/nimf
License
-------
Nimf 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 3 of the License, or
(at your option) any later version.
Nimf 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, see <http://www.gnu.org/licenses/>.
Downloads
---------
Download latest snapshot of the current master branch
* Clone with HTTPS
git clone https://github.com/hamonikr/nimf/nimf.git
* Download tar.gz
https://github.com/hamonikr/nimf/archive/master/nimf-master.tar.gz
Compiling and installing
------------------------
* Debian, Ubuntu, Kubuntu
First of all, install devscripts, build-essential, debhelper.
username:~$ sudo apt install devscripts build-essential debhelper
After installing devscripts, build-essential perform the following commands.
username:~$ cd
username:~$ mkdir tmp-build
username:~$ cd tmp-build
username:~/tmp-build$ wget https://github.com/hamonikr/nimf/archive/master/nimf-master.tar.gz
username:~/tmp-build$ tar zxf nimf-master.tar.gz
username:~/tmp-build$ cd nimf-master
username:~/tmp-build/nimf-master$ dpkg-checkbuilddeps
You may see something like:
dpkg-checkbuilddeps: Unmet build dependencies: some-package1 some-package2 ...
Install all dependent packages and perform the following commands.
username:~/tmp-build/nimf-master$ debuild -b -uc -us
username:~/tmp-build/nimf-master$ cd ..
username:~/tmp-build$ ls
libnimf1_YYYY.mm.dd_amd64.deb
libnimf1-dbgsym_YYYY.mm.dd_amd64.deb
nimf_YYYY.mm.dd_amd64.build
nimf_YYYY.mm.dd_amd64.buildinfo
nimf_YYYY.mm.dd_amd64.changes
nimf_YYYY.mm.dd_amd64.deb
nimf_YYYY.mm.dd.dsc
nimf_YYYY.mm.dd.tar.xz
nimf-anthy_YYYY.mm.dd_amd64.deb
nimf-anthy-dbgsym_YYYY.mm.dd_amd64.deb
nimf-dbgsym_YYYY.mm.dd_amd64.deb
nimf-dev_YYYY.mm.dd_amd64.deb
nimf-libhangul_YYYY.mm.dd_amd64.deb
nimf-libhangul-dbgsym_YYYY.mm.dd_amd64.deb
nimf-m17n_YYYY.mm.dd_amd64.deb
nimf-m17n-dbgsym_YYYY.mm.dd_amd64.deb
nimf-master
nimf-rime_YYYY.mm.dd_amd64.deb
nimf-rime-dbgsym_YYYY.mm.dd_amd64.deb
Install deb packages.
username:~/tmp-build$ sudo dpkg -i nimf_YYYY.mm.dd_amd64.deb \
libnimf1_YYYY.mm.dd_amd64.deb nimf-anthy_YYYY.mm.dd_amd64.deb \
nimf-libhangul_YYYY.mm.dd_amd64.deb nimf-m17n_YYYY.mm.dd_amd64.deb \
nimf-rime_YYYY.mm.dd_amd64.deb
* CentOS
Open the terminal and run the following commands step by step.
git clone --recurse-submodules https://github.com/hamonikr/nimf
tar -cvf master.tar.gz nimf
cp master.tar.gz ~/rpmbuild/SOURCES/
sudo yum install epel-release
sudo yum install gcc-c++ libtool glib2-devel pkgconfig intltool \
gtk3-devel gtk2-devel qt5-qtbase-devel qt5-qtbase-private-devel \
libappindicator-gtk3-devel librsvg2-tools google-noto-cjk-fonts \
libhangul-devel anthy-devel anthy libxkbcommon-devel wayland-devel \
libxklavier-devel gtk-doc
rpmbuild -bb nimf/nimf.spec
ls -R ~/rpmbuild/RPMS/
sudo yum install ~/rpmbuild/RPMS/`uname -m`/nimf-*.rpm
* Other Linux distributions
There are configuration options. Use it for your situation.
--disable-hardening Disable hardening
--disable-nimf-anthy Disable nimf-anthy
--disable-nimf-m17n Disable nimf-m17n
--disable-nimf-rime Disable nimf-rime
--with-im-config-data Install im-config data
--with-imsettings-data Install imsettings data
Open the terminal and run the following commands step by step.
username:~$ cd
username:~$ mkdir tmp-build
username:~$ cd tmp-build
username:~/tmp-build$ wget https://gitlab.com/nimf-i18n/nimf/-/archive/master/nimf-master.tar.gz
username:~/tmp-build$ tar zxf nimf-master.tar.gz
username:~/tmp-build$ cd nimf-master
If you are using im-config
./autogen.sh --with-im-config-data
If you are using im-chooser
./autogen.sh --with-imsettings-data
Otherwise
./autogen.sh
make
sudo make install
sudo ldconfig
sudo make update-gtk-im-cache
sudo make update-gtk-icon-cache
To uninstall nimf, run the following command.
sudo make uninstall
Configure
---------
* For GNOME Shell, use 3rd party gnome-shell-extension-appindicator
https://github.com/ubuntu/gnome-shell-extension-appindicator
https://extensions.gnome.org/extension/615/appindicator-support/
* How to enable Nimf on systems using im-config
im-config -n nimf
* How to enable Nimf on systems using im-chooser
imsettings-switch nimf
* How to enable Nimf on systems using systemd v233 or later
Run nimf-settings.
Turn on the "Setup environment variables" option in the Nimf menu.
Debugging
---------
nimf --debug
nimf-settings --gapplication-service & # for nimf-indicator
tail -f /var/log/daemon.log # or /var/log/syslog
export GTK_IM_MODULE="nimf"
export QT4_IM_MODULE="xim"
export QT_IM_MODULE="nimf"
export XMODIFIERS="@im=nimf"
export G_MESSAGES_DEBUG=nimf
gedit # or kate for Qt
Participate
-----------
* Development
You may send pull requests.
https://github.com/hamonikr/nimf/pulls
* Translation
You can make nimf.pot using the following commands.
git clone https://github.com/hamonikr/nimf/nimf.git
cd nimf
./autogen.sh
cd po
make nimf.pot
Then, you may translate nimf.pot into your native language.
References
----------
* APIs
http://www.x.org/releases/X11R7.6/doc/libX11/specs/XIM/xim.html
http://www.w3.org/TR/ime-api/
https://developer.chrome.com/extensions/input_ime
https://docs.enlightenment.org/stable/efl/group__Ecore__IMF__Lib__Group.html
http://doc.qt.io/qt-4.8/qinputcontext.html
http://doc.qt.io/qt-5/qinputmethod.html
https://git.gnome.org/browse/gtk+/tree/gtk/gtkimcontext.c
* Language Engines (alphabetically listed)
http://anonscm.debian.org/cgit/collab-maint/anthy.git
https://github.com/libhangul/libhangul
https://github.com/rime/librime
https://www.nongnu.org/m17n/
* Implementations
https://github.com/libhangul/nabi
https://github.com/libhangul/imhangul
https://github.com/libhangul/ibus-hangul
https://github.com/ibus/ibus
https://github.com/fcitx/fcitx
https://github.com/fcitx/fcitx-qt5
https://github.com/uim/uim