Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fcitx-contrib/fcitx5-macos
Fcitx5 macOS edition, currently public beta. 小企鹅输入法 macOS 公测 https://t.me/fcitx5macos qq: 874450150
https://github.com/fcitx-contrib/fcitx5-macos
fcitx5 input-method mozc rime
Last synced: 2 months ago
JSON representation
Fcitx5 macOS edition, currently public beta. 小企鹅输入法 macOS 公测 https://t.me/fcitx5macos qq: 874450150
- Host: GitHub
- URL: https://github.com/fcitx-contrib/fcitx5-macos
- Owner: fcitx-contrib
- License: gpl-3.0
- Created: 2023-12-23T17:53:01.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-10-30T00:04:48.000Z (3 months ago)
- Last Synced: 2024-10-30T00:44:07.161Z (3 months ago)
- Topics: fcitx5, input-method, mozc, rime
- Language: Swift
- Homepage:
- Size: 1.12 MB
- Stars: 116
- Watchers: 2
- Forks: 8
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- my-awesome - fcitx-contrib/fcitx5-macos - method,mozc,rime pushed_at:2025-01 star:0.2k fork:0.0k Fcitx5 macOS edition, currently public beta. 小企鹅输入法 macOS 公测 https://t.me/fcitx5macos qq: 874450150 (Swift)
README
English
|
[中文](README.zh-CN.md)# Fcitx5 macOS
[Fcitx5](https://github.com/fcitx/fcitx5) input method framework ported to macOS.
Public beta: please download [installer](https://github.com/fcitx-contrib/fcitx5-macos-installer).
## Build
Native build on Intel and Apple Silicon is supported.This is NOT an Xcode project,
but Xcode is needed for Swift compiler.### Install dependencies
You may use [nvm](https://github.com/nvm-sh/nvm)
to install node, then```sh
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
brew install cmake ninja extra-cmake-modules gettext nlohmann-json librsvg
./scripts/install-deps.sh # Required to re-run after rebooting
npm i -g pnpm
pnpm --prefix=fcitx5-webview i
```### Build with CMake
```sh
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug
cmake --build build
sudo cmake --install build
```
After the first time you execute `cmake --install`, you need to logout and login,
then add Fcitx5 in System Setttings -> Keyboard -> Input Sources, Chinese Simplified.For installations afterwards, clicking `Restart` in Fcitx5 menu suffices.
You can also use `Cmd+Shift+B` in VSCode to execute a task.
### Code sign
Some features (e.g. notifications, core dump) require the app bundle be code-signed after installation:
```sh
./scripts/code-sign.sh
```## Debug
### Console.app
* Check `Include Info Messages` and `Include Debug Messages` in `Action` menu.
* Put `FcitxLog` in `Search`.### Log
`/tmp/Fcitx5.log` contains all log in Console.app,
plus those written to stderr by engines, e.g. rime.### lldb
SSH into the mac from another device, then
```sh
$ /usr/bin/lldb
(lldb) process attach --name Fcitx5
```### Core dump
```sh
sudo chmod 1777 /cores
sudo sysctl kern.coredump=1
ulimit -c unlimited # only works for current shell
pkill Fcitx5; /Library/Input\ Methods/Fcitx5.app/Contents/MacOS/Fcitx5
```When Fcitx5 crashes, it creates a ~10GB core file under `/cores`.
```sh
/usr/bin/lldb -c /cores/core.XXXX
(lldb) bt
```## Plugins
Fcitx5 only packages keyboard engine.
To install other [engines](https://github.com/fcitx-contrib/fcitx5-macos-plugins),
use the built-in Plugin Manager.## Translation
### Swift sources
To update .strings files for each supported locale, run
```sh
cmake --build build --target GenerateStrings
```This will, e.g., update assets/zh-Hans/Localizable.strings, and then the translator can work on it.
### C++ sources
First, create assets/po/base.pot file:
```sh
cmake --build build --target pot
```To add a new language, do
```sh
cd assets/po && msginit
```
and then add this locale to assets/CMakeLists.txt.Then, use a PO file editor to translate strings.
Finally, to merge new strings into PO files, do
```sh
cd assets/po && msgmerge -U .po base.pot
```## Credits
* [fcitx5](https://github.com/fcitx/fcitx5): LGPL-2.1-or-later
* [fcitx5-android](https://github.com/fcitx5-android/fcitx5-android): LGPL-2.1-or-later
* [squirrel](https://github.com/rime/squirrel): GPL-3.0-only
* [swift-cmake-examples](https://github.com/apple/swift-cmake-examples): Apache-2.0
* [SwiftyJSON](https://github.com/SwiftyJSON/SwiftyJSON): MIT
* [AlertToast](https://github.com/elai950/AlertToast): MIT
* [pugixml](https://github.com/zeux/pugixml): MIT
* [webview](https://github.com/webview/webview): MIT