uechi.io/source/_posts/2022/building-mozc-for-macos.md

38 lines
712 B
Markdown
Raw Normal View History

2022-05-20 13:18:51 +09:00
---
title: Building mozc for macOS
date: 2022-05-20T00:00:00
---
[Mozc](https://github.com/google/mozc) is an open-source counterpart of Google Japanese Input, a Japanese input method developed by Google.
2022-12-24 03:20:02 +09:00
## Build environment
2022-05-20 13:18:51 +09:00
```
$ sw_vers
ProductName: macOS
2022-12-24 03:20:02 +09:00
ProductVersion: 12.6.1
BuildVersion: 21G217
2022-05-20 13:18:51 +09:00
$ xcodebuild -version
2022-12-24 03:20:02 +09:00
Xcode 14.1
Build version 14B47b
2022-05-20 13:18:51 +09:00
```
2022-12-24 03:20:02 +09:00
## Build mozc
2022-05-20 13:18:51 +09:00
```bash
# Install dependencies
2022-12-24 03:20:02 +09:00
brew install qt@5 bazel packages
2022-05-20 13:18:51 +09:00
# Clone the repository
git clone https://github.com/google/mozc -b master --single-branch --recursive
2022-12-24 03:20:02 +09:00
# Build
2022-05-20 13:18:51 +09:00
cd mozc/src
2022-12-24 03:20:02 +09:00
MOZC_QT_PATH=/usr/local/opt/qt@5 ANDROID_NDK_HOME= bazel build package --config macos -c opt
2022-05-20 13:18:51 +09:00
# Install
2022-12-24 03:20:02 +09:00
open bazel-bin/mac/Mozc.pkg
2022-05-20 13:18:51 +09:00
reboot
```