添加makefile

This commit is contained in:
captain committed 2026-04-05 18:06:35 +08:00
1 parent 7080aef771
commit 8b763f7af4
5 files changed
+52 -3

No files matched your search

+36
View File
@@ -0,0 +1,36 @@
.PHONY: all deb rpm apk windows-desktop web web-windows clean help
all: deb rpm apk windows-desktop web web-windows
# 桌面端 Linux
deb:
cargo tauri build --bundles deb
rpm:
cargo tauri build --bundles rpm
# 安卓 APK
apk:
cargo tauri android build --target aarch64
./sign-apk.sh
# Windows 桌面端(需要 cargo-xwin)
windows-desktop:
cd src-tauri && cargo xwin build --release --bin lanchat --target x86_64-pc-windows-msvc
# Web 端 Linux
web:
cd src-tauri && cargo build --release --bin lanchat-web --features web --no-default-features
# Web 端 Windows
web-windows:
cd src-tauri && cargo build --no-default-features --features web --release --target x86_64-pc-windows-gnu
help:
@echo "可用目标:"
@echo " deb - 构建 Linux .deb 包"
@echo " rpm - 构建 Linux .rpm 包"
@echo " apk - 构建并签名 Android APK"
@echo " windows-desktop - 构建 Windows 桌面端 (需要 cargo-xwin)"
@echo " web - 构建 Web 端 (Linux)"
@echo " web-windows - 构建 Web 端 (Windows)"
+13
View File
@@ -59,6 +59,19 @@ cargo build --release --bin lanchat-web --features web --no-default-features
cargo build --no-default-features --features web --release --target x86_64-pc-windows-gnu # windows网页端
```
也可以使用 Makefile 一键构建:
```bash
make all # 构建测试过的所有平台
make deb # Linux .deb
make rpm # Linux .rpm
make apk # Android APK(自动签名)
make windows-desktop # Windows 桌面端(需要 cargo-xwin)
make web # Web 端 Linux
make web-windows # Web 端 Windows
make help # 查看帮助
```
## 主题
支持自定义`css`,文件名称随意,存储路径:
+1 -1
View File
@@ -2554,7 +2554,7 @@ dependencies = [
[[package]]
name = "lanchat"
version = "0.1.2"
version = "0.1.3"
dependencies = [
"axum",
"chrono",
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "lanchat"
version = "0.1.2"
version = "0.1.3"
edition = "2021"
default-run = "lanchat"
+1 -1
View File
@@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "LANChat",
"version": "0.1.2",
"version": "0.1.3",
"identifier": "com.lanchat.app",
"build": {
"frontendDist": "../src"