Skip to content

Commit a4302fe

Browse files
committed
update fcitx5; switch prebuilder
1 parent de29375 commit a4302fe

File tree

8 files changed

+19
-21
lines changed

8 files changed

+19
-21
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
nlohmann-json \
4141
extra-cmake-modules
4242
IOS_PLATFORM=SIMULATOR ./scripts/install-deps.sh
43-
wget https://github.com/fcitx-contrib/fcitx5-macos-prebuilder/releases/download/latest/marisa-$(uname -m).tar.bz2
43+
wget https://github.com/fcitx-contrib/fcitx5-prebuilder/releases/download/macos/marisa-$(uname -m).tar.bz2
4444
sudo tar xjvf marisa-$(uname -m).tar.bz2 -C /usr/local bin/marisa-build
4545
4646
- name: Build

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,15 @@ if (RIME)
127127
"${PREBUILDER_LIB_DIR}/libmarisa.a"
128128
"${PREBUILDER_LIB_DIR}/libopencc.a"
129129
"${PREBUILDER_LIB_DIR}/libglog.a"
130+
"${PREBUILDER_LIB_DIR}/liblua.a"
130131
)
131132
add_library(Rime_static STATIC IMPORTED)
132133
set_target_properties(Rime_static PROPERTIES
133134
IMPORTED_LOCATION "${PREBUILDER_LIB_DIR}/librime.a"
134135
INTERFACE_INCLUDE_DIRECTORIES "${PREBUILDER_INCLUDE_DIR}"
135136
INTERFACE_LINK_LIBRARIES "${Rime_dependencies}"
136137
)
137-
set(RIME_TARGET Rime_static)
138+
set(RIME_TARGET $<LINK_LIBRARY:WHOLE_ARCHIVE,Rime_static>)
138139
set(Rime_VERSION "1.12")
139140

140141
add_definitions(-DRIME)

common/common.cpp

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#include "common.h"
22
#include "../engines/fcitx5-hallelujah/src/factory.h"
3-
#include "../engines/fcitx5-rime/src/rimefactory.h"
4-
#include "../fcitx5/src/modules/spell/spell.h"
3+
#include "../fcitx5/src/lib/fcitx/addoninstance.h"
54
#include "../iosfrontend/iosfrontend.h"
65
#include "../iosnotifications/iosnotifications.h"
76
#include "../uipanel/uipanel.h"
@@ -12,10 +11,6 @@
1211

1312
#ifdef HALLELUJAH
1413
fcitx::HallelujahFactory HallelujahFactory;
15-
fcitx::SpellModuleFactory SpellModuleFactory;
16-
#endif
17-
#ifdef RIME
18-
fcitx::RimeEngineFactory RimeFactory;
1914
#endif
2015

2116
namespace fs = std::filesystem;
@@ -26,23 +21,24 @@ static fcitx::UIPanelFactory UIPanelFactory;
2621

2722
static fcitx::StaticAddonRegistry addons = {
2823
#ifdef HALLELUJAH
29-
std::make_pair<std::string, fcitx::AddonFactory *>("spell",
30-
&SpellModuleFactory),
24+
std::make_pair<std::string, fcitx::AddonFactory *>("hallelujah",
25+
&HallelujahFactory),
3126
#endif
3227
std::make_pair<std::string, fcitx::AddonFactory *>("iosfrontend",
3328
&IosFrontendFactory),
3429
std::make_pair<std::string, fcitx::AddonFactory *>(
3530
"notifications", &IosNotificationsFactory),
3631
std::make_pair<std::string, fcitx::AddonFactory *>("uipanel",
3732
&UIPanelFactory),
33+
};
34+
3835
#ifdef HALLELUJAH
39-
std::make_pair<std::string, fcitx::AddonFactory *>("hallelujah",
40-
&HallelujahFactory),
36+
FCITX_IMPORT_ADDON_FACTORY(addons, spell);
4137
#endif
38+
4239
#ifdef RIME
43-
std::make_pair<std::string, fcitx::AddonFactory *>("rime", &RimeFactory),
40+
FCITX_IMPORT_ADDON_FACTORY(addons, rime);
4441
#endif
45-
};
4642

4743
std::unique_ptr<fcitx::Instance> instance;
4844
std::unique_ptr<fcitx::EventDispatcher> dispatcher;

fcitx5

Submodule fcitx5 updated 66 files

patches/fcitx5.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/CMakeLists.txt b/CMakeLists.txt
2-
index 3c7bc877..12612326 100644
2+
index 0d219a51..21695937 100644
33
--- a/CMakeLists.txt
44
+++ b/CMakeLists.txt
55
@@ -224,9 +224,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DI

patches/rime.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ index 78ef79b..c4abccd 100644
1414
install(TARGETS rime DESTINATION "${CMAKE_INSTALL_LIBDIR}/fcitx5")
1515
fcitx5_translate_desktop_file(rime.conf.in rime.conf)
1616
diff --git a/src/rimeengine.cpp b/src/rimeengine.cpp
17-
index 49fc5b8..b3212fa 100644
17+
index b335069..a65a123 100644
1818
--- a/src/rimeengine.cpp
1919
+++ b/src/rimeengine.cpp
2020
@@ -47,6 +47,8 @@
@@ -23,9 +23,9 @@ index 49fc5b8..b3212fa 100644
2323

2424
+#include "fcitxipc-swift.h"
2525
+
26-
FCITX_DEFINE_LOG_CATEGORY(rime, "rime");
26+
FCITX_DEFINE_LOG_CATEGORY(rime_log, "rime");
2727

28-
namespace fcitx {
28+
namespace fcitx::rime {
2929
@@ -197,11 +199,17 @@ RimeEngine::RimeEngine(Instance *instance)
3030
deployAction_.setIcon("fcitx_rime_deploy");
3131
deployAction_.setShortText(_("Deploy"));

scripts/install-deps.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ deps=(
66
libintl
77
librime
88
libuv
9+
lua
910
marisa
1011
opencc
1112
yaml-cpp
@@ -22,7 +23,7 @@ fi
2223

2324
for dep in "${deps[@]}"; do
2425
file=$dep$POSTFIX.tar.bz2
25-
[[ -f cache/$file ]] || wget -P cache https://github.com/fcitx-contrib/fcitx5-ios-prebuilder/releases/download/latest/$file
26+
[[ -f cache/$file ]] || wget -P cache https://github.com/fcitx-contrib/fcitx5-prebuilder/releases/download/ios/$file
2627
tar xjvf cache/$file -C $EXTRACT_DIR
2728
done
2829

0 commit comments

Comments
 (0)