diff --git a/bin/cursor_id_modifier_v2.0.0_darwin_amd64_intel b/bin/cursor_id_modifier_v2.0.0_darwin_amd64_intel index 969fa22..4fb1cce 100644 Binary files a/bin/cursor_id_modifier_v2.0.0_darwin_amd64_intel and b/bin/cursor_id_modifier_v2.0.0_darwin_amd64_intel differ diff --git a/bin/cursor_id_modifier_v2.0.0_darwin_arm64_m1 b/bin/cursor_id_modifier_v2.0.0_darwin_arm64_m1 index 771f360..efe1890 100644 Binary files a/bin/cursor_id_modifier_v2.0.0_darwin_arm64_m1 and b/bin/cursor_id_modifier_v2.0.0_darwin_arm64_m1 differ diff --git a/bin/cursor_id_modifier_v2.0.0_linux_amd64 b/bin/cursor_id_modifier_v2.0.0_linux_amd64 index 9532b92..3fd6eea 100644 Binary files a/bin/cursor_id_modifier_v2.0.0_linux_amd64 and b/bin/cursor_id_modifier_v2.0.0_linux_amd64 differ diff --git a/bin/cursor_id_modifier_v2.0.0_windows_amd64.exe b/bin/cursor_id_modifier_v2.0.0_windows_amd64.exe index 22784c3..46e1cd7 100644 Binary files a/bin/cursor_id_modifier_v2.0.0_windows_amd64.exe and b/bin/cursor_id_modifier_v2.0.0_windows_amd64.exe differ diff --git a/install.sh b/install.sh index 10f189b..4a9876a 100644 --- a/install.sh +++ b/install.sh @@ -76,7 +76,7 @@ check_requirements() { # Verify binary / 验证二进制文件 verify_binary() { - info "Verifying binary..." "正在验证二���制文件..." + info "Verifying binary..." "正在验证二进制文件..." if [ ! -f "$TEMP_DIR/$BINARY_NAME" ]; then error "Binary file download failed or does not exist" \ "二进制文件下载失败或不存在" @@ -122,16 +122,21 @@ main() { info "Downloading cursor-id-modifier ($OS-$ARCH)..." \ "正在下载 cursor-id-modifier ($OS-$ARCH)..." - # 修改下载 URL,使用正确的仓库分支和文件路径 + # 使用正确的 URL 格式 DOWNLOAD_URL="https://github.com/yuaotian/go-cursor-help/raw/refs/heads/master/bin/$BINARY_NAME" - # 使用 curl 显示详细的下载进度信息 - if ! curl -L --progress-bar \ - "$DOWNLOAD_URL" -o "$TEMP_DIR/$BINARY_NAME" 2>/dev/null; then - error "Failed to download binary from: $DOWNLOAD_URL (HTTP Status: $?)" \ - "从以下地址下载二进制文件失败:$DOWNLOAD_URL (HTTP状态码: $?)" + info "Temporary file will be saved to: $TEMP_DIR" \ + "临时文件将保存到:$TEMP_DIR" + + # 使用 curl 显示下载进度 + if ! curl -L --progress-bar "$DOWNLOAD_URL" -o "$TEMP_DIR/$BINARY_NAME"; then + error "Failed to download binary from: $DOWNLOAD_URL" \ + "从以下地址下载二进制文件失败:$DOWNLOAD_URL" fi + success "Download completed to: $TEMP_DIR/$BINARY_NAME" \ + "下载完成,文件位置:$TEMP_DIR/$BINARY_NAME" + # Verify download / 验证下载 verify_binary @@ -161,7 +166,7 @@ main() { cleanup_old_version() { if [ -f "$INSTALL_DIR/cursor-id-modifier" ]; then - info "Removing old version..." "正在删除旧版本..." + info "Removing old version..." "正在删除旧版..." rm -f "$INSTALL_DIR/cursor-id-modifier" || \ error "Failed to remove old version" "删除旧版本失败" fi diff --git a/main.go b/main.go index cb3bfbb..275e691 100644 --- a/main.go +++ b/main.go @@ -51,6 +51,7 @@ type TextResource struct { RunAsAdmin string RunWithSudo string SudoExample string + ConfigLocation string } // StorageConfig 优化的存储配置结构 / StorageConfig optimized storage configuration struct @@ -102,6 +103,7 @@ var ( RunAsAdmin: "请右键点击程序,选择「以管理员身份运行」", RunWithSudo: "请使用 sudo 命令运行此程序", SudoExample: "示例: sudo %s", + ConfigLocation: "配置文件位置:", }, EN: { SuccessMessage: "[√] Configuration file updated successfully!", @@ -114,6 +116,7 @@ var ( RunAsAdmin: "Please right-click and select 'Run as Administrator'", RunWithSudo: "Please run this program with sudo", SudoExample: "Example: sudo %s", + ConfigLocation: "Config file location:", }, } ) @@ -350,9 +353,15 @@ func showSuccess() { text := texts[currentLanguage] successColor := color.New(color.FgGreen, color.Bold) warningColor := color.New(color.FgYellow, color.Bold) + pathColor := color.New(color.FgCyan) successColor.Printf("\n%s\n", text.SuccessMessage) warningColor.Printf("%s\n", text.RestartMessage) + + // 获取并输出配置文件路径 + if configPath, err := getConfigPath(); err == nil { + pathColor.Printf("\n配置文件位置/Config file location:\n%s\n", configPath) + } } func showPrivilegeError() { @@ -668,7 +677,7 @@ func initConfig() *Config { } } -// UI 组件���化 +// UI 组件 type UI struct { config *UIConfig spinner *ProgressSpinner diff --git a/releases/linux/cursor-id-modifier b/releases/linux/cursor-id-modifier deleted file mode 100644 index d1b67a7..0000000 Binary files a/releases/linux/cursor-id-modifier and /dev/null differ diff --git a/releases/macos/cursor-id-modifier-amd64 b/releases/macos/cursor-id-modifier-amd64 deleted file mode 100644 index d1b67a7..0000000 Binary files a/releases/macos/cursor-id-modifier-amd64 and /dev/null differ diff --git a/releases/macos/cursor-id-modifier-arm64 b/releases/macos/cursor-id-modifier-arm64 deleted file mode 100644 index d1b67a7..0000000 Binary files a/releases/macos/cursor-id-modifier-arm64 and /dev/null differ diff --git a/releases/v1.0.1/releases/v1.0.1/cursor-id-modifier b/releases/v1.0.1/releases/v1.0.1/cursor-id-modifier deleted file mode 100644 index 81163c1..0000000 Binary files a/releases/v1.0.1/releases/v1.0.1/cursor-id-modifier and /dev/null differ diff --git a/releases/v1.0.1/releases/v1.0.1/cursor-id-modifier-amd64 b/releases/v1.0.1/releases/v1.0.1/cursor-id-modifier-amd64 deleted file mode 100644 index 81163c1..0000000 Binary files a/releases/v1.0.1/releases/v1.0.1/cursor-id-modifier-amd64 and /dev/null differ diff --git a/releases/v1.0.1/releases/v1.0.1/cursor-id-modifier-arm64 b/releases/v1.0.1/releases/v1.0.1/cursor-id-modifier-arm64 deleted file mode 100644 index 81163c1..0000000 Binary files a/releases/v1.0.1/releases/v1.0.1/cursor-id-modifier-arm64 and /dev/null differ diff --git a/releases/v1.0.1/releases/v1.0.1/cursor-id-modifier.exe b/releases/v1.0.1/releases/v1.0.1/cursor-id-modifier.exe deleted file mode 100644 index 81163c1..0000000 Binary files a/releases/v1.0.1/releases/v1.0.1/cursor-id-modifier.exe and /dev/null differ