diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..c8d7eef --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,46 @@ +name: Continuous Integration +on: + workflow_dispatch: + push: + branches: + - master + - dev + tags: + - 'v*' + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: 'recursive' + + - name: Download Dependencies + run: | + LIBRIME_TAG=$(curl -s https://api.github.com/repos/rime/librime/releases/latest | jq -r '.tag_name') + LIBRIME_SHA=$(curl -s https://api.github.com/repos/rime/librime/tags | jq -r --arg LIBRIME_TAG "${LIBRIME_TAG}" '.[] | select(.name == $LIBRIME_TAG).commit.sha' | cut -c1-7) + LIBRIME_URL="https://github.com/rime/librime/releases/download/${LIBRIME_TAG}/rime-${LIBRIME_SHA}-Windows-msvc.7z" + wget -O librime.7z ${LIBRIME_URL} + 7z x '-i!dist/lib/rime.dll' librime.7z + AHK_VER=$(curl -s https://www.autohotkey.com/download/2.0/version.txt) + AHK_URL="https://www.autohotkey.com/download/2.0/AutoHotkey_${AHK_VER}.zip" + wget -O ahk.zip ${AHK_URL} + unzip -p ahk.zip AutoHotkey32.exe > Rabbit.exe + + - name: Pack Files + run: | + rm -rf temp && mkdir -p temp/Lib/librime-ahk + cp Lib/librime-ahk/rime_api.ahk Lib/librime-ahk/LICENSE temp/Lib/librime-ahk/ + cp Lib/*.ahk temp/Lib/ + cp -r SharedSupport temp/ + cp dist/lib/rime.dll Rabbit.ahk Rabbit.exe LICENSE temp/ + cd temp && zip -r -q ../rabbit.zip * + + - name: Upload Artifacts + uses: actions/upload-artifact@v3 + with: + name: rabbit-zip + path: rabbit.zip diff --git a/README.md b/README.md index 3f9f909..e981247 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # 🐇️玉兔毫 -由 [AutoHotkey](https://www.autohotkey.com/) 实现的 [Rime 输入法引擎](https://github.com/rime/librime/)前端 +由 [AutoHotkey](https://www.autohotkey.com/) 实现的 [Rime 输入法引擎](https://github.com/rime/librime)前端 ## 开源许可 @@ -8,12 +8,13 @@ ## ⚠️正在施工⚠️ -目前仅实现了一个原型,上下文界面使用 [ToolTip](https://www.autohotkey.com/docs/v2/lib/ToolTip.htm) 简单显示,但已经可以用来输入了,此 README 文件就是使用玉兔毫部署的[星空键道](https://github.com/xkinput/Rime_JD)方案编写。 +目前仅实现了一个原型,上下文界面使用 [ToolTip](https://www.autohotkey.com/docs/v2/lib/ToolTip.htm) 简单显示,但已经可以用来输入了,此 README 文件就是使用玉兔毫部署的[星空键道](https://github.com/amorphobia/rime-jiandao)方案编写。可以在 Actions 里找到自动打包的文件,解压后运行 `Rabbit.exe` 即可。 ## 已知问题 -- 尚未实现足够多的图形界面 +- 尚未实现足够多的图形界面,无合适的候选框、无状态提示等 +- 尚未实现基础设置功能,如重新部署、同步等 - 某些窗口拿不到输入光标所在的坐标,ToolTip 会跟随鼠标光标的位置显示 -- 注册热键的问题,例如,上档键输入的字符似乎需要额外注册;热键过多,注册会比较耗时等问题 -- 并非使用系统的输入法接口,而是用热键的方式获取按键,可能导致一些问题,如,需要保留一个英文输入法;退出玉兔毫时,可能无法恢复先前的输入法语言等 +- 注册热键的问题,例如,上档键输入的字符似乎需要额外注册;热键过多,注册会比较耗时等问题(已取消 Win 键的相关注册,应该有所缓解) +- 并非使用系统的输入法接口,而是用热键的方式获取按键,可能导致一些问题,如,需要保留一个英文输入语言;退出玉兔毫时,可能无法恢复先前的输入法语言等 - 管理员权限打开的窗口应该不起作用