macOS编译ckb-next

macOS x86 成功,下一步,测试:m1、m2、m3 。

1、Homebrew

shell 复制代码
# 三选一
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
# /bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"

2、zsh(可选)

shell 复制代码
brew install zsh
echo $SHELL				# 查看当前使用的 shell
cat /etc/shells		# 查看安装的 shell
chsh -s /bin/zsh	# 切换为 zsh
exit							# 重启终端即可使用 zsh
curl -L http://install.ohmyz.sh | sh
git clone https://github.com/zsh-users/zsh-syntax-highlighting $ZSH_CUSTOM/plugins/zsh-syntax-highlighting

3、原码及工具链

shell 复制代码
brew install cmake qt5 quazip
git clone https://github.com/ckb-next/ckb-next.git
cd ckb-next
# echo 'export PATH="/usr/local/opt/qt@5/bin:$PATH"' >> ~/.zshrc
# export LDFLAGS="-L/usr/local/opt/qt@5/lib"
# export CPPFLAGS="-I/usr/local/opt/qt@5/include"
# export PKG_CONFIG_PATH="/usr/local/opt/qt@5/lib/pkgconfig"
export PATH="/usr/local/opt/qt@5/bin:$PATH" \
	export LDFLAGS="-L/usr/local/opt/qt@5/lib" \
	export CPPFLAGS="-I/usr/local/opt/qt@5/include" \
	export PKG_CONFIG_PATH="/usr/local/opt/qt@5/lib/pkgconfig"

4、编译

4.1、编译打包

shell 复制代码
brew install npm
brew cask install packages
npm install -g appdmg
cmake -H. -Bbuild -DCMAKE_OSX_DEPLOYMENT_TARGET=10.10 -DCMAKE_BUILD_TYPE=Release -DSAFE_INSTALL=ON -DSAFE_UNINSTALL=ON
cmake --build build --target macos-package

4.2、直接安装

shell 复制代码
./quickinstall

X、关闭SIP内核保护

shell 复制代码
## 白果:
	1. 启动 > ⌘ + R > macOS实用工具 > 重新安装 macOS > 实用工具 > 终端
	2. csrutil disable / enable / status

## 黑果
	OpenCore 启动界面:Enable / Disable SIP 
相关推荐
EXI-小洲15 小时前
MacOS IDEA将本地项目代码上传至SVN空仓库
macos·svn·intellij-idea
weixin_531670892 天前
Interlude起来:久坐提醒软件为什么需要登录?有没有完全本地运行的Mac休息提醒软件?
人工智能·macos·swift
coding4u2 天前
Mac 多桌面(Spaces)的正确用法:你的屏幕可以大三倍
macos·docker·计算机外设·文件管理·策略模式
weixin_531670893 天前
Interlude起来:Swift原生Mac软件有什么优势?原生Mac应用和Electron应用有什么区别?
人工智能·macos·mac·swift
k4m7v2pz3 天前
Swift Package Manager 在 macOS 26 上的三个编译错误排查指南
macos·spm·ai编程·xcode·swift·命令行工具
zhonyu鱼3 天前
Pot 翻译:开源免费的跨平台划词翻译与 OCR 工具
windows·macos·开源·ocr·开源软件
杜子麟3 天前
Android studio模拟器离线安装
android·macos·android studio
守城小轩4 天前
Chromium 148 编译指南 macOS篇:环境配置要求(一)
macos
Codeking__4 天前
iOS 动画:core Animation 底层原理
macos·objective-c·cocoa
SatanII4 天前
读懂 SELinux:强制访问控制 MAC,解决 httpd 服务权限报错实战
linux·运维·服务器·网络·macos