Skip to content

Commit

Permalink
update librime and drop patch
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleoflqj committed Jun 23, 2023
1 parent 6a5ab2c commit 1bdf0be
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 48 deletions.
47 changes: 0 additions & 47 deletions librime_patch
Original file line number Diff line number Diff line change
Expand Up @@ -56,53 +56,6 @@ index 577bb31..22b9d40 100644
if (!config_->GetString("schema/name", &schema_name_)) {
schema_name_ = schema_id_;
}
diff --git a/src/rime_api.cc b/src/rime_api.cc
index 10c99f5..506396e 100644
--- a/src/rime_api.cc
+++ b/src/rime_api.cc
@@ -971,11 +971,11 @@ static bool do_with_candidate_on_current_page(
}


-Bool RimeSelectCandidate(RimeSessionId session_id, size_t index) {
+RIME_API Bool RimeSelectCandidate(RimeSessionId session_id, size_t index) {
return do_with_candidate(session_id, index, &Context::Select);
}

-Bool RimeSelectCandidateOnCurrentPage(RimeSessionId session_id, size_t index) {
+RIME_API Bool RimeSelectCandidateOnCurrentPage(RimeSessionId session_id, size_t index) {
return do_with_candidate_on_current_page(session_id, index, &Context::Select);
}

@@ -983,11 +983,11 @@ const char* RimeGetVersion() {
return RIME_VERSION;
}

-Bool RimeDeleteCandidate(RimeSessionId session_id, size_t index) {
+RIME_API Bool RimeDeleteCandidate(RimeSessionId session_id, size_t index) {
return do_with_candidate(session_id, index, &Context::DeleteCandidate);
}

-Bool RimeDeleteCandidateOnCurrentPage(RimeSessionId session_id, size_t index) {
+RIME_API Bool RimeDeleteCandidateOnCurrentPage(RimeSessionId session_id, size_t index) {
return do_with_candidate_on_current_page(
session_id, index, &Context::DeleteCandidate);
}
diff --git a/src/rime_api.h b/src/rime_api.h
index 671a1c1..d0bc966 100644
--- a/src/rime_api.h
+++ b/src/rime_api.h
@@ -287,6 +287,10 @@ RIME_API void RimeCandidateListEnd(RimeCandidateListIterator* iterator);
RIME_API Bool RimeCandidateListFromIndex(RimeSessionId session_id,
RimeCandidateListIterator* iterator,
int index);
+RIME_API Bool RimeSelectCandidate(RimeSessionId session_id, size_t index);
+RIME_API Bool RimeSelectCandidateOnCurrentPage(RimeSessionId session_id, size_t index);
+RIME_API Bool RimeDeleteCandidate(RimeSessionId session_id, size_t index);
+RIME_API Bool RimeDeleteCandidateOnCurrentPage(RimeSessionId session_id, size_t index);

// Runtime options

diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index 18e3407..b79a0c1 100644
--- a/tools/CMakeLists.txt
Expand Down
2 changes: 2 additions & 0 deletions scripts/build_native.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -e
root=$PWD

opencc_blddir=build/opencc_native
rm -rf $opencc_blddir
cmake librime/deps/opencc -B $opencc_blddir -G Ninja \
-DCMAKE_INSTALL_PREFIX:PATH=/usr/local \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
Expand All @@ -18,6 +19,7 @@ popd
rm -rf librime/plugins/lua

librime_blddir=build/librime_native
rm -rf $librime_blddir
cmake librime -B $librime_blddir -G Ninja \
-DBUILD_TEST:BOOL=OFF \
-DENABLE_LOGGING:BOOL=OFF \
Expand Down

0 comments on commit 1bdf0be

Please sign in to comment.