Mac软件打包发布流程

由于Mac上打包发布流程比较复杂,特意写篇文章记录下来:

一、给app的相关动态库签名

        进入到app里面,存放动态库的文件夹内,对所有动态库进行签名:

codesign --force --verify --verbose --sign "Developer ID Application: xxxxx (Gxxxxx)" *

        对单个动态库签名:

 codesign --force --verify --verbose --sign "Developer ID Application: xxxxx (Gxxxxx)" aaa.dylib

二、给app用到的第三方软件签名和APP自己签名

codesign  -fs "Developer ID Application: xxxx (Gxxx)" --options=runtime --timestamp  -v --deep myapp.app

三、查看签名

四、把app压缩成zip,用来进行公证(*注意:如果用系统自带的进行压缩,可能添加其它文件,导致公证失败)

ditto -c -k --keepParent test.app test.app.zip. 

五、提交压缩包进行公证

xcrun notarytool submit ./test.zip --apple-id "xxx@163.com" --team-id "Gxxx" --password "xxxx-xxxx-xxxx-xxxx" -v -f "json"

六、查看公证结果

xcrun notarytool log "2b4a8d90-05a7-4146-ad7c-0286a53b0538" --apple-id "xxxx@163.com" --password "xxxx-xxxx-xxxx-xxxx" --team-id "Gxxxxxxxxx"

七、添加票据

sudo xcrun stapler staple app.pkg

八、验证票据是否添加成功

xcrun stapler validate app.pkg

九、整体验证

spctl --assess -vv --type install app.pkg

十、QT打包修改包路径

//查看程序或库所依赖的库
otool -L 程序路径

//修改程序或库所依赖的路径
install_name_tool -change "原始路径" "新路径" 目标路径 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值