From be811bf66d2cc3a19ef3f6257f46ac6571560efa Mon Sep 17 00:00:00 2001 From: Tatsunori Uchino Date: Tue, 15 Oct 2024 18:55:56 +0900 Subject: [PATCH] Improve Windows build instruction (#1079) PiperOrigin-RevId: 686026277 --- docs/build_mozc_in_windows.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/build_mozc_in_windows.md b/docs/build_mozc_in_windows.md index 960366144..255c4d8fd 100644 --- a/docs/build_mozc_in_windows.md +++ b/docs/build_mozc_in_windows.md @@ -24,6 +24,8 @@ out_win\Release\Mozc64.msi Hint: You can also download `Mozc64.msi` from GitHub Actions. Check [Build with GitHub Actions](#build-with-github-actions) for details. +Hint: You can use Bazel to build Mozc (experimental). For details, please see below. + ## Setup ### System Requirements @@ -41,6 +43,8 @@ Building Mozc on Windows requires the following software. * `requests` * `.NET 6` or later (for `dotnet` command). +For additional requirements for building Mozc with Bazel, please see below. + ### Install pip modules ``` @@ -160,12 +164,26 @@ Note that you can specify `--qtdir=` option instead of `--noqt` in GYP phase sin ## Build with Bazel (experimental) +Additional requirements: + +* [Bazel](https://bazel.build/) +* [MSYS2](https://github.com/msys2/msys2) + +After running `build_tools/update_deps.py` and `build_tools/build_qt.py`, run the following command instead of `build_mozc.py`: + ``` bazel --bazelrc=windows.bazelrc build --config oss_windows --config release_build package ``` You have release build binaries in `bazel-bin\win32\installer\Mozc64.msi`. +### Tips for Bazel setup + +* You do not need to install a new JDK just for Mozc. +* If you installed Bazel via [Scoop](https://scoop.sh), it is recommended to install MSYS2 via Scoop, too. + +https://bazel.build/install/windows?hl=ja#install-compilers + --- ## Build with GitHub Actions