Files
msime-windows/server
Lu Fan(SonnyCalcr) e701cebbe4 feat(server,ui,installer): 内置皮肤改由皮肤清单定义,新增微信绿(卷轴)内置皮肤 (#1061)
* feat(ui): CandidateList 支持等宽网格列与关闭选中态

- Appearance::gridColumns:横排时按可用宽度均分成等宽列(列数不超过 gridColumns,每列不窄于
  minItemWidth),放不下一列的项占多列。
- Appearance::selectable:为 false 时不画任何选中态,首项也能正常显示悬停与按下效果。

* feat(server,installer): 内置皮肤改由皮肤清单定义,新增微信绿(卷轴)内置皮肤

内置皮肤数据化:
- skins/default/<id>/skin.toml 从只放开关改为完整的出厂清单(配色、圆角、版式、工具栏、名称与说明),
  并新增 canvas 基底的清单。候选窗、悬浮工具栏、光标状态徽标不再在代码里写死任何内置皮肤的参数。
- 出厂清单在构建时编进程序;数据目录里的清单写了的键覆盖出厂值,缺失或写错时退回出厂外观。
  安装包改为每次整份覆盖 skins\default。
- 皮肤清单新增版式键(padding、item_gap、number_inset 等,长度可写 DIP 或 "0.3em"),以及
  [candidate_window.horizontal] / [candidate_window.vertical] 分排列覆盖、page_arrow_divider、
  toolbar.icon_corner_radius_dip。
- test_candidate_skin_tokens 保留改动前的内置分支作参照,逐个皮肤、主题、排列与字号比对清单解析结果。

共用候选窗场景:
- 候选框的场景搭建与套皮肤抽成 CandidateSkinScene,候选窗与设置页的皮肤预览共用;设置页预览改用
  真实的候选窗控件绘制,删除原先移植自网页样式的预览绘制与各皮肤硬编码。

卷轴展开(expand_panel)与微信绿(卷轴):
- 皮肤开关 expand_panel / expand_rows:横排候选行右端的展开按钮,展开后首行与后续候选网格一起滚动,
  右侧细滚动条;展开与收起只认按钮,展开时滚轮上下滚动、不翻页。
- 网格点选按绝对下标上屏并在工作线程核对显示文字;滚到底部时自动再展开一批候选。
- 新增内置皮肤 wechat_scroll「微信绿(卷轴)」。
2026-10-18 20:42:06 +08:00
..
2026-03-12 01:34:41 +08:00
2025-04-16 02:03:11 +08:00
2025-11-10 21:10:36 +08:00

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

This is the server end of MSIME-Windows.

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)

Clone the product and provision the reviewed dictionary release from its root:

git clone --recursive https://github.com/metasequoiaime/MSIME-Windows.git
cd MSIME-Windows
python scripts/product_lock.py fetch-dictionaries --staging-root .
if ($LASTEXITCODE -ne 0) { throw 'Dictionary verification failed' }
$devLocalData = Join-Path $PWD 'build/dev-local'
$devData = Join-Path $devLocalData 'metasequoiaime'
New-Item -ItemType Directory -Force $devData | Out-Null
Copy-Item MetasequoiaImeDict/out/* $devData -Force
Copy-Item engine/helpcode/helpcodes $devData -Recurse -Force
Copy-Item server/assets/tables/* $devData -Force
Copy-Item server/assets/config/config.toml $devData -Force
$devAssets = Join-Path $devData 'assets'
New-Item -ItemType Directory -Force $devAssets | Out-Null
Copy-Item server/assets/settings $devAssets -Recurse -Force
python server/scripts/prepare_env.py
if ($LASTEXITCODE -ne 0) { throw 'Server environment setup failed' }
$env:LOCALAPPDATA = $devLocalData
$env:METASEQUOIA_IME_DATA_DIR = $devData
cd server

Use a dedicated PowerShell terminal. These steps stage the same locked data as CI and the settings window assets in a separate development directory. Both LOCALAPPDATA (Windows config/assets) and METASEQUOIA_IME_DATA_DIR (Engine data) are set for that terminal; setting only the latter would still use installed Windows configuration and assets. Close the terminal after development. Dictionary source changes belong in Engine's dictionary/; use its root build_profile.py to build data instead of calling internal stages in the archived Dict repository.

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. The master switch utility.mixed_candidates must also be on; English, emoji, kaomoji and date/time mixed candidates are queried together on the single MixedCandidates worker thread (src/mixed/).

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
    • Settings exposes the same restart under 外观 → 重启输入法进程; it reaches the server over the Aux pipe because Settings runs in its own process
  • 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

Shared voice providers

The server links Engine VoiceCapture and Voice. WAV encoding and batch transcription/polish codecs come from the public library; Windows keeps provider configuration, SiliconFlow padding/retry behavior and Doubao streaming. Batch uploads are bounded to 20 MiB and responses to 1 MiB. Failed or empty polish responses retain the original transcript.

本地 Release 构建脚本可通过 -ManifestTool <mt.exe 路径> 使用其他 Windows SDK;未指定时沿用现有 SDK 路径。配置、编译或 manifest 嵌入失败都会中止,避免安装器收集旧产物。