Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rime_api.get_librime_lua_version() #252

Open
wants to merge 42 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
dbe83b0
add ConfigListReg
shewer Mar 30, 2021
cb90c91
add ConfigItemReg ConfigValue
shewer Mar 31, 2021
a1c75a7
add ProjectionReg
shewer Mar 31, 2021
a4842ab
add sample projection.lua
shewer Mar 31, 2021
e0450e2
add ConfigMapReg
shewer Apr 1, 2021
d5767e5
modify ConfigReg
shewer Apr 1, 2021
36e30b6
ConfigList(append , insert) ConfigMap (set ) 改用 自身 參考(ConfigItem)
shewer Apr 1, 2021
c1e9e56
move Config ..REG code to config.h
shewer Apr 4, 2021
15040ce
update
shewer Apr 12, 2021
7bf6c2c
update sample
shewer Apr 12, 2021
951912f
update types.cc
shewer Apr 12, 2021
c193fd8
add engine:apply_schema() (#98)
shewer Apr 1, 2021
aa0c118
Export KeyEvent (#100)
shewer Apr 1, 2021
ec95adc
remove config.h modules.cc projection.lua
shewer Apr 14, 2021
d1cefd9
restore moduless.cc from fork/master
shewer Jul 28, 2021
9268d3f
rebase from fork/master
shewer Jul 28, 2021
bbdd4b7
Merge branch 'hchunhui:master' into master
shewer Sep 17, 2021
f4638ba
merge fork/master #139
shewer Oct 22, 2021
ee227e8
Merge branch 'hchunhui:master' into master
shewer Oct 30, 2021
590d3d5
Merge remote-tracking branch 'fork/master'
shewer Feb 15, 2022
c219707
Merge branch 'hchunhui:master' into master
shewer Jun 6, 2022
667ff2b
Merge branch 'hchunhui:master' into master
shewer Jul 6, 2022
42618fd
Merge branch 'hchunhui:master' into master
shewer Jul 11, 2022
3298ce7
Merge branch 'hchunhui:master' into master
shewer Jul 11, 2022
311e1e9
Merge branch 'hchunhui:master' into master
shewer Jul 12, 2022
f0c80e3
Merge branch 'hchunhui:master' into master
shewer Jul 12, 2022
052f028
Merge branch 'hchunhui:master' into master
shewer Jul 13, 2022
a13205d
Merge branch 'hchunhui:master' into master
shewer Jul 24, 2022
9d6b14a
Merge remote-tracking branch 'fork/master'
shewer Sep 4, 2022
63cc6b6
add distribution infomation
shewer Sep 7, 2022
ed0346a
Merge branch 'hchunhui:master' into master
shewer Sep 11, 2022
fb1b3bd
Merge branch 'hchunhui:master' into master
shewer Sep 24, 2022
facdc23
Merge branch 'hchunhui:master' into master
shewer Oct 6, 2022
50ee4dc
Merge branch 'hchunhui:master' into master
shewer Oct 9, 2022
ed9bed1
Merge remote-tracking branch 'fork/master'
shewer Nov 7, 2022
2219097
Merge branch 'hchunhui:master' into master
shewer Dec 3, 2022
ea9b511
Merge branch 'hchunhui:master' into master
shewer Dec 8, 2022
adf7943
Merge branch 'hchunhui:master' into master
shewer Jan 15, 2023
4cf0fbe
add rime_api.get_librime_lua_version()
shewer Jun 11, 2023
ab59d16
Update CMakeLists.txt
shewer Jun 24, 2023
dd65187
Update CMakeLists.txt
shewer Jun 24, 2023
3d07cba
Update CMakeLists.txt
shewer Jun 24, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,17 @@ set(plugin_name "rime-lua" PARENT_SCOPE)
set(plugin_objs $<TARGET_OBJECTS:rime-lua-objs> PARENT_SCOPE)
set(plugin_deps ${LUA_LIBRARIES} ${rime_library} ${rime_gears_library} PARENT_SCOPE)
set(plugin_modules "lua" PARENT_SCOPE)


find_package(Git REQUIRED)
execute_process(
COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
RESULT_VARIABLE result
OUTPUT_VARIABLE GIT_HASH )

set(librime_lua_version 1.0)
if(result AND result EQUAL 0)
set(librime_lua_version ${librime_lua_version}.${GIT_HASH})
endif()
add_definitions(-DLIBRIME_LUA_VERSION="${librime_lua_version}")
message("Librime-lua Version: ${librime_lua_version}")
4 changes: 4 additions & 0 deletions src/types.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1697,6 +1697,9 @@ namespace RimeApiReg {
RimeApi* rime = rime_get_api();
return string(rime->get_version());
}
string get_librime_lua_version() {
return LIBRIME_LUA_VERSION;
}

string get_shared_data_dir() {
RimeApi* rime = rime_get_api();
Expand Down Expand Up @@ -1762,6 +1765,7 @@ namespace RimeApiReg {

static const luaL_Reg funcs[]= {
{ "get_rime_version", WRAP(get_rime_version) },
{ "get_librime_lua_version", WRAP(get_librime_lua_version) },
{ "get_shared_data_dir", WRAP(get_shared_data_dir) },
{ "get_user_data_dir", WRAP(get_user_data_dir) },
{ "get_sync_dir", WRAP(get_sync_dir) },
Expand Down