Skip to content

Commit fd810a9

Browse files
committed
locate skk dictionary at runtime on macOS
1 parent 1c18d99 commit fd810a9

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ include(ECMUninstallTarget)
1010
include(FeatureSummary)
1111

1212
find_package(PkgConfig REQUIRED)
13-
find_package(Fcitx5Core 5.0.6 REQUIRED)
13+
find_package(Fcitx5Core 5.1.7 REQUIRED)
1414
find_package(Gettext REQUIRED)
1515
pkg_check_modules(GObject2 IMPORTED_TARGET "gobject-2.0" REQUIRED)
1616
find_package(LibSKK REQUIRED)

src/skk.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,10 @@ void SkkEngine::loadDictionary() {
501501
continue;
502502
}
503503
if (mode == 1) {
504+
if constexpr (isApple()) {
505+
path = StandardPath::global().locate(
506+
StandardPath::Type::Data, "skk/SKK-JISYO.L");
507+
}
504508
if (stringutils::endsWith(path, ".cdb")) {
505509
SkkCdbDict *dict =
506510
skk_cdb_dict_new(path.data(), encoding.data(), nullptr);

0 commit comments

Comments
 (0)