关于Rime,还有一点事……

嗯,没错,这次因为受不了之前的配置,又改了一堆配置,甚至为了好看到官网那种效果,我还准备了一手编译……

Squirrel

总算是改好了Rime的配置与词库,强行让我重新编译了一波呢(
现在可算是好看多了,就是长短语/短句输入会比较卡,还好我是比较偏向词输入的
https://t.co/7hhb7KZxzW

操作步骤

首先当然是要备份一下源文件了

Backup settings
1
cp -a ~/Library/Rime ~/Library/Rime_ori_$(date +%Y%m%d%H%M%S)

安装并启动 XCode,确认一下条款 (光有 Command Line Tool 是不行的)。

从输入法中删去鼠须管(不需要卸载)。

接着,安装一些需要用到的包:

Build dependencies
1
2
3
4
5
6
7
sudo xcode-select --reset
sudo xcodebuild -license
brew install cmake git boost
git clone --recursive https://github.com/rime/squirrel.git
make deps
make
sudo make install

接下来,按 ⇧+⌘+Q 注销一下,重新登入,然后将鼠须管再加入输入法选单,点击「部署」即可。

关于配置的话我就贴一下我这个图里配置的样式,供大家参考:

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
# squirrel.custom.yaml
# encoding: utf-8
patch:
preset_color_schemes:
selfae:
name: "Selfae"
author: "Jason <[email protected]>"
horizontal: false # 候选条横向显示
inline_preedit: true # 启用内嵌编码模式,候选条首行不显示拼音
candidate_format: "%c.\u2005%@\u2005" # 用 1/6 em 空格 U+2005 来控制编号 %c 和候选词 %@ 前后的空间。
corner_radius: 6 # 候选条圆角半径
border_height: 0 # 窗口边界高度,大于圆角半径才生效
border_width: 12 # 窗口边界宽度,大于圆角半径才生效
back_color: 0xFFFFFF # 候选条背景色
line_spacing: 5 # 候选词的行间距
# spacing: 3 # 在非内嵌编码模式下,预编辑和候选词之间的间距
border_color: 0xE0B693 # 边框色
font_face: "PingFangSC-Regular" # 候选词字体
font_point: 18 # 预选栏文字字号
label_font_face: "PingFangSC-Regular" # 候选词编号字体
label_font_point: 20 # 预选栏编号字号
text_color: 0xFFFFFF # HEX颜色代码,但是要注意顺序是蓝绿红(倒序)0xBBGGRR
candidate_text_color: 0x000000 #非第一候选项
hilited_candidate_back_color: 0xD98840 #第一候选项背景
hilited_candidate_text_color: 0xFFFFFF #第一候选项

排错

提示 No CMAKE_C_COMPILER could be found.

那就是 C++ 和 CC 包没找到的问题啦,很简单的。

首先用下面两个命令找一下包的位置:

Locate package position
1
2
xcrun -find c++
xcrun -find cc

接下来,导出这两个路径就可以了。之后再次 make 就行啦。

提示 Terminating app due to uncaught exception xxx

我这边是遇到了提示

Build error
1
2
3
4
5
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Error getting value for parameter key 'name' of extension 'Xcode.InterfaceBuilderKit.CocoaTouchIntegration.Singletons' in plug-in 'com.apple.dt.IDE.IDEInterfaceBuilderCocoaTouchIntegration''

...snip...

Command /Applications/Xcode.app/Contents/Developer/usr/bin/actool failed with exit code 6

一般是缺失了一些编译用到的文件,可以通过装 XcodeSystemResources.pkg 这个包来解决,或者直接去 /Applications/Xcode-beta.app/Contents/Resources/Packages 这个目录里直接双击 XcodeSystemResources.pkg 按提示安装就可以。

Install XcodeSystemResources
1
installer -stroe -pkg /Applications/Xcode-beta.app/Contents/Resources/Packages/XcodeSystemResources.pkg -target /

安装之后再次 Make。

关于Rime,还有一点事……

https://blog.dwx.io/more-rime/

Author

Jason

Posted on

09/11/17

Updated on

10/12/20

Licensed under

Comments

Your browser is out-of-date!

Update your browser to view this website correctly.&npsb;Update my browser now

×