Skip to content

Latest commit

 

History

History
75 lines (52 loc) · 1.99 KB

README-windows.md

File metadata and controls

75 lines (52 loc) · 1.99 KB

Rime with Windows

Prerequisites

librime is tested to work on Windows with the following combinations of build tools and libraries:

and

Boost and cmake versions need to match higher VS version.

Python>=2.7 is needed to build opencc dictionaries.

Get the code

git clone --recursive https://github.com/rime/librime.git

or download from GitHub.

Setup a build environment

Copy env.bat.template to env.bat and edit the file according to your setup. Specifically, make sure BOOST_ROOT is set to the root directory of Boost source tree; modify BJAM_TOOLSET, CMAKE_GENERATOR and PLATFORM_TOOLSET if using a different version of Visual Studio; also set DEVTOOLS_PATH for build tools installed to custom location.

When prepared, do the following in a Developer Command Prompt window.

Build Boost

build.bat boost

Build third-party libraries

build.bat deps

This builds dependent libraries in librime\deps\*, and copies artifacts to librime\include, librime\lib and librime\bin.

Build librime

build.bat librime

This creates build\lib\Release\rime.dll.

Build artifacts - the shared library along with API headers and supporting files are gathered in dist directory.

Try it in the console

librime comes with a REPL application which can be used to test if the library is working.

copy /Y build\lib\Release\rime.dll build\bin
cd build\bin
echo congmingdeRime{space}shurufa | Release\rime_api_console.exe > output.txt

Instead of redirecting output to a file, you can set appropriate code page (chcp 65001) and font in the console to work with the REPL interactively.