forked from fcitx5-android/fcitx5-android
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update fcitx5 submodules and prebuilt
- support addon factory v2 in AndroidSharedLibraryLoader see fcitx/fcitx5#1185 - set VERSION_NAME and PREBUILT_DIR in NativeBaseConventionPlugin # Conflicts: # lib/fcitx5-chinese-addons/src/main/cpp/fcitx5-chinese-addons # lib/fcitx5/src/main/cpp/fcitx5 # lib/fcitx5/src/main/cpp/prebuilt # lib/libime/src/main/cpp/libime # plugin/anthy/src/main/cpp/fcitx5-anthy # plugin/rime/src/main/cpp/fcitx5-rime # plugin/unikey/src/main/cpp/fcitx5-unikey
- Loading branch information
Showing
49 changed files
with
120 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,22 @@ | ||
/* | ||
* SPDX-License-Identifier: LGPL-2.1-or-later | ||
* SPDX-FileCopyrightText: Copyright 2016-2016 CSSlayer <[email protected]> | ||
* SPDX-FileCopyrightText: Copyright 2023 Fcitx5 for Android Contributors | ||
* SPDX-FileCopyrightText: Copyright 2023-2024 Fcitx5 for Android Contributors | ||
* SPDX-FileComment: Modified from https://github.com/fcitx/fcitx5/blob/5.1.1/src/lib/fcitx/addonloader.cpp | ||
*/ | ||
|
||
#include <exception> | ||
#include <memory> | ||
#include <string> | ||
#include <utility> | ||
#include <fcitx-utils/flags.h> | ||
#include <fcitx-utils/library.h> | ||
#include <fcitx-utils/log.h> | ||
#include <fcitx-utils/standardpath.h> | ||
#include <fcitx-utils/stringutils.h> | ||
#include <fcitx/addoninfo.h> | ||
#include <fcitx/addonloader.h> | ||
#include <fcitx/addoninstance.h> | ||
#include "androidaddonloader.h" | ||
|
||
#define FCITX_LIBRARY_SUFFIX ".so" | ||
|
@@ -65,7 +78,7 @@ AddonInstance *AndroidSharedLibraryLoader::load(const AddonInfo &info, | |
try { | ||
registry_.emplace( | ||
info.uniqueName(), | ||
std::make_unique<AndroidSharedLibraryFactory>(std::move(lib))); | ||
std::make_unique<AndroidSharedLibraryFactory>(info, std::move(lib))); | ||
} catch (const std::exception &e) { | ||
} | ||
break; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,42 @@ | ||
/* | ||
* SPDX-License-Identifier: LGPL-2.1-or-later | ||
* SPDX-FileCopyrightText: Copyright 2016-2016 CSSlayer <[email protected]> | ||
* SPDX-FileCopyrightText: Copyright 2023 Fcitx5 for Android Contributors | ||
* SPDX-FileCopyrightText: Copyright 2023-2024 Fcitx5 for Android Contributors | ||
* SPDX-FileComment: Modified from https://github.com/fcitx/fcitx5/blob/5.1.1/src/lib/fcitx/addonloader_p.h | ||
*/ | ||
|
||
#ifndef FCITX5_ANDROID_ANDROIDADDONLOADER_H | ||
#define FCITX5_ANDROID_ANDROIDADDONLOADER_H | ||
|
||
#include <memory> | ||
#include <stdexcept> | ||
#include <string> | ||
#include <string_view> | ||
#include <unordered_map> | ||
#include <utility> | ||
#include <fcitx-utils/library.h> | ||
#include <fcitx-utils/standardpath.h> | ||
#include <fcitx/addonloader.h> | ||
#include <fcitx-utils/stringutils.h> | ||
#include <fcitx/addonfactory.h> | ||
#include <fcitx/addoninfo.h> | ||
#include <fcitx/addoninstance.h> | ||
#include <fcitx/addonloader.h> | ||
|
||
namespace fcitx { | ||
|
||
namespace { | ||
constexpr char FCITX_ADDON_FACTORY_ENTRY[] = "fcitx_addon_factory_instance"; | ||
} | ||
|
||
class AndroidSharedLibraryFactory { | ||
public: | ||
explicit AndroidSharedLibraryFactory(Library lib) : library_(std::move(lib)) { | ||
auto *funcPtr = library_.resolve("fcitx_addon_factory_instance"); | ||
explicit AndroidSharedLibraryFactory(const AddonInfo &info, Library lib) | ||
: library_(std::move(lib)) { | ||
auto v2Name = stringutils::concat(FCITX_ADDON_FACTORY_ENTRY, "_", info.uniqueName()); | ||
auto *funcPtr = library_.resolve(v2Name.data()); | ||
if (!funcPtr) { | ||
funcPtr = library_.resolve(FCITX_ADDON_FACTORY_ENTRY); | ||
} | ||
if (!funcPtr) { | ||
throw std::runtime_error(library_.error()); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule fcitx5-chinese-addons
updated
34 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule libime
updated
11 files
+20 −4 | CMakeLists.txt | |
+4 −4 | data/CMakeLists.txt | |
+1 −1 | src/libime/core/utils_p.h | |
+1 −0 | src/libime/table/autophrasedict.h | |
+2 −1 | src/libime/table/tablebaseddictionary.cpp | |
+13 −2 | test/testtable.cpp | |
+9 −2 | tools/CMakeLists.txt | |
+26 −0 | tools/filesystem_helper.cpp | |
+19 −0 | tools/filesystem_helper.h | |
+3 −17 | tools/libime_migrate_fcitx4_pinyin.cpp | |
+2 −11 | tools/libime_migrate_fcitx4_table.cpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule fcitx5-anthy
updated
11 files
+2 −2 | CMakeLists.txt | |
+1 −0 | org.fcitx.Fcitx5.Addon.Anthy.metainfo.xml.in | |
+7 −6 | po/zh_TW.po | |
+3 −1 | src/config.h | |
+1 −1 | src/engine.h | |
+1 −1 | src/key2kana_base.h | |
+1 −1 | src/nicola.cpp | |
+7 −0 | test/CMakeLists.txt | |
+2 −0 | test/addon/CMakeLists.txt | |
+2 −0 | test/inputmethod/CMakeLists.txt | |
+67 −0 | test/testanthy.cpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.