• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

cmake/H11-Feb-2021-311263

data/H11-Feb-2021-114,133114,057

doc/H03-May-2022-2,3111,782

plugins/H03-May-2022-10881

proto/H03-May-2022-5849

sample/H03-May-2022-622484

src/H03-May-2022-31,42225,757

test/H03-May-2022-2,1361,775

thirdparty/H11-Feb-2021-5,5754,363

tools/H03-May-2022-914775

.gitignoreH A D11-Feb-2021176 1615

.gitmodulesH A D11-Feb-2021808 2221

.lvimrcH A D11-Feb-2021312 54

.npmrcH A D11-Feb-202158 32

.travis.ymlH A D11-Feb-20211.4 KiB4948

.ycm_extra_conf.pyH A D11-Feb-20215.9 KiB16886

CHANGELOG.mdH A D11-Feb-202132.9 KiB564389

DockerfileH A D11-Feb-2021934 4437

LICENSEH A D11-Feb-20211.5 KiB3125

MakefileH A D11-Feb-20211.6 KiB8261

README-mac.mdH A D11-Feb-20212.9 KiB13592

README-windows.mdH A D11-Feb-20212 KiB7652

README.mdH A D11-Feb-20214.4 KiB129111

appveyor.install.batH A D11-Feb-2021611 3123

appveyor.ymlH A D11-Feb-20211.8 KiB7561

appveyor_build_boost.batH A D11-Feb-2021844 4738

appveyor_build_thirdparty.batH A D11-Feb-2021785 3930

build.batH A D11-Feb-20217 KiB276234

bump-version.shH A D11-Feb-2021270 137

env.bat.templateH A D11-Feb-2021495 1510

install-boost.shH A D11-Feb-20211.3 KiB4131

install-plugins.shH A D11-Feb-2021408 1814

package-lock.jsonH A D11-Feb-202142.5 KiB1,2101,209

package.jsonH A D11-Feb-2021630 2827

rime-new-plugin.shH A D11-Feb-20212.1 KiB9159

rime.pc.inH A D11-Feb-2021253 1311

thirdparty.mkH A D11-Feb-20212.3 KiB8468

travis-install-linux.shH A D11-Feb-2021434 2218

travis-install-osx.shH A D11-Feb-2021102 74

travis-install.shH A D11-Feb-2021456 1812

xcode.mkH A D11-Feb-20212.4 KiB9669

README-mac.md

1# Rime with Mac
2
3## Preparation
4
5Install Xcode with command line tools.
6
7Install other build tools:
8
9``` sh
10brew install cmake git
11```
12
13## Get the code
14
15``` sh
16git clone --recursive https://github.com/rime/librime.git
17```
18or [download from GitHub](https://github.com/rime/librime), then get code for
19third party dependencies separately.
20
21## Install Boost C++ libraries
22
23Boost is a third-party library which librime code heavily depend on.
24These dependencies include a few compiled (non-header-only) Boost libraries.
25
26**Option 1 (recommended):** Download and build Boost from source.
27
28``` sh
29cd librime
30make xcode/thirdparty/boost
31```
32
33The make script will download Boost source tarball, extract it to
34`librime/thirdparty/src/boost_<version>` and create needed static libraries
35for building macOS uinversal binary.
36
37Set shell variable `BOOST_ROOT` to the path to `boost_<version>` directory prior
38to building librime.
39
40``` sh
41export BOOST_ROOT="$(pwd)/thirdparty/src/boost_1_75_0"
42```
43
44**Option 2:** Install Boost libraries from Homebrew.
45
46``` sh
47brew install boost
48```
49
50This is a time-saving option if you are building and installing Rime only for your
51own Mac computer.
52
53Built with Homebrewed version of Boost, the `librime` binary will not be
54portable to machines without certain Homebrew formulae installed.
55
56**Option 3:** Install an older version of Boost libraries from Homebrew.
57
58Starting from version 1.68, `boost::locale` library from Homebrew depends on
59`icu4c`, which is not provided by macOS.
60
61Make target `xcode/release-with-icu` tells cmake to link to ICU libraries
62installed locally with Homebrew. This is only required if building with the
63[`librime-charcode`](https://github.com/rime/librime-charcode) plugin.
64
65To make a portable build with this plugin, install an earlier version of
66`boost` that wasn't dependent on `icu4c`:
67
68``` sh
69brew install boost@1.60
70brew link --force boost@1.60
71```
72
73## Build third-party libraries
74
75Required third-party libraries other than Boost are included as git submodules:
76
77``` sh
78# cd librime
79
80# if you haven't checked out the submodules with git clone --recursive ..., do:
81# git submodule update --init
82
83make xcode/thirdparty
84```
85
86This builds libraries located at `thirdparty/src/*`, and installs the build
87artifacts to `thirdparty/include`, `thirdparty/lib` and `thirdparty/bin`.
88
89You can also build an individual library, eg. `opencc`, with:
90
91``` sh
92make xcode/thirdparty/opencc
93```
94
95## Build librime
96
97``` sh
98make xcode
99```
100This creates `build/lib/Release/librime*.dylib` and command line tools
101`build/bin/Release/rime_*`.
102
103Or, create a debug build:
104
105``` sh
106make xcode/debug
107```
108
109## Run unit tests
110
111``` sh
112make xcode/test
113```
114
115Or, test the debug build:
116
117``` sh
118make xcode/test-debug
119```
120
121## Try it in the console
122
123``` sh
124(
125  cd debug/bin;
126  echo "congmingdeRime{space}shurufa" | Debug/rime_api_console
127)
128```
129
130Use it as REPL, quit with <kbd>Control+d</kbd>:
131
132``` sh
133(cd debug/bin; ./Debug/rime_api_console)
134```
135

README-windows.md

1# Rime with Windows
2
3## Prerequisites
4
5`librime` is tested to work on Windows with the following combinations of build
6tools and libraries:
7
8  - Visual Studio 2017
9  - [Boost](http://www.boost.org/)=1.64
10  - [cmake](http://www.cmake.org/)>=3.8
11
12and
13
14  - Visual Studio 2015
15  - [Boost](http://www.boost.org/)=1.60
16  - [cmake](http://www.cmake.org/)>=3.8
17
18Boost and cmake versions need to match higher VS version.
19
20[Python](https://python.org)>=2.7 is needed to build opencc dictionaries.
21
22## Get the code
23
24``` batch
25git clone --recursive https://github.com/rime/librime.git
26```
27or [download from GitHub](https://github.com/rime/librime).
28
29## Setup a build environment
30
31Copy `env.bat.template` to `env.bat` and edit the file according to your setup.
32Specifically, make sure `BOOST_ROOT` is set to the root directory of Boost
33source tree; modify `BJAM_TOOLSET`, `CMAKE_GENERATOR` and `PLATFORM_TOOLSET` if
34using a different version of Visual Studio; also set `DEVTOOLS_PATH` for build
35tools installed to custom location.
36
37When prepared, do the following in a *Developer Command Prompt* window.
38
39## Build Boost
40
41``` batch
42build.bat boost
43```
44
45## Build third-party libraries
46
47``` batch
48build.bat thirdparty
49```
50This builds dependent libraries in `thirdparty\src\*`, and copies artifacts to
51`thirdparty\lib` and `thirdparty\bin`.
52
53## Build librime
54
55``` batch
56build.bat librime
57```
58This creates `build\lib\Release\rime.dll`.
59
60Build artifacts - the shared library along with API headers and supporting files
61are gathered in `dist` directory.
62
63## Try it in the console
64
65`librime` comes with a REPL application which can be used to test if the library
66is working.
67
68``` batch
69copy /Y build\lib\Release\rime.dll build\bin
70cd build\bin
71echo congmingdeRime{space}shurufa | Release\rime_api_console.exe > output.txt
72```
73
74Instead of redirecting output to a file, you can set appropriate code page
75(`chcp 65001`) and font in the console to work with the REPL interactively.
76

README.md

1<meta charset="UTF-8">
2
3RIME: Rime Input Method Engine
4===
5[![Build Status](https://travis-ci.org/rime/librime.svg)](https://travis-ci.org/rime/librime)
6[![Build status](https://ci.appveyor.com/api/projects/status/github/rime/librime?svg=true)](https://ci.appveyor.com/project/rime/librime)
7[![GitHub release](https://img.shields.io/github/release/rime/librime.svg)](https://github.com/rime/librime/releases)
8[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
9
10Rime with your keystrokes.
11
12Project home
13---
14[rime.im](https://rime.im)
15
16License
17---
18[The 3-Clause BSD License](https://opensource.org/licenses/BSD-3-Clause)
19
20Features
21===
22  - A modular, extensible input method engine in cross-platform C++ code,
23    built on top of open-source technologies
24  - Covering features found in a large variety of Chinese input methods,
25    either shape-based or phonetic-based
26  - Built with native support for Traditional Chinese, conversion to Simplified
27    Chinese and other regional standards via OpenCC
28  - Rime input schema, a DSL in YAML syntax for fast trying out innovative ideas
29    of input method design
30  - Spelling Algebra, a mechanism to create variant spelling, especially useful
31    for Chinese dialects
32  - Support for chord-typing with a generic Qwerty keyboard
33
34Install
35===
36Follow the instructions to build librime on platforms other than Linux:
37  - [macOS](https://github.com/rime/librime/tree/master/README-mac.md)
38  - [Windows](https://github.com/rime/librime/tree/master/README-windows.md)
39
40Build dependencies
41---
42  - compiler with C++14 support
43  - capnproto>=0.7.0
44  - cmake>=2.8
45  - libboost>=1.48
46  - libcapnp>=0.7.0
47  - libglog (optional)
48  - libleveldb
49  - libmarisa
50  - libopencc>=1.0.2
51  - libyaml-cpp>=0.5
52  - libgtest (optional)
53
54Runtime dependencies
55---
56  - libboost
57  - libcapnp
58  - libglog (optional)
59  - libleveldb
60  - libmarisa
61  - libopencc
62  - libyaml-cpp
63
64Build and install librime on Linux
65---
66```
67make
68sudo make install
69```
70
71Frontends
72===
73
74Official:
75  - [ibus-rime](https://github.com/rime/ibus-rime): IBus frontend for Linux
76  - [Squirrel](https://github.com/rime/squirrel): frontend for macOS
77  - [Weasel](https://github.com/rime/weasel): frontend for Windows
78
79Third-party:
80  - [emacs-rime](https://github.com/DogLooksGood/emacs-rime): frontend for Emacs
81  - [fcitx-rime](https://github.com/fcitx/fcitx-rime): Fcitx frontend for Linux
82  - [iRime](https://github.com/jimmy54/iRime): frontend for iOS
83  - [PIME](https://github.com/EasyIME/PIME): frontend for Windows
84  - [Trime](https://github.com/osfans/trime): frontend for Android
85  - [XIME](https://github.com/stackia/XIME): frontend for macOS
86
87Plugins
88===
89  - [librime-charcode](https://github.com/rime/librime-charcode) Module that
90    deals with character encoding; depends on boost::locale and ICU libraries
91  - [librime-legacy](https://github.com/rime/librime-legacy) Legacy module with
92    GPL-licensed code
93
94Related works
95===
96  - [plum](https://github.com/rime/plum): Rime configuration manager and input
97    schema repository
98  - [Combo Pinyin](https://github.com/rime/home/wiki/ComboPinyin): an innovative
99    chord-typing practice to input Pinyin
100  - essay: the vocabulary and language model for Rime
101  - [SCU](https://github.com/neolee/SCU): Squirrel Configuration Utilities
102
103Credits
104===
105We are grateful to the makers of the following open source libraries:
106
107  - [Boost C++ Libraries](http://www.boost.org/) (Boost Software License)
108  - [google-glog](https://github.com/google/glog) (The 3-Clause BSD License)
109  - [Google Test](https://github.com/google/googletest) (The 3-Clause BSD License)
110  - [LevelDB](https://github.com/google/leveldb) (The 3-Clause BSD License)
111  - [marisa-trie](https://github.com/s-yata/marisa-trie) (BSD 2-Clause License, LGPL 2.1)
112  - [OpenCC](https://github.com/BYVoid/OpenCC) (Apache License 2.0)
113  - [yaml-cpp](https://github.com/jbeder/yaml-cpp) (MIT License)
114
115Contributors
116===
117  - [佛振](https://github.com/lotem)
118  - [鄒旭](https://github.com/zouxu09)
119  - [Weng Xuetian](http://csslayer.info)
120  - [Chongyu Zhu](http://lembacon.com)
121  - [Zhiwei Liu](https://github.com/liuzhiwei)
122  - [BYVoid](http://www.byvoid.com)
123  - [雪齋](https://github.com/LEOYoon-Tsaw)
124  - [瑾昀](https://github.com/kunki)
125  - [osfans](https://github.com/osfans)
126  - [jakwings](https://github.com/jakwings)
127  - [Prcuvu](https://github.com/Prcuvu)
128  - [hchunhui](https://github.com/hchunhui)
129