惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Tor Project blog
博客园 - 聂微东
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - 【当耐特】
G
Google Developers Blog
J
Java Code Geeks
The Cloudflare Blog
Attack and Defense Labs
Attack and Defense Labs
宝玉的分享
宝玉的分享
Last Week in AI
Last Week in AI
Cisco Talos Blog
Cisco Talos Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
I
Intezer
Jina AI
Jina AI
T
Tenable Blog
P
Palo Alto Networks Blog
Project Zero
Project Zero
D
DataBreaches.Net
Hugging Face - Blog
Hugging Face - Blog
The Hacker News
The Hacker News
F
Full Disclosure
Cloudbric
Cloudbric
量子位
H
Heimdal Security Blog
K
Kaspersky official blog
有赞技术团队
有赞技术团队
罗磊的独立博客
V
Vulnerabilities – Threatpost
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
阮一峰的网络日志
阮一峰的网络日志
Vercel News
Vercel News
Recent Announcements
Recent Announcements
WordPress大学
WordPress大学
GbyAI
GbyAI
S
SegmentFault 最新的问题
M
MIT News - Artificial intelligence
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
I
InfoQ
Recorded Future
Recorded Future
Security Archives - TechRepublic
Security Archives - TechRepublic
AI
AI
Webroot Blog
Webroot Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
爱范儿
爱范儿
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
T
The Exploit Database - CXSecurity.com
Apple Machine Learning Research
Apple Machine Learning Research
C
Cybersecurity and Infrastructure Security Agency CISA
H
Hacker News: Front Page
Latest news
Latest news

轶哥博客

blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog
blog
2021-03-18 · via 轶哥博客

Apple Silicon M1芯片可谓是性能爆炸,开发体验极佳,生态中适配速度也算得上势如破竹。借助Rosetta 2平稳过渡ARM64,实在是高明。在MacOS 11+系统中通过 Apple M1 编译原生M1 Electron应用程序也算得上轻松容易。

理论兼容M1芯片的Electron版本是11.2.3,实测兼容较好的版本是13.0.0-beta.5+

electron-builder需升级至20.10+,建议版本22.10.5+

本地Node.js版本请安装v15.5.0+

MacOS建议升级到11.2.3+

通过electron-builder编译Electron ARM64应用程序,需调整package.json配置文件:

"build": {
    "mac": {
      "target": {
        "target": "dmg",
        "arch": ["arm64", "x64"]
      }
    },
    ......
}

如需签名,安装electron-builder-notarize,参考以下配置:

"build": {
    "appId": "com.xxx.xxx",
    "generateUpdatesFilesForAllChannels": true,
    "afterSign": "electron-builder-notarize",
    "mac": {
      "target": {
        "target": "dmg",
        "arch": ["arm64", "x64"]
      },
      "hardenedRuntime": true,
      "entitlements": "build/entitlements.mac.plist",
      "entitlementsInherit": "build/entitlements.mac.plist"
    },
    ......
}

如需要Electron自动更新功能,请参考视频教程Electron自动编译及自动更新、分发