diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 64ddafd..84b44c4 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -62,7 +62,6 @@ jobs: - name: Build and Install fcitx5-qt uses: fcitx/github-actions@cmake with: - repository: fcitx/fcitx5-qt path: fcitx5-qt cmake-option: >- -DENABLE_QT4=Off -DENABLE_QT5=Off -DENABLE_QT6=On diff --git a/CMakeLists.txt b/CMakeLists.txt index a44053f..6ee73c5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,7 +21,10 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") include("${FCITX_INSTALL_CMAKECONFIG_DIR}/Fcitx5Utils/Fcitx5CompilerSettings.cmake") -set(SKK_DEFAULT_PATH "/usr/share/skk/SKK-JISYO.L" CACHE STRING "Default path of SKK") +set(SKK_PATH "/usr/share/skk/" CACHE STRING "Default path of SKK directory that has SKK-JISYO.L, could start with \$XDG_DATA_DIRS/") +if("${SKK_DEFAULT_PATH}" MATCHES "SKK-JISYO.L$") + message(FATAL_ERROR "SKK_DEFAULT_PATH is superseded by SKK_PATH") +endif() include(GNUInstallDirs) diff --git a/README.md b/README.md index a5e449f..3b9dfa9 100644 --- a/README.md +++ b/README.md @@ -30,9 +30,9 @@ Please install this packages before build this Program. - extra-cmake-modules - gettext -You can specify the skk dictionary path by -DSKK_DEFAULT_PATH=path_you_want +You can specify the skk dictionary path by -DSKK_PATH=path_you_want -By default it's /usr/share/skk/SKK-JISYO.L +By default it's /usr/share/skk/ ## Installation diff --git a/config.h.in b/config.h.in index 0d3eb4b..29a343b 100644 --- a/config.h.in +++ b/config.h.in @@ -1,6 +1,6 @@ #ifndef ___CONFIG_H___ #define ___CONFIG_H___ -#define SKK_DEFAULT_PATH "@SKK_DEFAULT_PATH@" +#define SKK_PATH "@SKK_PATH@" #endif /* __CONFIG_H__ */ diff --git a/gui/adddictdialog.cpp b/gui/adddictdialog.cpp index 1ca4266..295d167 100644 --- a/gui/adddictdialog.cpp +++ b/gui/adddictdialog.cpp @@ -111,7 +111,7 @@ void AddDictDialog::browseClicked() { if (m_ui->typeComboBox->currentIndex() == DictType_System) { QString dir; if (path.isEmpty()) { - path = SKK_DEFAULT_PATH; + path = SKK_PATH "SKK-JISYO.L"; } QFileInfo info(path); path = QFileDialog::getOpenFileName(this, _("Select Dictionary File"), diff --git a/src/dictionary_list.in b/src/dictionary_list.in index c12a4e5..e8a925e 100644 --- a/src/dictionary_list.in +++ b/src/dictionary_list.in @@ -1,2 +1,2 @@ type=file,file=$FCITX_CONFIG_DIR/skk/user.dict,mode=readwrite -type=file,file=@SKK_DEFAULT_PATH@,mode=readonly +type=file,file=@SKK_PATH@SKK-JISYO.L,mode=readonly