From e53fafa8c92d2b79a6a71e0de7b3ef21e4c64b49 Mon Sep 17 00:00:00 2001 From: Minidoracat Date: Sun, 15 Jun 2025 18:28:42 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=E4=BF=AE=E5=BE=A9=20windows=20?= =?UTF-8?q?=E5=92=8C=20linux=20=E6=89=93=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-desktop.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-desktop.yml b/.github/workflows/build-desktop.yml index dc0b5ed..4bec174 100644 --- a/.github/workflows/build-desktop.yml +++ b/.github/workflows/build-desktop.yml @@ -63,6 +63,7 @@ jobs: steps: - name: Check if platform should be built id: check_platform + shell: bash run: | SHOULD_BUILD="false" PLATFORM_INPUT="${{ github.event.inputs.platforms }}" @@ -107,6 +108,7 @@ jobs: run: uv sync --dev - name: Cache Rust dependencies + if: steps.check_platform.outputs.should_build == 'true' uses: actions/cache@v4 with: path: | @@ -122,13 +124,18 @@ jobs: if: ${{ steps.check_platform.outputs.should_build == 'true' && matrix.os == 'ubuntu-latest' }} run: | sudo apt-get update + # 安裝基本依賴 sudo apt-get install -y \ libwebkit2gtk-4.1-dev \ - libappindicator3-dev \ librsvg2-dev \ patchelf \ - libgtk-3-dev \ - libayatana-appindicator3-dev + libgtk-3-dev + + # 嘗試安裝 ayatana-appindicator,如果失敗則使用傳統的 appindicator + if ! sudo apt-get install -y libayatana-appindicator3-dev; then + echo "⚠️ libayatana-appindicator3-dev 安裝失敗,嘗試使用 libappindicator3-dev" + sudo apt-get install -y libappindicator3-dev + fi - name: Build desktop application for ${{ matrix.name }} if: steps.check_platform.outputs.should_build == 'true'