feat(windows): 增加 PowerShell 一键安装脚本, 无需 Ruby#40
Open
joyshan1986 wants to merge 1 commit intoMark24Code:mainfrom
Open
feat(windows): 增加 PowerShell 一键安装脚本, 无需 Ruby#40joyshan1986 wants to merge 1 commit intoMark24Code:mainfrom
joyshan1986 wants to merge 1 commit intoMark24Code:mainfrom
Conversation
为 Windows 用户提供无需安装 Ruby 的部署方式, 解决多个 issue 中 反映的安装失败 / 部署不生效问题 (Mark24Code#17, Mark24Code#22, Mark24Code#33 等). 脚本特性: - 自动结束 Weasel* 进程, 避免文件占用导致 git clone 目标目录非空失败 (现有 Ruby 流程的 move + clone 在 Weasel 运行时会部分失败) - 删除旧 %APPDATA%\Rime, fresh git clone --depth=1 rime-ice - 复制 custom/*.yaml 到部署目录 - 智能查找 WeaselDeployer.exe: * 优先读注册表 HKLM\SOFTWARE\Rime\Weasel\WeaselRoot * 回退扫描所有固定盘的 Program Files / Program Files (x86) * 支持非 C 盘安装 (例如 D:\Program Files\Rime\weasel-x.x.x) - 启动 WeaselServer 并触发 /deploy install.bat 是双击包装, 内置 -ExecutionPolicy Bypass, 普通用户可 直接双击使用. WINDOWS_README.md 顶部新增"快速部署"章节, 推荐使用新脚本, 老 Ruby 流程作为兜底保留. 不修改任何 custom/ 内的配置文件, 与现有部署行为完全一致.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
Windows 用户使用现有
installer.rb流程时,经常遇到以下问题(参见 #17 #22 #33 等):move+git clone在 Weasel 运行时会失败 —— 当WeaselServer.exe占着%APPDATA%\Rime下的某些文件时,Windows 的move只能搬走未被锁的文件。后续git clone看到目标目录非空就报fatal: destination already exists and is not an empty directory,留下半旧半新的混乱状态改动
新增两个文件 + 更新
WINDOWS_README.md,不修改任何custom/内配置,与现有部署行为完全一致。install.ps1—— PowerShell 一键脚本Weasel*进程,消除文件占用%APPDATA%\Rime(干净状态)git clone --depth=1最新 rime-icecustom/*.yamlWeaselDeployer.exe:① 优先读注册表
HKLM\SOFTWARE\Rime\Weasel\WeaselRoot(官方安装写入)② 回退扫描所有固定盘的
Program Files/Program Files (x86)③ 启动
WeaselServer并调用/deploy支持小狼毫安装在任意盘符。无需管理员权限。
install.bat双击包装,内置
-ExecutionPolicy Bypass,绕过 PowerShell 默认执行策略,普通用户双击即可。WINDOWS_README.md顶部新增「🚀 快速部署」章节,推荐新脚本流程,老 Ruby 流程保留作为兜底参考(新手不会被强制学 Ruby)。
使用方法
测试
实测平台:Windows 11 Pro(用户名 / 路径任意,小狼毫装在
D:\Program Files\Rime\weasel-0.17.4),从全新状态到部署完成、输入法可用,全程无人工干预。兼容性
installer.rb(保留)custom/配置(默认行为完全一致)