Skip to content

Commit

Permalink
Integrate lua addon (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
WhiredPlanck authored Jan 20, 2025
1 parent 2e41484 commit 60e8162
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@
[submodule "entry/src/main/cpp/fcitx5-chinese-addons"]
path = entry/src/main/cpp/fcitx5-chinese-addons
url = https://github.com/fcitx/fcitx5-chinese-addons
[submodule "entry/src/main/cpp/fcitx5-lua"]
path = entry/src/main/cpp/fcitx5-lua
url = https://github.com/fcitx/fcitx5-lua
4 changes: 4 additions & 0 deletions entry/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ option(ENABLE_DATA "" OFF)
option(ENABLE_TOOLS "" OFF)
add_subdirectory(libime)

option(USE_DLOPEN "" OFF)
add_subdirectory(fcitx5-lua)
target_link_libraries(luaaddonloader "-L${PREBUILT_DIR}/lib" lua)

option(ENABLE_CLOUDPINYIN "" OFF)
option(ENABLE_GUI "" OFF)
set(OPENCC_INCLUDE_DIR "${PREBUILT_DIR}/include/opencc")
Expand Down
1 change: 1 addition & 0 deletions entry/src/main/cpp/fcitx5-lua
Submodule fcitx5-lua added at 3652f5
16 changes: 13 additions & 3 deletions scripts/install-deps.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
set -e

deps=(
boost
ecm
fmt
lua
libintl
marisa
opencc
Expand All @@ -21,6 +24,13 @@ done
RES_EXTRACT_DIR=entry/src/main/resources/resfile/usr
mkdir -p $RES_EXTRACT_DIR

file=chinese-addons-any.tar.bz2
[[ -f cache/$file ]] || wget -P cache https://github.com/fcitx-contrib/fcitx5-plugins/releases/download/macos/$file
tar xf cache/$file -C $RES_EXTRACT_DIR lib share
addons=(
chinese-addons
lua
)
for addon in "${addons[@]}"; do
file=$addon-any.tar.bz2
[[ -f cache/$file ]] || wget -P cache https://github.com/fcitx-contrib/fcitx5-plugins/releases/download/macos/$file
tar xf cache/$file -C $RES_EXTRACT_DIR lib || true
tar xf cache/$file -C $RES_EXTRACT_DIR share
done

0 comments on commit 60e8162

Please sign in to comment.