Commit Graph

17 Commits

Author SHA1 Message Date
Yohei Yukawa
e198ede52b Also download Android NDK in update_deps.py (#1183)
This is a preparation before removing the dependency on Docker from our
Android build instructions (#1181).

With this commit running the 'update_deps.py' also downloads Android NDK
for macOS and Linux then extract it under third_party/ndk/.

This would enable us to fully control which version of Android NDK
should be used to build Android Library ('libmozc.so') in a subsequent
commit.

At this moment only the observable difference is that the Android NDK
will be extracted under third_party/ndk/. There must be no difference
in the final artifact yet.

PiperOrigin-RevId: 728118756
2025-02-18 20:21:12 +09:00
Yohei Yukawa
a0fed621e7 Always build Qt host tools with host CPU arch (#1122)
This follows up to my previous commit [1], which enabled build_qt.py to
build Qt6 for a CPU architecture other than the host architecture on
macOS environment.

Starting from Qt 6.8.0 it seems that Qt host tools need to be specified
via QT_HOST_PATH when running configure when cross compiling. To adopt
such a requirement, Qt6 will be built as follows with this commit.

 1. Build Qt host tools first with statically linking to Qt libraries.
 2. Build Qt for the target architecture with the above bootstrapping
    Qt host tools.
 3. Copy Qt host tools into third_party/qt/

Note that the above approach is not limited to macOS. In practice we can
now build Qt6 for non-host CPU architecture even on Windows.

There must be no behavior change in the final artifacts.

Closes #1121.

 [1]: 2f68b502dd

PiperOrigin-RevId: 696781616
2024-11-15 23:58:34 +09:00
Hiroyuki Komatsu
67a4d673ba Add MODULE.bazel.lock to .gitignore.
* https://github.com/google/mozc/issues/1002

PiperOrigin-RevId: 663257591
2024-08-15 11:17:03 +00:00
Yohei Yukawa
e8d25a2bee Fix #910: Use python venv for macOS build
With this commit macOS build starts using Python virtual environment so
that our build steps can comply with PEP 668 [1].

This is only about the build procedure. There must be no behavior change
in the build artifacts.

#codehealth

 [1]: https://peps.python.org/pep-0668/

PiperOrigin-RevId: 621123606
2024-04-02 10:59:27 +00:00
Hiroyuki Komatsu
5d672d2d45 Exclude .vscode/ under any directory.
* Replaced `/.vscode/` with `.vscode/` so that this is effective for any directory (e.g. src/.vscode).

PiperOrigin-RevId: 561978426
2023-09-01 16:44:28 +00:00
Yohei Yukawa
79fd176579 Add src/third_party/ninja/ to .gitignore
This is a follow up to 28d6312630.

PiperOrigin-RevId: 552120251
2023-07-29 17:04:49 +00:00
Yohei Yukawa
41bd234099 Configure Qt with -prefix
This is a preparation to enable C++20 for Windows (#769)

With this commit, Qt source code will be checked out into

  src/third_party/qt_src

by updade_deps.py then build_qt.py will install Qt binaries (and debug
symbols) into

  src/third_party/qt.

This way we can later delete src/third_party/qt_src to free up disk
space by 2GB or so, which is enough for us to compensate the increase
of disk usage in *.lib and *.obj when /std:c++20 is specified.

There must be no user observable behavior change.

PiperOrigin-RevId: 548523226
2023-07-16 19:59:23 +00:00
Yohei Yukawa
8233b4067f Support local cache in updade_deps.py
Currently `updade_deps.py` doesn't have any local cache mechanism, meaning that it downloads required files every time it is triggered. This is not only inefficient but also problematic because it can trigger rate limit if a developer (or CI) triggers `updade_deps.py` multiple times in a short period of time.

With this CL `updade_deps.py` starts using `src/third_party_cache/` as a cache directory.

The first run not only downloads archive files but also store downloaded files into `src/third_party_cache/`.  Any further run simply use cache files under `src/third_party_cache/` instead of downloading the same files again.

There is no change in the actual build instructions.  This is just an internal optimization behind the scene.

This is an important step towards enabling GitHub cache action (#749).

PiperOrigin-RevId: 536096666
2023-05-29 04:58:18 +00:00
Yohei Yukawa
6efc6490d0 Add update_deps.py for OSS Mozc
This CL introduces `update_deps.py` as a helper script to set up OSS Mozc's build dependencies.

```
git clone https://github.com/google/mozc.git
cd mozc/src
python build_tools/update_deps.py
```

It the future we can probably rely on bazel (e.g. `http_archive`), but for now having this kind of script would be helpful, especially for cases like #722.

Here are what would happen by running this script.

* On all the platforms, `git submodule update --init --recursive` will be executed.
* On macOS, Qt will be extracted to `src/third_party/qt/`
* On Windows
  - Qt will be extracted to `src/third_party/qt/`
  - `jom.exe` will be extracted to `src/third_party/qt/`
  - WiX will be extracted to `src/third_party/wix/`

This is also a preparation to support building installers for Windows (#723).

#codehealth

PiperOrigin-RevId: 525514758
2023-04-19 19:06:48 +00:00
Yohei Yukawa
52cb89ebef Add /.vs/ to .gitignore
PiperOrigin-RevId: 523045993
2023-04-10 06:15:49 +00:00
Yohei Yukawa
0f0f860acb Add .vscode/ to .gitignore
PiperOrigin-RevId: 522758486
2023-04-08 05:20:29 +00:00
Hiroyuki Komatsu
343cc41146 Update documents. 2021-07-10 12:21:21 +09:00
Hiroyuki Komatsu
2f958a934c Add src/bazel-src_* to .gitignore. 2021-02-27 19:21:53 +09:00
Hiroyuki Komatsu
835b590adc Add *.orig to .gitignore. 2021-02-07 19:13:26 +09:00
Hiroyuki Komatsu
7f4b049cee Update .gitignore 2021-01-30 16:48:36 +09:00
Hiroyuki Komatsu
4d5a7da611 Update .gitignore. 2020-08-29 23:19:55 +09:00
Yohei Yukawa
3efa9490cc Add .gitignore for git operations.
With this .gitignore, build artifacts and intermediate files can
be ignored by git.
2015-09-20 14:01:45 -07:00