Mozc is an open source Japanese input method for Chromium OS, Mac and Linux developed by Google, Inc. Their Google日本語入力 is the original product of Mozc which supports Windows as well.
Mozc is open sourced under New BSD License but unfortunately, they can't commit any patches written by non-Google employee, so far, which is not like the relationship between Chrome and Chromium.
Since this limitation of Mozc project, I've checked out the code from the original SVN repository then mirror it to this Git repository to commit my patches. I'll keep sync this repo to original SVN repository but this synchronization is done by hand so you may prefer to use the original repository then fetch my patches from here.
Also, I've filed these patches to the original issue tracking list so that they can, in future, merge them into the original repository.
To build Mozc for Android, for now, we need to use Ubuntu 12.04 but setting up such development environment takes long time and many hassles. This repository provides an additional Vagrant configuration and a Puppet manifest so that we can build Mozc for Android quickly.
-
Install the latest Vagrant, VirtualBox and VirualBox Extension Pack. I've tested with Vagrant 1.5.2, VirtualBox 4.3.10 and Extension Pack
-
Checkout source code from this repository using
git
command. -
Run
vagrant up
in the repository directory. -
Grab a cup of coffee. This command will download Ubuntu 12.04, setup a virtual machine, install packages, Android SDK and NDK, etc, etc which will take a long time.
-
Once it's done, run next commands to build Mozc.
# Connect to the virtual machine. % vagrant ssh # Current working Mozc directory is mounted to /vagrant. $ cd /vagrant # Build Mozc for Android. $ sh build_android.sh
-
Mozc for Android is built at
src/android/bin/MozcForAndroid-debug.apk
, so you can install this apk usingadb
command on your host machine or directly from the virtual machine.
To install binary from the virtual machine, we need to connect the device into the virtual machine instead of the host machine.
-
Run
VBoxManage list usbhost
to get UUID of your Android device. Find the device form the long list and remember the UUID. -
Attach the device to the virtual machine. Run
VBoxManage list vms
, find the virtual machine ID starts withmozc
, then run next command with it.% VBoxManage controlvm <virutal machine ID> usbattach <UUID>
-
In the virtual machine, run next commands to install the apk to the device.
# Connect to the virtual machine. % vagrant ssh # Restart adb server to lookup the device. $ sudo adb kill-server $ sudo adb start-server $ adb devices # Install the apk $ cd /vagrant $ adb install src/android/bin/MozcForAndroid-debug.apk
-
Checkout source code from this repository using
git
command. -
Run
checkout_externals.py
instead of runninggclient
command described in the original instructions. -
Follow instructions. My build instruction is:
# Checkout dependencies. % python checkout_externals.py mac # Build Mozc itself. % cd src % python build_mozc.py clean && python build_mozc.py gyp --noqt % python build_mozc.py build_tools -c Debug % python build_mozc.py build -c Debug mac/mac.gyp:GoogleJapaneseInput mac/mac.gyp:gen_launchd_confs # Then, install Mozc into /Library then kill existing processes. # which requires root priviledge. % sudo sh ../install_mac.sh