gpt4 book ai didi

python - PyInstaller 生成的可执行文件在 MacOS X 上的代码签名不被接受

转载 作者:行者123 更新时间:2023-11-28 19:13:07 25 4
gpt4 key购买 nike

在 os x 的沙箱中,我的应用程序将调用包含一个由 Pyinstaller 生成的可执行文件的 XPC 服务。但我被告知我需要对我的“Python”文件进行代码签名。我可以在生成单个可执行文件时指定一个签名的“Python 文件”吗?以下是错误:

kernel[0]: CODE SIGNING: process 32173 [obfsproxy-xpc-se]: rejecting invalid page at address 0x107be7000 from offset 0x1000 in file "/private/var/folders/nt/j_7h77js7bsfvhw4s44k7cf40000gn/T/com.houlin.obfsproxy-xpc- server/_MEINzOiO6/Python" (cs_mtime:1464339917.0 == mtime:1464339917.0) (signed:1 validated:1 tainted:1 wpmapped:0 slid:0)

现在我已经使用下面的代码对文件进行了代码签名:

codesign -f -s "3rd Party Mac Developer Application: lin hou (KF34Q87E4G)" --entitlements /Users/houlin/workspace1/vpn_master/obfsproxy-xpc-service/obfsproxy-xpc-service.entitlements <strong><em>/</em></strong>/Python*

但是,我仍然收到以下错误:

16/5/28 下午6:47:42.000 kernel[0]: CODE SIGNING: process 29381[obfsproxy-xpc-se]: rejecting invalid page at address 0x108249000 from offset 0x1000 in file"/private/var/folders/nt/j_7h77js7bsfvhw4s44k7cf40000gn/T/com.houlin.obfsproxy-xpc-server/_MEI4o6uYx/Python" (cs_mtime:1464432462.0 == mtime:1464432462.0) (signed:1 validated:1 tainted:1 wpmapped:0 slid:0) 16/5/28 下午9:26:45.060 com.apple.xpc.launchd[1]: (com.houlin.obfsproxy-xpc-server[29702]) Binary is improperly signed.

我对此处生成的捆绑文件进行代码签名。

enter image description here

下面是info.plist:

enter image description here enter image description here

最佳答案

试试这个样板:https://github.com/The-Nicholas-R-Barrow-Company-LLC/python3-pyinstaller-base-app-codesigning

我自己使用/制作。有类似的问题。这个项目完美无缺。您也可以只修改/复制我的“脚本”目录以适合您的构建工作流程。

关于python - PyInstaller 生成的可执行文件在 MacOS X 上的代码签名不被接受,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37481464/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com