Skip to content

Commit 311e615

Browse files
committed
更改im-select的二进制文件命名, 防止因直接使用源项目的二进制文件时的名称冲突导致本项目安装/卸载程序执行时将其覆盖/删除
1 parent b37b963 commit 311e615

8 files changed

Lines changed: 28 additions & 5 deletions

File tree

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,25 @@
11
# ims-mac
2+
23
一个mac平台下基于 im-select 的输入法选择工具, 但效果更稳定, 可与之无缝替换。
4+
5+
## 安装
6+
7+
### 安装最新版本
8+
9+
```bash
10+
brew install ./Formula/ims-mac.rb
11+
```
12+
13+
### 安装特定版本
14+
15+
现在支持使用 `@version` 语法安装特定版本:
16+
17+
```bash
18+
# 安装 0.2.0 版本
19+
brew install ./Formula/ims-mac@0.2.0.rb
20+
21+
# 其他可用版本
22+
brew install ./Formula/ims-mac@0.1.0.rb
23+
brew install ./Formula/ims-mac@0.3.0.rb
24+
brew install ./Formula/ims-mac@0.4.0.rb
25+
```

dist-arm/ims-mac

0 Bytes
Binary file not shown.

dist-arm/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ RED='\033[0;31m'
66
NC='\033[0m'
77

88
INSTALL_PATH="/usr/local/bin"
9-
BINARIES=("refresh-input-focus" "im-select" "ims-mac")
9+
BINARIES=("refresh-input-focus" "im-select__ims-mac" "ims-mac")
1010

1111
# 检查是否有root权限
1212
if [ "$EUID" -ne 0 ]; then

dist-arm/makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
INSTALL_PATH = /usr/local/bin
2-
BINARIES = refresh-input-focus im-select ims-mac
2+
BINARIES = refresh-input-focus im-select__ims-mac ims-mac
33

44
install:
55
@echo "Installing binaries to $(INSTALL_PATH)..."

dist-arm/uninstall.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ RED='\033[0;31m'
66
NC='\033[0m'
77

88
INSTALL_PATH="/usr/local/bin"
9-
BINARIES=("refresh-input-focus" "im-select" "ims-mac")
9+
BINARIES=("refresh-input-focus" "im-select__ims-mac" "ims-mac")
1010

1111
# 检查是否有root权限
1212
if [ "$EUID" -ne 0 ]; then

dist/dist-arm.zip

2.85 KB
Binary file not shown.

main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
func main() {
1010
var cmd *exec.Cmd
1111
if len(os.Args) > 1 {
12-
err := exec.Command("im-select", os.Args[1]).Run()
12+
err := exec.Command("im-select__ims-mac", os.Args[1]).Run()
1313
if err != nil {
1414
fmt.Printf("执行失败: %v\n", err)
1515
return
@@ -20,7 +20,7 @@ func main() {
2020
fmt.Printf("执行refresh-input-focus失败: %v\n", err)
2121
}
2222
} else {
23-
cmd = exec.Command("im-select")
23+
cmd = exec.Command("im-select__ims-mac")
2424
output, err := cmd.CombinedOutput()
2525
if err != nil {
2626
fmt.Printf("执行失败: %v\n", err)

0 commit comments

Comments
 (0)