forked from rime/librime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
64 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
Rime with Mac | ||
=== | ||
|
||
Preparation | ||
--- | ||
|
||
Install Xcode with command line tools. | ||
|
||
Install other build tools: | ||
``` sh | ||
brew install cmake | ||
brew install git | ||
``` | ||
|
||
Install Boost: | ||
``` sh | ||
brew install boost | ||
``` | ||
|
||
You can also manually download and build Boost libraries from source code, then set `BOOST_ROOT` to the path of its top level directory prior to building librime. | ||
|
||
Get the code | ||
--- | ||
``` sh | ||
git clone [email protected]:lotem/librime.git | ||
``` | ||
or [download from github](https://github.com/lotem/librime). | ||
|
||
Build third-party libraries | ||
--- | ||
``` sh | ||
cd librime | ||
make -f Makefile.xcode thirdparty | ||
``` | ||
This builds dependent libraries in `thirdparty/src/*`, and copies artifacts to `thirdparty/lib` and `thirdparty/bin`. | ||
|
||
You can build an individual library, eg. opencc, with: | ||
``` sh | ||
make -f Makefile.xcode thirdparty/opencc | ||
``` | ||
|
||
Build librime | ||
--- | ||
``` sh | ||
make -f Makefile.xcode | ||
``` | ||
This creates `xbuild/lib/Release/librime.dylib` and command line tools `xbuild/bin/Release/rime_*`. | ||
|
||
Or, make a debug build. This also creates a test in `xdebug/test/`. | ||
``` sh | ||
make -f Makefile.xcode debug | ||
# run the test | ||
(cd xdebug/test; ./Debug/rime_test) | ||
``` | ||
|
||
Try it in the console | ||
--- | ||
``` sh | ||
(cd xdebug/bin; echo "congmingdeRime{space}shurufa" | Debug\rime_api_console) | ||
|
||
# REPL, quit with Control+d | ||
(cd xdebug/bin; ./Debug/rime_api_console) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters