黄中银 2 hete
szülő
commit
b4584d2a0e

+ 5 - 56
.github/workflows/release.yml

@@ -6,54 +6,8 @@ on:
       - 'v*'
 
 jobs:
-  # 第一步:类型检查、更新版本号并提交
-  update-version:
-    runs-on: ubuntu-latest
-    outputs:
-      version: ${{ steps.version.outputs.VERSION }}
-
-    steps:
-      - name: Checkout code
-        uses: actions/checkout@v4
-
-      - name: Setup Node.js
-        uses: actions/setup-node@v4
-        with:
-          node-version: '20'
-          cache: 'npm'
-
-      - name: Install dependencies
-        run: npm ci
-
-      - name: Type check
-        run: npm run typecheck
-
-      - name: Extract version from tag
-        id: version
-        run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
-
-      - name: Update version in all config files
-        run: |
-          # Update package.json
-          npm pkg set version=${{ steps.version.outputs.VERSION }}
-
-          # Update Cargo.toml
-          sed -i 's/^version = ".*"/version = "${{ steps.version.outputs.VERSION }}"/' src-tauri/Cargo.toml
-
-          # Update tauri.conf.json
-          sed -i 's/"version": ".*"/"version": "${{ steps.version.outputs.VERSION }}"/' src-tauri/tauri.conf.json
-
-      - name: Commit version update
-        run: |
-          git config user.name "github-actions[bot]"
-          git config user.email "github-actions[bot]@users.noreply.github.com"
-          git add package.json src-tauri/Cargo.toml src-tauri/tauri.conf.json
-          git commit -m "chore: bump version to ${{ steps.version.outputs.VERSION }}" || echo "No changes to commit"
-          git push origin HEAD:main
-
-  # 第二步:并行构建所有平台
+  # 第一步:并行构建所有平台
   build:
-    needs: update-version
     strategy:
       fail-fast: false
       matrix:
@@ -76,8 +30,6 @@ jobs:
     steps:
       - name: Checkout code
         uses: actions/checkout@v4
-        with:
-          ref: main
 
       - name: Setup Node.js
         uses: actions/setup-node@v4
@@ -109,11 +61,10 @@ jobs:
           sudo apt-get update
           sudo apt-get install -y \
             libwebkit2gtk-4.1-dev \
-            libappindicator3-dev \
+            libayatana-appindicator3-dev \
             librsvg2-dev \
             patchelf \
-            libgtk-3-dev \
-            libayatana-appindicator3-dev
+            libgtk-3-dev
 
       - name: Install dependencies
         run: npm ci
@@ -141,9 +92,9 @@ jobs:
           path: built/*
           if-no-files-found: error
 
-  # 第步:创建 Release 并上传所有产物
+  # 第步:创建 Release 并上传所有产物
   release:
-    needs: [update-version, build]
+    needs: build
     runs-on: ubuntu-latest
     permissions:
       contents: write
@@ -162,8 +113,6 @@ jobs:
       - name: Create Release
         uses: softprops/action-gh-release@v1
         with:
-          tag_name: v${{ needs.update-version.outputs.version }}
-          name: 'Claude AI Installer v${{ needs.update-version.outputs.version }}'
           body: |
             ## Downloads
 

+ 3 - 0
src-tauri/Cargo.toml

@@ -40,6 +40,9 @@ regex = "1"
 [target.'cfg(windows)'.dependencies]
 winreg = "0.52"
 
+[target.'cfg(unix)'.dependencies]
+libc = "0.2"
+
 [profile.release]
 panic = "abort"
 codegen-units = 1

+ 4 - 5
src-tauri/src/commands/install.rs

@@ -1,7 +1,6 @@
 use crate::commands::AppState;
-use crate::commands::config::{get_git_mirror_config, get_nodejs_mirror_config};
-use crate::utils::http::{get_client, HttpRequest};
-use crate::utils::shell::{run_program, run_shell_hidden, CommandOptions};
+use crate::utils::http::get_client;
+use crate::utils::shell::run_shell_hidden;
 use futures::StreamExt;
 use serde::{Deserialize, Serialize};
 use std::io::Write;
@@ -567,7 +566,7 @@ where
 async fn install_vscode<F, C>(
     _app: &tauri::AppHandle,
     _state: &State<'_, AppState>,
-    options: &InstallOptions,
+    _options: &InstallOptions,
     emit_status: F,
     is_cancelled: C,
 ) -> Result<InstallResult, String>
@@ -753,7 +752,7 @@ where
 async fn install_git<F, C>(
     _app: &tauri::AppHandle,
     _state: &State<'_, AppState>,
-    options: &InstallOptions,
+    _options: &InstallOptions,
     emit_status: F,
     is_cancelled: C,
 ) -> Result<InstallResult, String>