Ver código fonte

feat: Support windows aarch64 (#112)

MystiPanda 1 ano atrás
pai
commit
82c630bd0e

+ 15 - 7
.github/workflows/release.yml

@@ -20,8 +20,8 @@ jobs:
             target: x86_64-pc-windows-msvc
           - os: windows-latest
             target: i686-pc-windows-msvc
-          # - os: windows-latest
-          #   target: aarch64-pc-windows-msvc
+          - os: windows-latest
+            target: aarch64-pc-windows-msvc
           - os: macos-latest
             target: aarch64-apple-darwin
           - os: macos-latest
@@ -32,12 +32,22 @@ jobs:
       - name: Checkout Repository
         uses: actions/checkout@v4
 
+      - name: Apply Patch
+        if: matrix.target == 'aarch64-pc-windows-msvc'
+        run: |
+          git config --global user.email "clash-verge-rev@github.io"
+          git config --global user.name "clash-verge-rev"
+          git am patches/support-windows-aarch64.patch
+
+      - name: Init Submodule
+        if: matrix.target == 'aarch64-pc-windows-msvc'
+        run: git submodule update --init --recursive
+
       - name: Install Rust Stable
         uses: dtolnay/rust-toolchain@stable
 
       - name: Add Rust Target
-        run: |
-          rustup target add ${{ matrix.target }}
+        run: rustup target add ${{ matrix.target }}
 
       - name: Rust Cache
         uses: Swatinem/rust-cache@v2
@@ -61,7 +71,6 @@ jobs:
           pnpm check ${{ matrix.target }}
 
       - name: Tauri build
-        if: startsWith(matrix.os, 'windows') || startsWith(matrix.os,'macos') || startsWith(matrix.target,'x86_64')
         uses: tauri-apps/tauri-action@v0
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -78,8 +87,7 @@ jobs:
 
       - name: Portable Bundle
         if: matrix.os == 'windows-latest'
-        run: |
-          pnpm portable ${{ matrix.target }}
+        run: pnpm portable ${{ matrix.target }}
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
           TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}

+ 1 - 1
patches/support-windows-aarch64.patch

@@ -29,7 +29,7 @@ index 4c6dde5..5fd9ad8 100644
  nanoid = "0.4"
  chrono = "0.4"
  sysinfo = "0.29"
--rquickjs = "0.4"
+-rquickjs = "0.3"
  serde_json = "1.0"
  serde_yaml = "0.9"
  auto-launch = "0.5"

+ 1 - 1
src-tauri/Cargo.toml

@@ -25,7 +25,7 @@ log4rs = "1"
 nanoid = "0.4"
 chrono = "0.4"
 sysinfo = "0.29"
-rquickjs = "0.4"
+rquickjs = "0.3"
 serde_json = "1.0"
 serde_yaml = "0.9"
 auto-launch = "0.5"