README 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  1. Nimf is a lightweight, fast and extensible input method framework.
  2. Because this document contains upstream content, there may be errors in the build.
  3. If you have any questions, please visit the address below.
  4. https://github.com/hamonikr/nimf/wiki
  5. https://github.com/hamonikr/nimf/issues
  6. Nimf provides:
  7. * Input Method Server:
  8. * nimf
  9. * Language Engines:
  10. * System keyboard
  11. * Chinese (based on librime)
  12. * Japanese (based on anthy)
  13. * Korean (based on libhangul)
  14. * Various languages (based on m17n)
  15. * Service Modules:
  16. * Indicator (based on appindicator)
  17. * Wayland
  18. * NIM (Nimf Input Method)
  19. * XIM (based on IMdkit)
  20. * Preedit window
  21. * Candidate
  22. * Client Modules:
  23. * GTK+2, GTK+3, Qt5
  24. * Settings tool to configure the Nimf:
  25. * nimf-settings
  26. * Development files:
  27. * C library, headers and documents
  28. Project Homepage:
  29. * https://github.com/hamonikr/nimf
  30. License
  31. -------
  32. Nimf is free software: you can redistribute it and/or modify it
  33. under the terms of the GNU Lesser General Public License as published
  34. by the Free Software Foundation, either version 3 of the License, or
  35. (at your option) any later version.
  36. Nimf is distributed in the hope that it will be useful, but
  37. WITHOUT ANY WARRANTY; without even the implied warranty of
  38. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  39. See the GNU Lesser General Public License for more details.
  40. You should have received a copy of the GNU Lesser General Public License
  41. along with this program; If not, see <http://www.gnu.org/licenses/>.
  42. Downloads
  43. ---------
  44. Download latest snapshot of the current master branch
  45. * Clone with HTTPS
  46. git clone https://github.com/hamonikr/nimf/nimf.git
  47. * Download tar.gz
  48. https://github.com/hamonikr/nimf/archive/master/nimf-master.tar.gz
  49. Compiling and installing
  50. ------------------------
  51. * Debian, Ubuntu, Kubuntu
  52. First of all, install devscripts, build-essential, debhelper.
  53. username:~$ sudo apt install devscripts build-essential debhelper
  54. After installing devscripts, build-essential perform the following commands.
  55. username:~$ cd
  56. username:~$ mkdir tmp-build
  57. username:~$ cd tmp-build
  58. username:~/tmp-build$ wget https://github.com/hamonikr/nimf/archive/master/nimf-master.tar.gz
  59. username:~/tmp-build$ tar zxf nimf-master.tar.gz
  60. username:~/tmp-build$ cd nimf-master
  61. username:~/tmp-build/nimf-master$ dpkg-checkbuilddeps
  62. You may see something like:
  63. dpkg-checkbuilddeps: Unmet build dependencies: some-package1 some-package2 ...
  64. Install all dependent packages and perform the following commands.
  65. username:~/tmp-build/nimf-master$ debuild -b -uc -us
  66. username:~/tmp-build/nimf-master$ cd ..
  67. username:~/tmp-build$ ls
  68. libnimf1_YYYY.mm.dd_amd64.deb
  69. libnimf1-dbgsym_YYYY.mm.dd_amd64.deb
  70. nimf_YYYY.mm.dd_amd64.build
  71. nimf_YYYY.mm.dd_amd64.buildinfo
  72. nimf_YYYY.mm.dd_amd64.changes
  73. nimf_YYYY.mm.dd_amd64.deb
  74. nimf_YYYY.mm.dd.dsc
  75. nimf_YYYY.mm.dd.tar.xz
  76. nimf-anthy_YYYY.mm.dd_amd64.deb
  77. nimf-anthy-dbgsym_YYYY.mm.dd_amd64.deb
  78. nimf-dbgsym_YYYY.mm.dd_amd64.deb
  79. nimf-dev_YYYY.mm.dd_amd64.deb
  80. nimf-libhangul_YYYY.mm.dd_amd64.deb
  81. nimf-libhangul-dbgsym_YYYY.mm.dd_amd64.deb
  82. nimf-m17n_YYYY.mm.dd_amd64.deb
  83. nimf-m17n-dbgsym_YYYY.mm.dd_amd64.deb
  84. nimf-master
  85. nimf-rime_YYYY.mm.dd_amd64.deb
  86. nimf-rime-dbgsym_YYYY.mm.dd_amd64.deb
  87. Install deb packages.
  88. username:~/tmp-build$ sudo dpkg -i nimf_YYYY.mm.dd_amd64.deb \
  89. libnimf1_YYYY.mm.dd_amd64.deb nimf-anthy_YYYY.mm.dd_amd64.deb \
  90. nimf-libhangul_YYYY.mm.dd_amd64.deb nimf-m17n_YYYY.mm.dd_amd64.deb \
  91. nimf-rime_YYYY.mm.dd_amd64.deb
  92. * CentOS
  93. Open the terminal and run the following commands step by step.
  94. wget https://gitlab.com/nimf-i18n/nimf/-/archive/master/nimf-master.tar.bz2
  95. tar -jxvf nimf-master.tar.bz2
  96. NIMF_VERSION=`grep AC_INIT nimf-master/configure.ac | \
  97. grep -Po '\d{4}.\d{2}.\d{2}'`
  98. cp -r nimf-master nimf-$NIMF_VERSION
  99. tar -jcvf nimf-master.tar.bz2 nimf-$NIMF_VERSION
  100. mkdir -p rpmbuild/SOURCES
  101. cp -f nimf-master.tar.bz2 rpmbuild/SOURCES
  102. sudo yum install epel-release
  103. sudo yum install gcc-c++ libtool glib2-devel pkgconfig intltool \
  104. gtk3-devel gtk2-devel qt5-qtbase-devel qt5-qtbase-private-devel \
  105. libappindicator-gtk3-devel librsvg2-tools google-noto-cjk-fonts \
  106. libhangul-devel anthy-devel anthy libxkbcommon-devel wayland-devel \
  107. libxklavier-devel gtk-doc
  108. rpmbuild -bb nimf-master/nimf.spec
  109. ls -R rpmbuild/RPMS/
  110. sudo yum install \
  111. rpmbuild/RPMS/`uname -m`/nimf-YYYY.mm.dd-1.el7.`uname-m`.rpm
  112. * Other Linux distributions
  113. There are configuration options. Use it for your situation.
  114. --disable-hardening Disable hardening
  115. --disable-nimf-anthy Disable nimf-anthy
  116. --disable-nimf-m17n Disable nimf-m17n
  117. --disable-nimf-rime Disable nimf-rime
  118. --with-im-config-data Install im-config data
  119. --with-imsettings-data Install imsettings data
  120. Open the terminal and run the following commands step by step.
  121. username:~$ cd
  122. username:~$ mkdir tmp-build
  123. username:~$ cd tmp-build
  124. username:~/tmp-build$ wget https://gitlab.com/nimf-i18n/nimf/-/archive/master/nimf-master.tar.gz
  125. username:~/tmp-build$ tar zxf nimf-master.tar.gz
  126. username:~/tmp-build$ cd nimf-master
  127. If you are using im-config
  128. ./autogen.sh --with-im-config-data
  129. If you are using im-chooser
  130. ./autogen.sh --with-imsettings-data
  131. Otherwise
  132. ./autogen.sh
  133. make
  134. sudo make install
  135. sudo ldconfig
  136. sudo make update-gtk-im-cache
  137. sudo make update-gtk-icon-cache
  138. To uninstall nimf, run the following command.
  139. sudo make uninstall
  140. Configure
  141. ---------
  142. * For GNOME Shell, use 3rd party gnome-shell-extension-appindicator
  143. https://github.com/ubuntu/gnome-shell-extension-appindicator
  144. https://extensions.gnome.org/extension/615/appindicator-support/
  145. * How to enable Nimf on systems using im-config
  146. im-config -n nimf
  147. * How to enable Nimf on systems using im-chooser
  148. imsettings-switch nimf
  149. * How to enable Nimf on systems using systemd v233 or later
  150. Run nimf-settings.
  151. Turn on the "Setup environment variables" option in the Nimf menu.
  152. Debugging
  153. ---------
  154. nimf --debug
  155. nimf-settings --gapplication-service & # for nimf-indicator
  156. tail -f /var/log/daemon.log # or /var/log/syslog
  157. export GTK_IM_MODULE="nimf"
  158. export QT4_IM_MODULE="xim"
  159. export QT_IM_MODULE="nimf"
  160. export XMODIFIERS="@im=nimf"
  161. export G_MESSAGES_DEBUG=nimf
  162. gedit # or kate for Qt
  163. Participate
  164. -----------
  165. * Development
  166. You may send pull requests.
  167. https://github.com/hamonikr/nimf/pulls
  168. * Translation
  169. You can make nimf.pot using the following commands.
  170. git clone https://github.com/hamonikr/nimf/nimf.git
  171. cd nimf
  172. ./autogen.sh
  173. cd po
  174. make nimf.pot
  175. Then, you may translate nimf.pot into your native language.
  176. References
  177. ----------
  178. * APIs
  179. http://www.x.org/releases/X11R7.6/doc/libX11/specs/XIM/xim.html
  180. http://www.w3.org/TR/ime-api/
  181. https://developer.chrome.com/extensions/input_ime
  182. https://docs.enlightenment.org/stable/efl/group__Ecore__IMF__Lib__Group.html
  183. http://doc.qt.io/qt-4.8/qinputcontext.html
  184. http://doc.qt.io/qt-5/qinputmethod.html
  185. https://git.gnome.org/browse/gtk+/tree/gtk/gtkimcontext.c
  186. * Language Engines (alphabetically listed)
  187. http://anonscm.debian.org/cgit/collab-maint/anthy.git
  188. https://github.com/libhangul/libhangul
  189. https://github.com/rime/librime
  190. https://www.nongnu.org/m17n/
  191. * Implementations
  192. https://github.com/libhangul/nabi
  193. https://github.com/libhangul/imhangul
  194. https://github.com/libhangul/ibus-hangul
  195. https://github.com/ibus/ibus
  196. https://github.com/fcitx/fcitx
  197. https://github.com/fcitx/fcitx-qt5
  198. https://github.com/uim/uim