Skip to content

Commit 1902698

Browse files
author
Fcitx Bot
committed
Merge remote-tracking branch 'origin/master' into fcitx
2 parents c31295a + 30585e2 commit 1902698

File tree

8 files changed

+48
-27
lines changed

8 files changed

+48
-27
lines changed

src/MODULE.bazel

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,13 @@ bazel_dep(
7676
version = "1.7.1",
7777
)
7878

79+
# rules_pkg: 1.1.0 2025-03-06
80+
# https://github.com/bazelbuild/rules_pkg
81+
bazel_dep(
82+
name = "rules_pkg",
83+
version = "1.1.0",
84+
)
85+
7986
# rules_python: 1.4.1 2025-05-09
8087
# https://github.com/bazelbuild/rules_python/
8188
bazel_dep(
@@ -349,7 +356,7 @@ http_archive(
349356
url = "https://github.com/hiroyuki-komatsu/japanese-usage-dictionary/archive/refs/tags/%s.zip" % JA_USAGE_DICT_TAG,
350357
)
351358

352-
# Zip code (2025-03-08, 6ece210081fb73d0ea4a5ea8e13ac9584d03fd76)
359+
# Zip code (2025-06-28, 21c6fb3cbc125e4408a8c2715beb1fbfcf03a442)
353360
# https://github.com/hiroyuki-komatsu/japanpost_zipcode/ contains snapshots of the zip code data
354361
# with version control.
355362
# The data files are mirror of the following files.
@@ -358,13 +365,13 @@ http_archive(
358365
http_archive(
359366
name = "zip_code_ken_all",
360367
build_file_content = "exports_files([\"KEN_ALL.CSV\"])",
361-
sha256 = "296cfa57f2012c0226afbc64e9e8575fc36285d2fa31d725a176548cd173b3df",
362-
url = "https://github.com/hiroyuki-komatsu/japanpost_zipcode/raw/6ece210081fb73d0ea4a5ea8e13ac9584d03fd76/ken_all.zip",
368+
sha256 = "9cd7a9235d1869a94f4019a201d61172a0fc633f1957922c3ec23ac7bf75becf",
369+
url = "https://github.com/hiroyuki-komatsu/japanpost_zipcode/raw/21c6fb3cbc125e4408a8c2715beb1fbfcf03a442/ken_all.zip",
363370
)
364371

365372
http_archive(
366373
name = "zip_code_jigyosyo",
367374
build_file_content = "exports_files([\"JIGYOSYO.CSV\"])",
368-
sha256 = "1c56e79ff4c7f709778e0bf4dfbffdf939efd170845feccae986d22cf4373988",
369-
url = "https://github.com/hiroyuki-komatsu/japanpost_zipcode/raw/6ece210081fb73d0ea4a5ea8e13ac9584d03fd76/jigyosyo.zip",
375+
sha256 = "f390501cbfe143921a939884178e5b33ca246181803d814e5f58676c19e91a6c",
376+
url = "https://github.com/hiroyuki-komatsu/japanpost_zipcode/raw/21c6fb3cbc125e4408a8c2715beb1fbfcf03a442/jigyosyo.zip",
370377
)

src/bazel/rules_cc_windows_cc_toolchain_config.bzl.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99

1010
def _impl(ctx):
1111
if _use_msvc_toolchain(ctx):
12-
@@ -767,7 +767,6 @@
12+
@@ -752,7 +752,6 @@
1313
flag_group(
1414
flags = [
1515
"/DNOMINMAX",
1616
- "/D_WIN32_WINNT=0x0601",
1717
"/D_CRT_SECURE_NO_DEPRECATE",
1818
"/D_CRT_SECURE_NO_WARNINGS",
1919
"/bigobj",
20-
@@ -777,7 +776,7 @@
20+
@@ -762,7 +761,7 @@
2121
"/wd4291",
2222
"/wd4250",
2323
"/wd4996",

src/mac/BUILD.bazel

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -435,33 +435,33 @@ genrule(
435435
":tweak_preflight",
436436
":tweak_postflight",
437437
] + mozc_select(
438-
# For both macos and oss_macos
438+
# Common files for all build types.
439439
macos = [
440440
":activate_pane",
441441
":dev_confirm_pane",
442442
":mozc_macos",
443443
":uninstaller_macos",
444444
],
445445
) + mozc_select(
446-
# For macos or oss_macos only
446+
# Files per build type.
447447
macos = [
448448
"//mac/installer:distribution.xml",
449449
"//mac/installer:InstallerSections.plist",
450-
"//mac/installer:LaunchAgents/com.google.inputmethod.Japanese.Converter.plist",
451-
"//mac/installer:LaunchAgents/com.google.inputmethod.Japanese.Renderer.plist",
450+
"//mac/installer:launch_agents",
451+
"//mac/installer:resources",
452452
],
453453
oss_macos = [
454454
"//mac/installer:distribution.xml",
455455
"//mac/installer:InstallerSections.plist",
456-
"//mac/installer:LaunchAgents/org.mozc.inputmethod.Japanese.Converter.plist",
457-
"//mac/installer:LaunchAgents/org.mozc.inputmethod.Japanese.Renderer.plist",
456+
"//mac/installer:launch_agents",
457+
"//mac/installer:resources",
458458
],
459459
prod_macos = [
460460
"@google_updater//:GoogleUpdater.pkg",
461461
"//mac/installer:distribution.xml",
462462
"//mac/installer:InstallerSections.plist",
463-
"//mac/installer:LaunchAgents/com.google.inputmethod.Japanese.Converter.plist",
464-
"//mac/installer:LaunchAgents/com.google.inputmethod.Japanese.Renderer.plist",
463+
"//mac/installer:launch_agents",
464+
"//mac/installer:resources",
465465
],
466466
),
467467
outs = ["installer.zip"],

src/mac/build_package.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ def main():
7676
'productbuild',
7777
'--distribution', 'distribution.xml',
7878
'--plugins', 'Plugins/',
79+
'--resources', 'Resources/',
7980
'package.pkg', # this name is only used within this script.
8081
]
8182
util.RunOrDie(productbuild_commands)

src/mac/installer/BUILD.bazel

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,35 @@
2727
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2828
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2929

30+
load("@rules_pkg//pkg:pkg.bzl", "pkg_zip")
31+
3032
package(default_visibility = ["//mac:__subpackages__"])
3133

3234
exports_files(
3335
srcs = [
3436
"InstallerSections.plist",
35-
"LaunchAgents/org.mozc.inputmethod.Japanese.Converter.plist",
36-
"LaunchAgents/org.mozc.inputmethod.Japanese.Renderer.plist",
3737
"distribution.xml",
3838
"postflight_template.sh",
3939
"preflight_template.sh",
4040
],
4141
)
42+
43+
pkg_zip(
44+
name = "launch_agents",
45+
srcs = [
46+
"LaunchAgents/org.mozc.inputmethod.Japanese.Converter.plist",
47+
"LaunchAgents/org.mozc.inputmethod.Japanese.Renderer.plist",
48+
],
49+
out = "launch_agents.zip",
50+
strip_prefix = ".",
51+
)
52+
53+
pkg_zip(
54+
name = "resources",
55+
srcs = [
56+
"Resources/en.lproj/Localizable.strings",
57+
"Resources/ja.lproj/Localizable.strings",
58+
],
59+
out = "resources.zip",
60+
strip_prefix = ".",
61+
)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"Mozc" = "Mozc";
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"Mozc" = "Mozc";

src/mac/tweak_installer_files.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -138,23 +138,14 @@ def TweakForProductbuild(top_dir: str, tweak_qt: bool, oss: bool) -> None:
138138
if oss:
139139
name = 'Mozc'
140140
folder = 'Mozc'
141-
domain = 'org.mozc'
142141
else:
143142
name = 'GoogleJapaneseInput'
144143
folder = 'GoogleJapaneseInput.localized'
145-
domain = 'com.google'
146144

147145
renames = [
148146
(f'Uninstall{name}.app', f'root/Applications/{folder}/'),
149147
(f'{name}.app', 'root/Library/Input Methods/'),
150-
(
151-
f'{domain}.inputmethod.Japanese.Converter.plist',
152-
'root/Library/LaunchAgents/',
153-
),
154-
(
155-
f'{domain}.inputmethod.Japanese.Renderer.plist',
156-
'root/Library/LaunchAgents/',
157-
),
148+
('LaunchAgents', 'root/Library/'),
158149
('ActivatePane.bundle', 'Plugins/'),
159150
('InstallerSections.plist', 'Plugins/'),
160151
('postflight.sh', 'scripts/postinstall'),

0 commit comments

Comments
 (0)