Skip to content

添加多平台打包指南:支持macOS无证书构建和Linux ARM64架构#121

Draft
Copilot wants to merge 2 commits intodev2from
copilot/fix-120
Draft

添加多平台打包指南:支持macOS无证书构建和Linux ARM64架构#121
Copilot wants to merge 2 commits intodev2from
copilot/fix-120

Conversation

Copy link

Copilot AI commented Jul 8, 2025

概述

为解决用户关于多端打包的疑问,添加了完整的多平台构建指南和自动化脚本。

主要变更

📖 新增文档

  • BUILD_GUIDE.md - 多端打包快速指南
  • docs/guide/macos-unsigned-build.md - macOS无证书打包详细教程
  • docs/guide/linux-arm-build.md - Linux ARM64构建完整指南

🛠️ 新增构建脚本

  • scripts/build-multiplatform.sh - 多平台自动化构建脚本,支持:
    • --mac-unsigned macOS无证书构建
    • --linux-arm64 Linux ARM64构建
    • --all 全平台构建

解决的问题

🍎 macOS无Apple证书打包

已确认支持:项目配置中 "notarize": false,完全支持无证书打包

# 快速构建
./scripts/build-multiplatform.sh --mac-unsigned

# 或手动禁用签名
export CSC_IDENTITY_AUTO_DISCOVERY=false
npm run build

用户安装:右键点击应用选择"打开"即可绕过Gatekeeper

🐧 Linux ARM64架构支持

完全支持:配置文件已包含ARM64目标架构

"linux": {
  "target": [
    {"arch": ["x64", "arm64"], "target": "AppImage"},
    {"arch": ["x64", "arm64"], "target": "deb"}, 
    {"arch": ["x64", "arm64"], "target": "tar.gz"}
  ]
}

支持设备

  • ✅ 树莓派 4/5 (4GB+ RAM推荐)
  • ✅ Apple Silicon Mac运行Linux
  • ✅ AWS Graviton实例
  • ✅ 其他ARM64 Linux服务器

使用示例

# 克隆项目
git clone https://github.com/BigSweetPotatoStudio/HyperChat.git
cd HyperChat

# macOS无证书版本
./scripts/build-multiplatform.sh --mac-unsigned

# Linux ARM64版本  
./scripts/build-multiplatform.sh --linux-arm64

# 构建所有支持平台
./scripts/build-multiplatform.sh --all

文件变更

  • BUILD_GUIDE.md - 新增多平台构建总览
  • docs/guide/macos-unsigned-build.md - 新增macOS构建指南
  • docs/guide/linux-arm-build.md - 新增Linux ARM构建指南
  • scripts/build-multiplatform.sh - 新增自动化构建脚本

所有变更都是新增文件,不影响现有功能。

Fixes #120.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Co-authored-by: laopo001 <16536296+laopo001@users.noreply.github.com>
Copilot AI changed the title [WIP] 请教下打包多端的 添加多平台打包指南:支持macOS无证书构建和Linux ARM64架构 Jul 8, 2025
Copilot AI requested a review from laopo001 July 8, 2025 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

请教下打包多端的

2 participants