Skip to content

Commit

Permalink
locate skk dictionary at runtime on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleoflqj committed Nov 27, 2024
1 parent 1c18d99 commit fd810a9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ include(ECMUninstallTarget)
include(FeatureSummary)

find_package(PkgConfig REQUIRED)
find_package(Fcitx5Core 5.0.6 REQUIRED)
find_package(Fcitx5Core 5.1.7 REQUIRED)
find_package(Gettext REQUIRED)
pkg_check_modules(GObject2 IMPORTED_TARGET "gobject-2.0" REQUIRED)
find_package(LibSKK REQUIRED)
Expand Down
4 changes: 4 additions & 0 deletions src/skk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,10 @@ void SkkEngine::loadDictionary() {
continue;
}
if (mode == 1) {
if constexpr (isApple()) {
path = StandardPath::global().locate(
StandardPath::Type::Data, "skk/SKK-JISYO.L");
}
if (stringutils::endsWith(path, ".cdb")) {
SkkCdbDict *dict =
skk_cdb_dict_new(path.data(), encoding.data(), nullptr);
Expand Down

0 comments on commit fd810a9

Please sign in to comment.