Files
msime-windows/server
Evan Hu 60cbd2de1f ci: build and test on Windows for every pull request
Server 端此前没有 CI。tests/ 下已有几十个测试文件并通过 add_test 注册,但从来没有在 PR 上跑过,回归只能靠人工在本机复现。

workflow 不走 preset:preset 指定 Visual Studio 18 2026 生成器和 C:/Users/sonnycalcr 的 vcpkg 路径,在 runner 上都不成立。Boost 也不能来自 manifest——CMakeLists.txt 要求 Boost locale 和 json 且按静态链接,但 vcpkg.json 里没有声明它,README 让用 Scoop 单独安装。这里改用 classic 模式装静态 Boost,再通过 CMakeLists.txt 已经支持的 BOOST_ROOT 环境变量指过去,不改动 vcpkg.json。
2026-09-05 14:19:26 +09:00
..
2026-03-12 01:34:41 +08:00
2026-07-28 02:27:49 +08:00
2025-07-26 18:32:46 +08:00
2026-09-02 16:40:46 +08:00
2026-09-02 19:12:16 +08:00
2026-07-20 15:36:12 +08:00
2025-04-16 02:03:11 +08:00
2026-04-02 18:25:57 +08:00
2025-11-10 21:10:36 +08:00
2026-07-21 23:12:17 +08:00
2026-02-28 18:19:11 +08:00
2026-08-14 16:36:34 +08:00

Metasequoia IME Server(水杉输入法 Server 端)

This is the server end of MetasequoiaImeTsf.

How to build

Prerequisites

  • Visual Studio 2026
  • CMake
  • vcpkg
  • Python3.10+
  • Boost

Make sure vcpkg and Boost are installed by Scoop.

Build steps(For Dev)

First, build IME dictonary and prepare assets,

cd $env:LOCALAPPDATA
mkdir metasequoiaime
cd metasequoiaime
git clone --recursive https://github.com/metasequoiaime/MetasequoiaImeDict.git
cd .\MetasequoiaImeDict\makecikudb\xnheulpb\makedb\separated_jp_version
python .\create_db_and_table.py
python .\insert_data.py
python .\create_index_for_db.py
Copy-Item -Path .\out\msime.db -Destination $env:LOCALAPPDATA\metasequoiaime

Then, clone and build MetasequoiaImeServer,

git clone --recursive https://github.com/metasequoiaime/MetasequoiaImeServer.git

Prepare environment,

cd MetasequoiaImeServer
python .\scripts\prepare_env.py
Copy-Item -Path .\assets\tables\* -Destination $env:LOCALAPPDATA\metasequoiaime
New-Item -ItemType SymbolicLink -Path "$env:LOCALAPPDATA\metasequoiaime\config.toml" -Target ".\assets\config\config.toml"

e.g.

cd MetasequoiaImeServer
python .\scripts\prepare_env.py
Copy-Item -Path .\assets\tables\* -Destination $env:LOCALAPPDATA\metasequoiaime
New-Item -ItemType SymbolicLink -Path "C:\Users\sonnycalcr\AppData\Local\metasequoiaime\config.toml" -Target "C:\Users\sonnycalcr\EDisk\CppCodes\IMECodes\MetasequoiaImeServer\assets\config\config.toml"

Then, build and run,

.\scripts\lcompile.ps1
.\scripts\lrun.ps1

If you want to build and run in one step, run the following command,

.\scripts\llaunch.ps1

Watchdog

MetasequoiaImeWatchdog.exe is built next to the server. Starting the server directly also starts the watchdog, which monitors the server from the same directory and restarts it after an unexpected exit. Repeated early crashes use an exponential restart delay (up to 30 seconds) to avoid a restart storm.

The developer terminate shortcut stops both processes. The restart shortcut asks the watchdog to start a fresh server after the current process exits.

English prefix candidates

Place english.db next to msime.db in %LOCALAPPDATA%\metasequoiaime. Set general.cn_en_mixed_input = true in config.toml to enable asynchronous English prefix candidates for Quanpin and Shuangpin.

Developer Shortcuts

The server process includes a few built-in global shortcuts that are useful during development:

  • Ctrl + Shift + Alt + T
    • terminate MetasequoiaImeServer immediately
  • Ctrl + Shift + Alt + R
    • restart MetasequoiaImeServer
  • Ctrl + Shift + Alt + C
    • clear IME engine cache
  • Ctrl + Shift + Alt + 1 to Ctrl + Shift + Alt + 8
    • delete candidate 1 to 8 from the current candidate window
    • this only works while the candidate window is visible

Screenshots