Skip to content

Commit

Permalink
Merge pull request #300 from google/use_submodule
Browse files Browse the repository at this point in the history
Replace gclient/DEPS with git sub-modules.
  • Loading branch information
yukawa committed Sep 19, 2015
2 parents 03c3155 + 276fa5c commit e398317
Show file tree
Hide file tree
Showing 19 changed files with 65 additions and 173 deletions.
27 changes: 27 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[submodule "src/third_party/breakpad"]
path = src/third_party/breakpad
url = https://chromium.googlesource.com/breakpad/breakpad
[submodule "src/third_party/fontTools"]
path = src/third_party/fontTools
url = https://github.com/googlei18n/fonttools.git
[submodule "src/third_party/gmock"]
path = src/third_party/gmock
url = https://github.com/google/googlemock.git
[submodule "src/third_party/gtest"]
path = src/third_party/gtest
url = https://github.com/google/googletest.git
[submodule "src/third_party/gyp"]
path = src/third_party/gyp
url = https://chromium.googlesource.com/external/gyp
[submodule "src/third_party/japanese_usage_dictionary"]
path = src/third_party/japanese_usage_dictionary
url = https://github.com/hiroyuki-komatsu/japanese-usage-dictionary.git
[submodule "src/third_party/jsoncpp"]
path = src/third_party/jsoncpp
url = https://github.com/open-source-parsers/jsoncpp.git
[submodule "src/third_party/protobuf"]
path = src/third_party/protobuf
url = https://github.com/google/protobuf.git
[submodule "src/third_party/zinnia"]
path = src/third_party/zinnia
url = https://github.com/taku910/zinnia.git
18 changes: 1 addition & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,7 @@ os:
language: objective-c

install:
- git submodule add https://github.com/open-source-parsers/jsoncpp.git src/third_party/jsoncpp
- git -C src/third_party/jsoncpp checkout 11086dd6a7eba04289944367ca82cea71299ed70
- git submodule add https://github.com/google/googlemock.git src/third_party/gmock
- git -C src/third_party/gmock checkout d478a1f46d51ac2baa3f3b3896139897f24dc2d1
- git submodule add https://github.com/google/googletest.git src/third_party/gtest
- git -C src/third_party/gtest checkout 1d53731f2c210557caab5660dbe2c578dce6114f
- git submodule add https://chromium.googlesource.com/external/gyp src/third_party/gyp
- git -C src/third_party/gyp checkout cdf037c1edc0ba3b5d25f8e3973661efe00980cc
- git submodule add https://github.com/google/protobuf.git src/third_party/protobuf
- git -C src/third_party/protobuf checkout 172019c40bf548908ab09bfd276074c929d48415
- git submodule add https://github.com/hiroyuki-komatsu/japanese-usage-dictionary.git src/third_party/japanese_usage_dictionary
- git -C src/third_party/japanese_usage_dictionary checkout e5b3425575734c323e1d947009dd74709437b684
- git submodule add https://github.com/googlei18n/fonttools.git src/third_party/fontTools
- git -C src/third_party/fontTools checkout 5ba7d98a4153fad57258fca23b0bcb238717aec3
- git submodule add https://github.com/taku910/zinnia.git src/third_party/zinnia
- git -C src/third_party/zinnia checkout 44dddcf96c0970a806d666030295706f45cbd045
- git submodule add https://chromium.googlesource.com/chromium/tools/depot_tools.git src/third_party/depot_tools
- git -C src/third_party clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
- export PATH="$PATH":`pwd`/src/third_party/depot_tools

script:
Expand Down
22 changes: 2 additions & 20 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,8 @@ clone_folder: c:\projects\mozc
init:
- git config --global core.autocrlf input
install:
- git -C src\third_party clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
- set PATH=%PATH%;c:\projects\mozc\src\third_party\depot_tools
- gclient
- gclient
- git submodule add https://github.com/open-source-parsers/jsoncpp.git src/third_party/jsoncpp
- git -C src/third_party/jsoncpp checkout 11086dd6a7eba04289944367ca82cea71299ed70
- git submodule add https://github.com/google/googlemock.git src/third_party/gmock
- git -C src/third_party/gmock checkout d478a1f46d51ac2baa3f3b3896139897f24dc2d1
- git submodule add https://github.com/google/googletest.git src/third_party/gtest
- git -C src/third_party/gtest checkout 1d53731f2c210557caab5660dbe2c578dce6114f
- git submodule add https://chromium.googlesource.com/external/gyp src/third_party/gyp
- git -C src/third_party/gyp checkout cdf037c1edc0ba3b5d25f8e3973661efe00980cc
- git submodule add https://github.com/google/protobuf.git src/third_party/protobuf
- git -C src/third_party/protobuf checkout 172019c40bf548908ab09bfd276074c929d48415
- git submodule add https://github.com/hiroyuki-komatsu/japanese-usage-dictionary.git src/third_party/japanese_usage_dictionary
- git -C src/third_party/japanese_usage_dictionary checkout e5b3425575734c323e1d947009dd74709437b684
- git submodule add https://chromium.googlesource.com/breakpad/breakpad src/third_party/breakpad
- git -C src/third_party/breakpad checkout d2904bb42181bc32c17b26ac4a0604c0e57473cc
- git submodule add https://github.com/taku910/zinnia.git src/third_party/zinnia
- git -C src/third_party/zinnia checkout 44dddcf96c0970a806d666030295706f45cbd045
- git submodule update --init --recursive
- choco install ninja -version 1.6.0
build_script:
- python src\build_mozc.py gyp --noqt
- ninja -C src\out_win\Release mozc_cache_service mozc_renderer mozc_ime mozc_tip32 mozc_broker32 rewriter composer
Expand Down
9 changes: 0 additions & 9 deletions doc/build_mozc_in_docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,6 @@ sudo docker run --interactive --tty --rm $USER/mozc_fedora21
### Hint
Don't forget to rebuild Docker container when Dockerfile is updated.

### Update the source tree
If Dockerfile is not updated but GitHub Mozc repository is updated, you can fetch the latest source code as follows.

```
cd ../
gclient sync
cd src/
```

# Build in the container
Before explaining detailed build configurations and options, let's walk through the simplest cases to see how it looks like.

Expand Down
32 changes: 7 additions & 25 deletions doc/build_mozc_in_osx.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,43 +8,25 @@ We only support OS X 10.7 or later intel only.
# Software Requirements

Building on Mac requires the following software.

* Xcode
* [Ninja](https://github.com/martine/ninja)

If you don't need to run gui tools like about dialog, config dialog, or dictionary tool, you can omit installing Qt. Candidate window still shows without Qt. See below for the detailed information.

# Get the Code

First, you'll need to download the gclient depot tool, and add depot\_tools to your PATH.

```
cd ~/
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH=`pwd`/depot_tools:"$PATH"
```

Then, download the Mozc code from its SVN repository with the gclient command:
You can download Mozc source code as follows:

```
mkdir -p ~/work/mozc
cd ~/work/mozc
gclient config https://github.com/google/mozc.git --name=. --deps-file=src/DEPS
gclient sync
mkdir -p ~/work
cd ~/work
git clone https://github.com/google/mozc.git --recursive
```

This will also download source code of other programs such as googletest and Protocol Buffers.
Update to the latest revision

Execute the following command to update to the latest revision.

```
gclient sync
```

Updating the tree sometimes causes a mysterious build error. Try "build\_mozc.py clean" if it occurs.

# Compilation

First, you'll need to generate Xcode project using a tool called GYP, which is automatically downloaded by "gclient sync":
First, you'll need to generate Xcode project using a tool called [GYP](https://chromium.googlesource.com/external/gyp).

```
cd ~/work/mozc/src
Expand Down
26 changes: 12 additions & 14 deletions doc/build_mozc_in_windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,36 +13,34 @@ Building Mozc on Windows requires the following software.
* (optinal) [Qt libraries](http://download.qt.io/archive/qt/)
* Commercial version and LGPL version are available.

# Get the Code
# Get dependent prebuilt binaries

First, you'll need to download the gclient [depot\_tools](http://dev.chromium.org/developers/how-tos/install-depot-tools), and add ```depot_tools``` to your ```PATH```.
If you do not have `git`, `python 2.7`, and `ninja` in your build environment, you can use prebuilt binaries in [depot\_tools](https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html). You need to manually unzip `depot_tools.zip` and add the extracted directory into your `PATH`.

```
set PATH=%PATH%;c:\work\depot_tools
```

Then download the code:
Then run `gclient` command twice so that dependent libraries can be installed automatically.

```
mkdir c:\work\mozc
cd c:\work\mozc
gclient config https://github.com/google/mozc.git --name=. --deps-file=src/DEPS
gclient sync
gclient
gclient
```

## Update to the latest revision
# Get the Code

Execute the following command to update to the latest revision.
You can download Mozc source code as follows:

```
gclient sync
mkdir c:\work
cd c:\work
git clone https://github.com/google/mozc.git --recursive
```

Updating the tree sometimes causes a mysterious build error. Try ```build_mozc.py clean``` if it occurs.

# Compilation

First, you'll need to generate Visual C++ project files using a tool called GYP, which is automatically downloaded by ```gclient sync```:
First, you'll need to generate Visual C++ project files using a tool called [GYP](https://chromium.googlesource.com/external/gyp).

```
cd c:\work\mozc\src
Expand Down Expand Up @@ -246,4 +244,4 @@ python build_mozc.py gyp --noqt
python build_mozc.py runtests -c Release
```

Note that you can specify `--qtdir=` option instead of `--noqt' in GYP phase, currently there is no unit test that depends on Qt.
Note that you can specify `--qtdir=` option instead of `--noqt` in GYP phase since currently there is no unit test that depends on Qt.
75 changes: 0 additions & 75 deletions src/DEPS

This file was deleted.

9 changes: 3 additions & 6 deletions src/docker/fedora21/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,12 @@ RUN curl -LO http://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nac
RUN cd nacl_sdk && ./naclsdk install pepper_40
ENV NACL_SDK_ROOT /home/mozc_builder/work/nacl_sdk/pepper_40

## depot_tools
## depot_tools for Ninja prebuilt
RUN git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
ENV PATH $PATH:/home/mozc_builder/work/depot_tools

# check out Mozc source
RUN mkdir -p /home/mozc_builder/work/mozc
WORKDIR /home/mozc_builder/work/mozc
RUN gclient config https://github.com/google/mozc.git --name=. --deps-file=src/DEPS
RUN gclient sync
# check out Mozc source with submodules
RUN git clone https://github.com/google/mozc.git --recursive

WORKDIR /home/mozc_builder/work/mozc/src
ENTRYPOINT bash
9 changes: 3 additions & 6 deletions src/docker/ubuntu14.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,12 @@ RUN curl -LO http://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nac
RUN cd nacl_sdk && ./naclsdk install pepper_40
ENV NACL_SDK_ROOT /home/mozc_builder/work/nacl_sdk/pepper_40

## depot_tools
## depot_tools for Ninja prebuilt
RUN git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
ENV PATH $PATH:/home/mozc_builder/work/depot_tools

# check out Mozc source
RUN mkdir -p /home/mozc_builder/work/mozc
WORKDIR /home/mozc_builder/work/mozc
RUN gclient config https://github.com/google/mozc.git --name=. --deps-file=src/DEPS
RUN gclient sync
# check out Mozc source with submodules
RUN git clone https://github.com/google/mozc.git --recursive

WORKDIR /home/mozc_builder/work/mozc/src
ENTRYPOINT bash
2 changes: 1 addition & 1 deletion src/mozc_version_template.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MAJOR=2
MINOR=17
BUILD=2122
BUILD=2123
REVISION=102
# NACL_DICTIONARY_VERSION is the target version of the system dictionary to be
# downloaded by NaCl Mozc.
Expand Down
1 change: 1 addition & 0 deletions src/third_party/breakpad
Submodule breakpad added at d2904b
1 change: 1 addition & 0 deletions src/third_party/fontTools
Submodule fontTools added at 5ba7d9
1 change: 1 addition & 0 deletions src/third_party/gmock
Submodule gmock added at d478a1
1 change: 1 addition & 0 deletions src/third_party/gtest
Submodule gtest added at 1d5373
1 change: 1 addition & 0 deletions src/third_party/gyp
Submodule gyp added at cdf037
1 change: 1 addition & 0 deletions src/third_party/japanese_usage_dictionary
1 change: 1 addition & 0 deletions src/third_party/jsoncpp
Submodule jsoncpp added at 11086d
1 change: 1 addition & 0 deletions src/third_party/protobuf
Submodule protobuf added at 172019
1 change: 1 addition & 0 deletions src/third_party/zinnia
Submodule zinnia added at 44dddc

0 comments on commit e398317

Please sign in to comment.