Skip to content

Commit 1346fbd

Browse files
author
PeroChat Bot
committed
迁移至 Tauri v2 Mobile 架构,优化移动端 Live2D 交互与提醒系统
1 parent 3df38d3 commit 1346fbd

122 files changed

Lines changed: 15372 additions & 7316 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/android-build.yml

Lines changed: 0 additions & 64 deletions
This file was deleted.

.github/workflows/init-android.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Initialize Android Project
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions:
7+
contents: write
8+
9+
jobs:
10+
init-android:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Setup Java
16+
uses: actions/setup-java@v4
17+
with:
18+
distribution: 'zulu'
19+
java-version: '17'
20+
21+
- name: Setup Rust
22+
uses: dtolnay/rust-toolchain@stable
23+
24+
- name: Install pnpm
25+
uses: pnpm/action-setup@v3
26+
with:
27+
version: 9
28+
29+
- name: Setup Node
30+
uses: actions/setup-node@v4
31+
with:
32+
node-version: 20
33+
cache: 'pnpm'
34+
35+
- name: Install dependencies
36+
run: pnpm install
37+
38+
- name: Initialize Tauri Android
39+
run: |
40+
pnpm tauri android init --ci
41+
env:
42+
CI: true
43+
44+
- name: Commit and Push
45+
run: |
46+
git config --global user.name "github-actions[bot]"
47+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
48+
git add src-tauri/gen/android
49+
git commit -m "chore: Initialize Tauri Android project"
50+
git push

.github/workflows/tauri-build.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Tauri Build
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
workflow_dispatch:
7+
8+
jobs:
9+
build-android:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Setup Java
15+
uses: actions/setup-java@v4
16+
with:
17+
distribution: 'zulu'
18+
java-version: '17'
19+
20+
- name: Setup Android SDK
21+
uses: android-actions/setup-android@v3
22+
23+
- name: Setup NDK
24+
id: setup-ndk
25+
uses: nttld/setup-ndk@v1
26+
with:
27+
ndk-version: r26c
28+
29+
- name: Setup Rust
30+
uses: dtolnay/rust-toolchain@stable
31+
with:
32+
targets: aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android
33+
34+
- name: Install pnpm
35+
uses: pnpm/action-setup@v3
36+
with:
37+
version: 9
38+
39+
- name: Setup Node
40+
uses: actions/setup-node@v4
41+
with:
42+
node-version: 20
43+
cache: 'pnpm'
44+
45+
- name: Install dependencies
46+
run: pnpm install
47+
48+
- name: Initialize Android (if missing)
49+
run: |
50+
if [ ! -d "src-tauri/gen/android" ]; then
51+
echo "Initializing Android project..."
52+
pnpm tauri android init --ci
53+
fi
54+
env:
55+
CI: true
56+
57+
- name: Build Android APK
58+
run: pnpm tauri android build --apk
59+
env:
60+
NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
61+
62+
# 可选:签名 APK(需要在 GitHub Secrets 中配置签名密钥)
63+
# - name: Sign APK
64+
# uses: r0adkll/sign-android-release@v1
65+
# with:
66+
# releaseDirectory: src-tauri/gen/android/app/build/outputs/apk/universal/release
67+
# signingKeyBase64: ${{ secrets.ANDROID_SIGNING_KEY }}
68+
# alias: ${{ secrets.ANDROID_ALIAS }}
69+
# keyStorePassword: ${{ secrets.ANDROID_KEY_STORE_PASSWORD }}
70+
# keyPassword: ${{ secrets.ANDROID_KEY_PASSWORD }}
71+
72+
- name: Upload APK Artifact
73+
uses: actions/upload-artifact@v4
74+
with:
75+
name: app-release
76+
path: src-tauri/gen/android/app/build/outputs/apk/universal/release/app-universal-release-unsigned.apk

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
src-tauri/target/
2+
src-tauri/gen/android/
3+
src-tauri/gen/schemas/
4+
src-tauri/gen/
15
.DS_Store
26
Thumbs.db
37
.vscode/
@@ -46,3 +50,10 @@ tmp/
4650
PeroCore/
4751
Peroperochat/backend/app/data/*.db
4852
**/app/data/*.db
53+
54+
# User Data & Local Config
55+
data/
56+
*.db
57+
*.db-shm
58+
*.db-wal
59+
settings.json

0 commit comments

Comments
 (0)