Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into fcitx
Browse files Browse the repository at this point in the history
  • Loading branch information
Fcitx Bot committed Oct 1, 2024
2 parents 961fec8 + 032535d commit f96eb8f
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 22 deletions.
19 changes: 10 additions & 9 deletions docker/ubuntu22.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ ARG DEBIAN_FRONTEND=noninteractive
## https://docs.docker.com/develop/develop-images/instructions/#apt-get
RUN apt-get update && apt-get install -y \
## Common packages for linux build environment
python3 pkg-config git curl bzip2 unzip make ninja-build \
python3 pkg-config git curl bzip2 unzip make g++ gcc \
## Packages for linux desktop version
libibus-1.0-dev libglib2.0-dev qt6-base-dev libgl-dev \
## Packages for misc tools
Expand All @@ -49,27 +49,28 @@ RUN apt-get update && apt-get install -y \
curl gnupg libncurses5 \
&& rm -rf /var/lib/apt/lists/*

## For Bazel
## https://bazel.build/install/ubuntu#install-on-ubuntu
RUN curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor > /usr/share/keyrings/bazel-archive-keyring.gpg
RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/bazel-archive-keyring.gpg] https://storage.googleapis.com/bazel-apt stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list
RUN apt-get update && apt-get install -y bazel && rm -rf /var/lib/apt/lists/*

# Working environemnt
ENV HOME /home/mozc_builder
RUN useradd --create-home --shell /bin/bash --base-dir /home mozc_builder
USER mozc_builder
RUN mkdir -p /home/mozc_builder/bin
ENV PATH "${PATH}:/home/mozc_builder/bin"
RUN mkdir -p /home/mozc_builder/work
WORKDIR /home/mozc_builder/work
## Work around https://bugreports.qt.io/browse/QTBUG-86080 for Ubuntu 22.04
ENV PKG_CONFIG_PATH="/home/mozc_builder/work/mozc/docker/ubuntu22.04/qt6-core-pkgconfig:${PKG_CONFIG_PATH}"

## Set up bazelisk as bazel
RUN curl -LO https://github.com/bazelbuild/bazelisk/releases/download/v1.22.0/bazelisk-linux-amd64 \
&& mv bazelisk-linux-amd64 /home/mozc_builder/bin/bazel \
&& chmod u+x /home/mozc_builder/bin/bazel

## Set up Android SDK and NDK
ENV ANDROID_HOME /home/mozc_builder/Android/Sdk
RUN mkdir -p ${ANDROID_HOME}
RUN curl -LO https://dl.google.com/android/repository/commandlinetools-linux-10406996_latest.zip && unzip commandlinetools-linux-10406996_latest.zip -d ${ANDROID_HOME} && rm commandlinetools-linux-10406996_latest.zip
RUN yes | ${ANDROID_HOME}/cmdline-tools/bin/sdkmanager --sdk_root=${ANDROID_HOME} "cmdline-tools;latest" "platforms;android-33" "build-tools;33.0.2" "platform-tools" "ndk;25.2.9519653"
ENV ANDROID_NDK_HOME ${ANDROID_HOME}/ndk/25.2.9519653
RUN yes | ${ANDROID_HOME}/cmdline-tools/bin/sdkmanager --sdk_root=${ANDROID_HOME} "cmdline-tools;latest" "platforms;android-33" "build-tools;33.0.2" "platform-tools" "ndk;27.1.12297006"
ENV ANDROID_NDK_HOME ${ANDROID_HOME}/ndk/27.1.12297006

# check out Mozc source with submodules
RUN mkdir /home/mozc_builder/work/mozc
Expand Down
12 changes: 6 additions & 6 deletions docker/ubuntu24.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,17 @@ ENV PATH "${PATH}:/home/mozc_builder/bin"
RUN mkdir -p /home/mozc_builder/work
WORKDIR /home/mozc_builder/work

## Set up Bazel
RUN curl -LO https://github.com/bazelbuild/bazel/releases/download/7.1.1/bazel-7.1.1-installer-linux-x86_64.sh \
&& bash bazel-7.1.1-installer-linux-x86_64.sh --user \
&& rm bazel-7.1.1-installer-linux-x86_64.sh
## Set up bazelisk as bazel
RUN curl -LO https://github.com/bazelbuild/bazelisk/releases/download/v1.22.0/bazelisk-linux-amd64 \
&& mv bazelisk-linux-amd64 /home/mozc_builder/bin/bazel \
&& chmod u+x /home/mozc_builder/bin/bazel

## Set up Android SDK and NDK
ENV ANDROID_HOME /home/mozc_builder/Android/Sdk
RUN mkdir -p ${ANDROID_HOME}
RUN curl -LO https://dl.google.com/android/repository/commandlinetools-linux-10406996_latest.zip && unzip commandlinetools-linux-10406996_latest.zip -d ${ANDROID_HOME} && rm commandlinetools-linux-10406996_latest.zip
RUN yes | ${ANDROID_HOME}/cmdline-tools/bin/sdkmanager --sdk_root=${ANDROID_HOME} "cmdline-tools;latest" "platforms;android-33" "build-tools;33.0.2" "platform-tools" "ndk;25.2.9519653"
ENV ANDROID_NDK_HOME ${ANDROID_HOME}/ndk/25.2.9519653
RUN yes | ${ANDROID_HOME}/cmdline-tools/bin/sdkmanager --sdk_root=${ANDROID_HOME} "cmdline-tools;latest" "platforms;android-33" "build-tools;33.0.2" "platform-tools" "ndk;27.1.12297006"
ENV ANDROID_NDK_HOME ${ANDROID_HOME}/ndk/27.1.12297006

# check out Mozc source with submodules
RUN mkdir /home/mozc_builder/work/mozc
Expand Down
2 changes: 1 addition & 1 deletion docs/build_mozc_in_docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ environment, you might need to modify the following files.

* src/config.bzl - configuration of install paths, etc.
* src/.bazelrc - compiler flags, etc.
* src/WORKSPACE.bazel - build dependencies.
* src/MODULE.bazel - build dependencies.

Tips: the following command makes the specified file untracked by Git.
```
Expand Down
2 changes: 1 addition & 1 deletion docs/build_mozc_in_windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ Note that you can specify `--qtdir=` option instead of `--noqt` in GYP phase sin
bazel --bazelrc=windows.bazelrc build --config oss_windows --config release_build package
```

You have release build binaries in `bazel-bin\win32\installer\Mozc.msi`.
You have release build binaries in `bazel-bin\win32\installer\Mozc64.msi`.

---

Expand Down
4 changes: 0 additions & 4 deletions src/bazel/stubs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,3 @@ def cc_stub(name, tags = None, target_compatible_with = None, **kwargs):
tags = tags,
target_compatible_with = target_compatible_with,
)

windows = struct(
resource_files = cc_stub,
)
2 changes: 1 addition & 1 deletion src/win32/installer/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ config_setting(

_WXS_FILE = ":installer_oss_64bit.wxs" if BRANDING == "Mozc" else ":installer_64bit.wxs"

_MSI_FILE = "Mozc.msi" if BRANDING == "Mozc" else "GoogleJapaneseInput.msi"
_MSI_FILE = "Mozc64.msi" if BRANDING == "Mozc" else "GoogleJapaneseInput64.msi"

genrule(
name = "installer",
Expand Down

0 comments on commit f96eb8f

Please sign in to comment.