Skip to content

Releases: LuSrackhall/ims-mac

pre.0.4.0

22 Nov 08:25

Choose a tag to compare

如pre.0.3.0所叙述发布pre.0.4.0

不再重复叙述下载安装的方式, 可参考项目主页README0.2.0的release说明文本

虽然ims-mac几乎没有性能损耗的解决了相关bug。 但仍希望macos官方可以早日从api层面修复相关问题。

pre.0.3.0

22 Nov 07:22

Choose a tag to compare

pre.0.3.0 Pre-release
Pre-release

此版本中, 我针对性的对于某些应用窗口中切换时丢失焦点的问题做了针对性的修复逻辑, 不过仍有极少数窗口无法准确覆盖到(比如App Store中的搜索栏等特别场景)。 遗憾的是, 此版本未能彻底解决某些应用中窗口和光标闪烁的问题(仅解决了部分窗口的内容区域闪烁, 却没能解决窗口阴影的闪烁以及光标的闪烁)。

一直以来未更新此项目的原因是:

  • 我直到最近几天才重新开始使用mac(因为我的3年前的win笔记本最近几周越来越卡了, 我逐渐无法忍受但又不想购买新的机器才又用回了年初购买的mac)
  • 另一点就是从私有项目中分离出开源仓库的流程属实是有点麻烦, 索性直接从私有仓库建立发布分支, 并通过pre的形式直接推送发布的打包结果到公开仓库的release, 这样就避免了维护两套近乎相同的代码仓库的低效率与不可持续性。

此版本更新仅通过Pre形式发布的原因是:

  • 这些构建产物仅是我个人工作流的某个仓库中的简单打包分离, 并不是完全在ims-mac仓库中进行的。无法完全代表当前项目仓库的正式release, 毕竟代码来源不再这里。
  • ims-mac致力于解决im-select项目中面临的切换未激活的问题, 而主要的应用场景就是类似vim/neovim/vscodevim等之类的纯键盘编辑器项目中, 而在这些场景中面临的窗口和光标闪烁问题本次提交并未能解决。(本次解决的这些问题似乎脱离了类似项目的应用场景)

我移除了此版本的构建产物, 是因为我发现在0.2.0版本中曾说, 将在后续发布中将构建结果合为单一的进程调用。(但pre.0.3.0仍为三个进程的相互的ipc调用, 所以我会在稍后发布兑现此承诺的pre.0.4.0版本)

0.2.0

14 Apr 05:33

Choose a tag to compare

英文

After verification, the stuttering issue in version 0.1.0 originated from the use of Go's natively supported embedded file system in the Go logic. The embedded file logic in Go has now been removed, the performance of the switching effect is nearly identical to native.

It is possible that Go's compilation and packaging process includes the entire runtime and garbage collection dependencies, resulting in a package size of 1.7MB despite relatively simple content. Future versions will consider removing all Go dependencies to reduce the package size.

But I don't like reinventing the wheel. The performance and reliability of the current version's switching effect are already indistinguishable from native, and there's no need for further optimization.

This version introduces installation scripts, supporting both Makefile and shell scripts, allowing users to choose either for quick installation.

Installing ims-mac

1. Installing via Homebrew (Recommended)

Visit the ims-mac project homepage for the corresponding commands.

2. Manual Installation

Installation Process

Download:

  • Download and unzip the zip package corresponding to your CPU architecture from the release section below. (As I do not have access to an x64 machine, if you are using such a machine and this project, please provide feedback on whether it works properly.)
  • Drag the unzipped directory to the Terminal icon to open the corresponding path in Terminal (or navigate to the directory in Terminal using other methods).
  • Verify the integrity of the download (optional):

    SHA256 Verification
    dist-arm.zip -> 51cba98c71877bdee1ce974a51c2f3c503dd6d1c85189bfb56274f8bcaa35529
    dist-x64.zip -> 58a5bd8015dc9252b3e0d82fe88ba7245cdb4d0a856885ba1851d2ef33c38fd9

    On macOS, the SHA256 command is typically shasum -a 256 filename (replace filename with the downloaded dist-arm.zip or dist-x64.zip).

  • Unzip:

    On macOS, opening a .zip file typically triggers automatic unzipping.
    The package for version 0.2.0 of ims-mac includes 1 Makefile, 2 shell scripts, and 3 binary files.

Installation:

  • Run make install, make, or sudo ./install.sh to install (choose any one of the three commands).
  • Run the ims-mac command. If the output shows the identifier of the current input method, the installation is successful.

    Due to macOS's signing mechanism, you may need to go to Privacy & Security settings and select "Allow Anyway" -> "Open Anyway." (Since version 0.2.0 of ims-mac involves 3 binary files with interdependent IPC calls, you may need to perform similar operations for each of the three binaries. This is only for the initial version, and I will aim to consolidate them into a single process call in future versions.)

The final installation location for manual installation is: /usr/local/bin

Uninstallation:

Open the package for the corresponding version, and run the uninstallation script to complete the uninstallation. (Alternatively, you can manually delete the corresponding binary files from the installation location.)

  • Run make uninstall or sudo ./uninstall.sh to uninstall (choose either command).
  • Run the ims-mac command. If the output indicates that the command does not exist or a similar message, the uninstallation is successful.

中文

经过验证, 0.1.0版本的卡顿源于go逻辑中使用了go原生支持的嵌入文件系统, 现已移除了go语言中的嵌入文件逻辑, 性能大幅度提升以至于媲美原生的切换效果。

可能由于go语言的编译打包流程会将整个运行时和gc依赖打包进去, 因此虽然内容较为简单但大小仍达到了1.7m之多, 后续版本考虑移除所有go依赖以减小包体积。

但是我不喜欢重复造轮子, 当前版本切换效果的性能与可靠性已经跟原生无差别, 没有进一步优化的必要。

此版本新增了安装脚本, 分别适配了makefile脚本和sh脚本, 可任选其一进行快速安装。

安装ims-mac

1. 使用 Homebrew 安装(推荐)

可前往ims-mac项目主页查看对应命令。

2. 手动安装

安装流程
下载:

  • 下载并解压本release下方对应cup架构的zip包。(由于个人没有x64架构的机器, 如果您是此类型机器并刚好使用本项目, 请在反馈使用是否有问题)
  • 将解压后的目录托入终端图标以在终端打开对应路径。(或由其它方式通过终端进入此目录)
  • 校验下载的完整性(可选)

    通过sha256校验
    dist-arm.zip -> 51cba98c71877bdee1ce974a51c2f3c503dd6d1c85189bfb56274f8bcaa35529
    dist-x64.zip -> 58a5bd8015dc9252b3e0d82fe88ba7245cdb4d0a856885ba1851d2ef33c38fd9

    mac上的sha256命令通常为shasum -a 256 文件名(这里的文件名替换为你所下载的dist-arm.zipdist-x64.zip

  • 解压。

    在mac中, 通常打开.zip文件, 即可自动解压索。
    0.2.0版本的ims-mac的包内容中包括1个makefile文件、 2个sh脚本、 3个二进制文件。

安装:

  • 执行make installmakesudo ./install.sh命令进行安装。(三个命令任选其一即可)
  • 执行ims-mac命令, 输出结果为当前输入法的标识即代表安装成功。

    由于mac的签名机制问题, 您可能需要再隐私与安全中选择"仍要允许"->"仍要打开"。(由于ims-mac项目的0.2.0版本存在3个二进制文件相互依赖的ipc调用, 因此您可能需要三组类似的操作--> 这只是初始版本, 后续我会尝试将其合为单一的进程调用)

手动安装的最终安装的位置为: /usr/local/bin

卸载:

打开安装时对应版本的包, 执行其中的卸载脚本即可完成卸载。(当然, 您也可以前往安装位置手动删除对应的二进制文件)

  • 执行make uninstallsudo ./uninstall.sh 命令进行卸载。(两个命令任选其一即可)
  • 执行ims-mac命令, 输入结果为命令不存在或类似提示即代表卸载成功。

0.1.0

14 Apr 00:28

Choose a tag to compare

英文

This version only packages the executable for the ARM architecture to verify its performance. If the results are poor, there is no need to package an x64 version (as modifying the Makefile later would be too cumbersome).

The result is that the performance is very poor. Although it is usable, the performance and speed fall short of expectations. Therefore, we do not recommend using version 0.1.0, and no installation instructions are provided.

Analysis of Poor Performance Reasons:

  1. The startup speed of the Go language itself (this is unlikely).
  2. The embedded file system in Go (since the embedded file system was used to package all binary dependency files together, and these files often need to be rewritten to a temporary directory before being called, this is highly likely to be the cause).
  3. Excessive IPC call chains (this is also a possible reason, as the mode in this version requires calling three processes to switch the input method once).

中文

此版本仅打包arm架构的可执行程序, 用于验证效果, 效果差的话, 没必要打包x64版本(不然后续改makefile太费事)。

结果是, 效果很差, 虽然可以用, 但性能和速度不及预期, 故不推荐使用0.1.0版本, 不提供安装说明。

性能差的原因分析:

  • go语言的启动速度本身造成的(这个可能性很小)
  • go语言的内嵌文件系统造成的(由于使用了内嵌文件系统来将所有二进制依赖文件打包在了一起, 而调用之前往往需要将其重新写入临时目录, 所以极有可能是这个原因)
  • 过多的ipc调用链路造成的(这个原因也是有可能的, 毕竟此版本的模式, 切换一次输入法要调用三个进程)