batermj / mozc-1

A mirror repository of Mozc, an open source Japanese input method made by Google.

Home Page:http://code.google.com/p/mozc/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mozc

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.

Build Instructions for Android on Mac

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.

  1. Install the latest Vagrant, VirtualBox and VirualBox Extension Pack. I've tested with Vagrant 1.5.2, VirtualBox 4.3.10 and Extension Pack

  2. Checkout source code from this repository using git command.

  3. Run vagrant up in the repository directory.

  4. 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.

  5. 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
    
  6. Mozc for Android is built at src/android/bin/MozcForAndroid-debug.apk, so you can install this apk using adb command on your host machine or directly from the virtual machine.

Install apk 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.

  1. Run VBoxManage list usbhost to get UUID of your Android device. Find the device form the long list and remember the UUID.

  2. Attach the device to the virtual machine. Run VBoxManage list vms, find the virtual machine ID starts with mozc, then run next command with it.

    % VBoxManage controlvm <virutal machine ID> usbattach <UUID>
    
  3. 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
    

Build Instructions for Mac

  1. Checkout source code from this repository using git command.

  2. Run checkout_externals.py instead of running gclient command described in the original instructions.

  3. 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
    

About

A mirror repository of Mozc, an open source Japanese input method made by Google.

http://code.google.com/p/mozc/


Languages

Language:C++ 70.9%Language:Java 14.4%Language:Python 7.5%Language:JavaScript 1.8%Language:HTML 1.5%Language:Objective-C++ 1.4%Language:Objective-C 0.9%Language:C 0.7%Language:Emacs Lisp 0.5%Language:CSS 0.2%Language:Makefile 0.0%Language:Shell 0.0%Language:Yacc 0.0%Language:Puppet 0.0%Language:QMake 0.0%